Class JHtmlBehavior

Description

Utility class for javascript behaviors

  • abstract:
  • since: 11.1

Located in /libraries/joomla/html/html/behavior.php (line 19)


	
			
Variable Summary
static array $loaded
Method Summary
static void calendar ()
static void caption ([string $selector = 'img.caption'])
static void colorpicker ()
static void combobox ()
static void formvalidation ()
static void framework ([string $extras = false], [boolean $debug = null])
static void highlighter (array $terms, [string $start = 'highlighter-start'], [string $end = 'highlighter-end'], [string $className = 'highlight'], [string $tag = 'span'])
static void keepalive ()
static void modal ([string $selector = 'a.modal'], [array $params = array()])
static void mootools ([boolean $debug = null])
static void multiselect ([string $id = 'adminForm'])
static void noframes ([string $location = 'top.location.href'])
static void switcher ()
static void tooltip ([string $selector = '.hasTip'], [array $params = array()])
static void tree (string $id, [array $params = array()], [array $root = array()])
static void uploader ([string $id = 'file-upload'], [array $params = array()], [string $upload_queue = 'upload-queue'])
static string _calendartranslation ()
static string _getJSObject ([array $array = array()])
Variables
static array $loaded = array() (line 24)
  • var: array containing information for loaded files
  • access: protected
Methods
static method calendar (line 630)

Add unobtrusive javascript support for a calendar control.

  • since: 11.1
  • access: public
static void calendar ()
static method caption (line 95)

Add unobtrusive javascript support for image captions.

  • since: 11.1
  • access: public
static void caption ([string $selector = 'img.caption'])
  • string $selector: The selector for which a caption behaviour is to be applied.
static method colorpicker (line 660)

Add unobtrusive javascript support for a color picker.

  • since: 11.2
  • access: public
static void colorpicker ()
static method combobox (line 191)

Add unobtrusive javascript support for a combobox effect.

Note that this control is only reliable in absolutely positioned elements. Avoid using a combobox in a slider or dynamic pane.

  • since: 11.1
  • access: public
static void combobox ()
static method formvalidation (line 131)

Add unobtrusive javascript support for form validation.

To enable form validation the form tag must have class="form-validate". Each field that needs to be validated needs to have class="validate". Additional handlers can be added to the handler for username, password, numeric and email. To use these add class="validate-email" and so on.

  • since: 11.1
  • access: public
static void formvalidation ()
static method framework (line 38)

Method to load the MooTools framework into the document head

If debugging mode is on an uncompressed version of MooTools is included for easier debugging.

  • since: 11.1
  • access: public
static void framework ([string $extras = false], [boolean $debug = null])
  • string $extras: MooTools file to load
  • boolean $debug: Is debugging mode on? [optional]
static method highlighter (line 760)

Highlight some words via Javascript.

  • since: 11.4
  • access: public
static void highlighter (array $terms, [string $start = 'highlighter-start'], [string $end = 'highlighter-end'], [string $className = 'highlight'], [string $tag = 'span'])
  • array $terms: Array of words that should be highlighted.
  • string $start: ID of the element that marks the begin of the section in which words should be highlighted. Note this element will be removed from the DOM.
  • string $end: ID of the element that end this section. Note this element will be removed from the DOM.
  • string $className: Class name of the element highlights are wrapped in.
  • string $tag: Tag that will be used to wrap the highlighted words.
static method keepalive (line 708)

Keep session alive, for example, while editing or creating an article.

  • since: 11.1
  • access: public
static void keepalive ()
static method modal (line 302)

Add unobtrusive javascript support for modal links.

  • since: 11.1
  • access: public
static void modal ([string $selector = 'a.modal'], [array $params = array()])
  • string $selector: The selector for which a modal behaviour is to be applied.
  • array $params: An array of parameters for the modal behaviour. Options for the modal behaviour can be:
    • ajaxOptions
    • size
    • shadow
    • overlay
    • onOpen
    • onClose
    • onUpdate
    • onResize
    • onShow
    • onHide
static method mootools (line 78)

Deprecated. Use JHtmlBehavior::framework() instead.

  • deprecated: 12.1
  • since: 11.1
  • access: public
static void mootools ([boolean $debug = null])
  • boolean $debug: Is debugging mode on? [optional]
static method multiselect (line 373)

JavaScript behavior to allow shift select in grids

  • since: 11.1
  • access: public
static void multiselect ([string $id = 'adminForm'])
  • string $id: The id of the form for which a multiselect behaviour is to be applied.
static method noframes (line 806)

Break us out of any containing iframes

  • since: 11.1
  • access: public
static void noframes ([string $location = 'top.location.href'])
  • string $location: Location to display in
static method switcher (line 154)

Add unobtrusive javascript support for submenu switcher support in Global Configuration and System Information.

  • since: 11.1
  • access: public
static void switcher ()
static method tooltip (line 231)

Add unobtrusive javascript support for a hover tooltips.

Add a title attribute to any element in the form title="title::text"

Uses the core Tips class in MooTools.

  • since: 11.1
  • access: public
static void tooltip ([string $selector = '.hasTip'], [array $params = array()])
  • string $selector: The class selector for the tooltip.
  • array $params: An array of options for the tooltip. Options for the tooltip can be:
    • maxTitleChars integer The maximum number of characters in the tooltip title (defaults to 50).
    • offsets object The distance of your tooltip from the mouse (defaults to {'x': 16, 'y': 16}).
    • showDelay integer The millisecond delay the show event is fired (defaults to 100).
    • hideDelay integer The millisecond delay the hide hide is fired (defaults to 100).
    • className string The className your tooltip container will get.
    • fixed boolean If set to true, the toolTip will not follow the mouse.
    • onShow function The default function for the show event, passes the tip element and the currently hovered element.
    • onHide function The default function for the hide event, passes the currently hovered element.
static method tree (line 570)

Add unobtrusive javascript support for a collapsible tree.

  • since: 11.1
  • access: public
static void tree (string $id, [array $params = array()], [array $root = array()])
  • string $id: An index
  • array $params: An array of options.
  • array $root: The root node
static method uploader (line 409)

Add unobtrusive javascript support for the advanced uploader.

  • since: 11.1
  • access: public
static void uploader ([string $id = 'file-upload'], [array $params = array()], [string $upload_queue = 'upload-queue'])
  • string $id: An index.
  • array $params: An array of options for the uploader.
  • string $upload_queue: The HTML id of the upload queue element (??).
static method _calendartranslation (line 899)

Internal method to translate the JavaScript Calendar

  • return: JavaScript that translates the object
  • since: 11.1
  • access: protected
static string _calendartranslation ()
static method _getJSObject (line 837)

Internal method to get a JavaScript object notation string from an array

  • return: JavaScript object notation representation of the array
  • since: 11.1
  • access: protected
static string _getJSObject ([array $array = array()])
  • array $array: The array to convert to JavaScript object notation

Documentation generated on Mon, 25 Jun 2012 13:52:37 -0500 by phpDocumentor 1.4.4