|
phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
|
Inheritance diagram for JsUtilsActionsTrait:Public Member Functions | |
| _add_event ($element, $js, $event, $preventDefault=false, $stopPropagation=false, $immediatly=true, $listenerOn=false) | |
| _genericCallValue ($jQueryCall, $element='this', $param="", $immediatly=false) | |
| Execute a generic jQuery call with a value. | |
| _genericCallElement ($jQueryCall, $to='this', $element='', $immediatly=false) | |
| Execute a generic jQuery call with 2 elements. | |
| addClass ($element='this', $class='', $immediatly=false) | |
| add class to element | |
| after ($to, $element, $immediatly=false) | |
| Insert content, specified by the parameter, after each element in the set of matched elements. | |
| before ($to, $element, $immediatly=false) | |
| Insert content, specified by the parameter, before each element in the set of matched elements. | |
| attr ($element='this', $attributeName='id', $value="", $immediatly=false) | |
| Get or set the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element. | |
| val ($element='this', $value='', $immediatly=false) | |
| Get or set the value of the first element in the set of matched elements or set one or more attributes for every matched element. | |
| html ($element='this', $value='', $immediatly=false) | |
| Get or set the html of an attribute for the first element in the set of matched elements. | |
| animate ($element='this', $params=array(), $speed='', $extra='', $immediatly=false) | |
| Outputs a javascript library animate event. | |
| append ($to, $element, $immediatly=false) | |
| Insert content, specified by the parameter $element, to the end of each element in the set of matched elements $to. | |
| prepend ($to, $element, $immediatly=false) | |
| Insert content, specified by the parameter $element, to the beginning of each element in the set of matched elements $to. | |
| fadeIn ($element='this', $speed='', $callback='', $immediatly=false) | |
| Execute a javascript library hide action. | |
| fadeOut ($element='this', $speed='', $callback='', $immediatly=false) | |
| Execute a javascript library hide action. | |
| slideUp ($element='this', $speed='', $callback='', $immediatly=false) | |
| Execute a javascript library slideUp action. | |
| removeClass ($element='this', $class='', $immediatly=false) | |
| Execute a javascript library removeClass action. | |
| slideDown ($element='this', $speed='', $callback='', $immediatly=false) | |
| Execute a javascript library slideDown action. | |
| slideToggle ($element='this', $speed='', $callback='', $immediatly=false) | |
| Execute a javascript library slideToggle action. | |
| hide ($element='this', $speed='', $callback='', $immediatly=false) | |
| Execute a javascript library hide action. | |
| toggle ($element='this', $speed='', $callback='', $immediatly=false) | |
| Execute a javascript library toggle action. | |
| toggleClass ($element='this', $class='', $immediatly=false) | |
| Execute a javascript library toggle class action. | |
| trigger ($element='this', $event='click', $immediatly=false) | |
| Execute all handlers and behaviors attached to the matched elements for the given event. | |
| show ($element='this', $speed='', $callback='', $immediatly=false) | |
| Execute a javascript library show action. | |
| sortable ($element, $options=array()) | |
| Creates a jQuery sortable. | |
| tablesorter ($table='', $options='') | |
| Table Sorter Plugin. | |
| condition ($condition, $jsCodeIfTrue, $jsCodeIfFalse=null, $immediatly=false) | |
| Allows to attach a condition. | |
| doJQuery ($element, $jqueryCall, $param="", $jsCallback="") | |
| Calls the JQuery callback $someThing on $element with facultative parameter $param. | |
| doJQueryDeferred ($element, $jqueryCall, $param="", $jsCallback="") | |
| Calls the JQuery callback $someThing on $element with facultative parameter $param. | |
| doJQueryOn ($event, $element, $elementToModify, $jqueryCall, $param="", $parameters=array()) | |
| Calls the JQuery callback $jqueryCall on $element with facultative parameter $param in response to an event $event. | |
| exec ($js, $immediatly=false) | |
| Executes the code $js. | |
| execAtLast ($js) | |
| Executes the code $js. | |
| execOn ($event, $element, $js, $parameters=array()) | |
| Executes the javascript code $js when $event fires on $element. | |
| setJsonToElement ($json, $elementClass="_element", $immediatly=true) | |
| setDraggable ($element, $parameters=[]) | |
| Sets an element draggable (HTML5 drag and drop) | |
| asDropZone ($element, $jsCallback="", $parameters=[]) | |
| Declares an element as a drop zone (HTML5 drag and drop) | |
| interval ($jsCode, $time, $globalName=null, $immediatly=true) | |
| Calls a function or evaluates an expression at specified intervals (in milliseconds) | |
| clearInterval ($globalName, $immediatly=true) | |
| Clears an existing interval. | |
| counter ($counterSelector, $value=0, $limit=0, $globalName=null, $countDown=true, $immediatly=true) | |
| Associates a counter to the element designated by $counterSelector Triggers the events counter-start and counter-end on finished with the parameters value and limit. | |
| counterOn ($element, $event, $counterSelector, $value=0, $limit=0, $globalName=null, $countDown=true) | |
| Associates a counter to the element designated by $counterSelector when $event is triggered on $element. | |
| activateLink ($target, $property='href', $href=null) | |
| Activates an element if it is active (add the class active) | |
| _activateLink ($target, $property='href', $href=null) | |
| Returns the javascript code for activate an element if it is active (add the class active) | |
Protected Member Functions | |
| _showHideWithEffect ($action, $element='this', $speed='', $callback='', $immediatly=false) | |
| show or hide with effect | |
Private Member Functions | |
| _validate_speed ($speed) | |
| Ensures the speed parameter is valid for jQuery. | |
| _doJQuery ($element, $jqueryCall, $param="", $jsCallback="", $immediatly=false) | |
| Call the JQuery method $jqueryCall on $element with parameters $param. | |
| _doJQueryOn ($event, $element, $elementToModify, $jqueryCall, $param="", $preventDefault=false, $stopPropagation=false, $jsCallback="", $immediatly=true) | |
Definition at line 13 of file JsUtilsActionsTrait.php.
| _activateLink | ( | $target, | |
$property = 'href', |
|||
$href = null |
|||
| ) |
Returns the javascript code for activate an element if it is active (add the class active)
| string | $target | the container element |
| string | $property | default: href |
| string | $href | the active href (if null, window.location.href is used) |
Definition at line 820 of file JsUtilsActionsTrait.php.
|
abstract |
Reimplemented in JsUtils.
|
private |
Call the JQuery method $jqueryCall on $element with parameters $param.
| string | $element | |
| string | $jqueryCall | |
| mixed | $param | |
| string | $jsCallback | javascript code to execute after the jquery call |
| boolean | $immediatly |
Definition at line 501 of file JsUtilsActionsTrait.php.
|
private |
| string | $event | |
| string | $element | |
| string | $elementToModify | |
| string | $jqueryCall | |
| string | array | $param | |
| boolean | $preventDefault | |
| boolean | $stopPropagation | |
| string | $jsCallback | javascript code to execute after the jquery call |
| boolean | $immediatly |
Definition at line 560 of file JsUtilsActionsTrait.php.
| _genericCallElement | ( | $jQueryCall, | |
$to = 'this', |
|||
$element = '', |
|||
$immediatly = false |
|||
| ) |
Execute a generic jQuery call with 2 elements.
| string | $jQueryCall | |
| string | $to | |
| string | $element | |
| boolean | $immediatly | delayed if false |
Definition at line 94 of file JsUtilsActionsTrait.php.
| _genericCallValue | ( | $jQueryCall, | |
$element = 'this', |
|||
$param = "", |
|||
$immediatly = false |
|||
| ) |
Execute a generic jQuery call with a value.
| string | $jQueryCall | |
| string | $element | |
| string | $param | |
| boolean | $immediatly | delayed if false |
Definition at line 72 of file JsUtilsActionsTrait.php.
|
protected |
show or hide with effect
| string | $action | |
| string | $element | element |
| string | $speed | One of 'slow', 'normal', 'fast', or time in milliseconds |
| string | $callback | Javascript callback function |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 31 of file JsUtilsActionsTrait.php.
|
private |
Ensures the speed parameter is valid for jQuery.
| string | int | $speed |
Definition at line 49 of file JsUtilsActionsTrait.php.
| activateLink | ( | $target, | |
$property = 'href', |
|||
$href = null |
|||
| ) |
Activates an element if it is active (add the class active)
| string | $target | the container element |
| string | $property | default: href |
| string | $href | the active href (if null, window.location.href is used) |
Definition at line 805 of file JsUtilsActionsTrait.php.
| addClass | ( | $element = 'this', |
|
$class = '', |
|||
$immediatly = false |
|||
| ) |
add class to element
| string | $element | |
| string | $class | to add |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 113 of file JsUtilsActionsTrait.php.
| after | ( | $to, | |
| $element, | |||
$immediatly = false |
|||
| ) |
Insert content, specified by the parameter, after each element in the set of matched elements.
| string | $to | |
| string | $element | |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 126 of file JsUtilsActionsTrait.php.
| animate | ( | $element = 'this', |
|
$params = array (), |
|||
$speed = '', |
|||
$extra = '', |
|||
$immediatly = false |
|||
| ) |
Outputs a javascript library animate event.
| string | $element | element |
| array | string | $params | |
| string | $speed | One of 'slow', 'normal', 'fast', or time in milliseconds |
| string | $extra | |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 201 of file JsUtilsActionsTrait.php.
| append | ( | $to, | |
| $element, | |||
$immediatly = false |
|||
| ) |
Insert content, specified by the parameter $element, to the end of each element in the set of matched elements $to.
| string | $to | |
| string | $element | |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 237 of file JsUtilsActionsTrait.php.
| asDropZone | ( | $element, | |
$jsCallback = "", |
|||
$parameters = [ ] |
|||
| ) |
Declares an element as a drop zone (HTML5 drag and drop)
| string | $element | The element selector |
| array | $parameters | default : array("attr"=>"id","stopPropagation"=>false,"immediatly"=>true,"jqueryDone"=>"append") |
| string | $jsCallback | the js script to call when element is dropped |
Definition at line 668 of file JsUtilsActionsTrait.php.
| attr | ( | $element = 'this', |
|
$attributeName = 'id', |
|||
$value = "", |
|||
$immediatly = false |
|||
| ) |
Get or set the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element.
| string | $element | |
| string | $attributeName | |
| string | $value | |
| boolean | $immediatly | delayed if false |
Definition at line 152 of file JsUtilsActionsTrait.php.
| before | ( | $to, | |
| $element, | |||
$immediatly = false |
|||
| ) |
Insert content, specified by the parameter, before each element in the set of matched elements.
| string | $to | |
| string | $element | |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 139 of file JsUtilsActionsTrait.php.
| clearInterval | ( | $globalName, | |
$immediatly = true |
|||
| ) |
Clears an existing interval.
| string | $globalName | The interval global name |
| boolean | $immediatly | delayed if false |
Definition at line 712 of file JsUtilsActionsTrait.php.
| condition | ( | $condition, | |
| $jsCodeIfTrue, | |||
$jsCodeIfFalse = null, |
|||
$immediatly = false |
|||
| ) |
Allows to attach a condition.
| string | $condition | |
| string | $jsCodeIfTrue | |
| string | $jsCodeIfFalse | |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 479 of file JsUtilsActionsTrait.php.
| counter | ( | $counterSelector, | |
$value = 0, |
|||
$limit = 0, |
|||
$globalName = null, |
|||
$countDown = true, |
|||
$immediatly = true |
|||
| ) |
Associates a counter to the element designated by $counterSelector Triggers the events counter-start and counter-end on finished with the parameters value and limit.
| string | $counterSelector | Selector of the existing element wich display the counter |
| integer | $value | The initial value of the counter |
| integer | $limit | The limit of the counter (minimum if countDown is true, maximum if not) |
| string | $globalName | The global name of the counter, to use with the clearInterval method |
| boolean | $countDown | count down if true or elapse if false |
| boolean | $immediatly | delayed if false |
Definition at line 734 of file JsUtilsActionsTrait.php.
| counterOn | ( | $element, | |
| $event, | |||
| $counterSelector, | |||
$value = 0, |
|||
$limit = 0, |
|||
$globalName = null, |
|||
$countDown = true |
|||
| ) |
Associates a counter to the element designated by $counterSelector when $event is triggered on $element.
| string | $element | The triggering element |
| string | $event | The triggering event |
| string | $counterSelector | Selector of the existing element wich display the counter |
| integer | $value | The initial value of the counter |
| integer | $limit | The limit of the counter (minimum if countDown is true, maximum if not) |
| string | $globalName | The global name of the counter, to use with the clearInterval method |
| boolean | $countDown | count down if true or elapse if false |
Definition at line 790 of file JsUtilsActionsTrait.php.
| doJQuery | ( | $element, | |
| $jqueryCall, | |||
$param = "", |
|||
$jsCallback = "" |
|||
| ) |
Calls the JQuery callback $someThing on $element with facultative parameter $param.
| string | $element | the element |
| string | $jqueryCall | the JQuery callback |
| mixed | $param | array or string parameters |
| string | $jsCallback | javascript code to execute after the jquery call |
Definition at line 525 of file JsUtilsActionsTrait.php.
| doJQueryDeferred | ( | $element, | |
| $jqueryCall, | |||
$param = "", |
|||
$jsCallback = "" |
|||
| ) |
Calls the JQuery callback $someThing on $element with facultative parameter $param.
| string | $element | the element |
| string | $jqueryCall | the JQuery callback |
| mixed | $param | array or string parameters |
| string | $jsCallback | javascript code to execute after the jquery call |
Definition at line 542 of file JsUtilsActionsTrait.php.
| doJQueryOn | ( | $event, | |
| $element, | |||
| $elementToModify, | |||
| $jqueryCall, | |||
$param = "", |
|||
$parameters = array () |
|||
| ) |
Calls the JQuery callback $jqueryCall on $element with facultative parameter $param in response to an event $event.
| string | $event | |
| string | $element | |
| string | $elementToModify | |
| string | $jqueryCall | |
| string | $param | |
| array | $parameters | default : array("preventDefault"=>false,"stopPropagation"=>false,"jsCallback"=>'',"immediatly"=>true) |
Definition at line 575 of file JsUtilsActionsTrait.php.
| exec | ( | $js, | |
$immediatly = false |
|||
| ) |
Executes the code $js.
| string | $js | Code to execute |
| boolean | $immediatly | delayed if false |
Definition at line 593 of file JsUtilsActionsTrait.php.
| execAtLast | ( | $js | ) |
Executes the code $js.
| string | $js | Code to execute |
| boolean | $immediatly | delayed if false |
Definition at line 609 of file JsUtilsActionsTrait.php.
| execOn | ( | $event, | |
| $element, | |||
| $js, | |||
$parameters = array () |
|||
| ) |
Executes the javascript code $js when $event fires on $element.
| string | $event | |
| string | $element | |
| string | $js | Code to execute |
| array | $parameters | default : array("preventDefault"=>false,"stopPropagation"=>false,"immediatly"=>true) |
Definition at line 626 of file JsUtilsActionsTrait.php.
| fadeIn | ( | $element = 'this', |
|
$speed = '', |
|||
$callback = '', |
|||
$immediatly = false |
|||
| ) |
Execute a javascript library hide action.
| string | $element | element |
| string | $speed | One of 'slow', 'normal', 'fast', or time in milliseconds |
| string | $callback | Javascript callback function |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 267 of file JsUtilsActionsTrait.php.
| fadeOut | ( | $element = 'this', |
|
$speed = '', |
|||
$callback = '', |
|||
$immediatly = false |
|||
| ) |
Execute a javascript library hide action.
| string | $element | element |
| string | $speed | One of 'slow', 'normal', 'fast', or time in milliseconds |
| string | $callback | Javascript callback function |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 284 of file JsUtilsActionsTrait.php.
| hide | ( | $element = 'this', |
|
$speed = '', |
|||
$callback = '', |
|||
$immediatly = false |
|||
| ) |
Execute a javascript library hide action.
| string | $element | element |
| string | $speed | One of 'slow', 'normal', 'fast', or time in milliseconds |
| string | $callback | Javascript callback function |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 367 of file JsUtilsActionsTrait.php.
| html | ( | $element = 'this', |
|
$value = '', |
|||
$immediatly = false |
|||
| ) |
Get or set the html of an attribute for the first element in the set of matched elements.
| string | $element | |
| string | $value | |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 184 of file JsUtilsActionsTrait.php.
| interval | ( | $jsCode, | |
| $time, | |||
$globalName = null, |
|||
$immediatly = true |
|||
| ) |
Calls a function or evaluates an expression at specified intervals (in milliseconds)
| string | $jsCode | The code to execute |
| int | $time | The time interval in milliseconds |
| string | $globalName | The global name of the interval, used to clear it |
| boolean | $immediatly | delayed if false |
Definition at line 691 of file JsUtilsActionsTrait.php.
| prepend | ( | $to, | |
| $element, | |||
$immediatly = false |
|||
| ) |
Insert content, specified by the parameter $element, to the beginning of each element in the set of matched elements $to.
| string | $to | |
| string | $element | |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 250 of file JsUtilsActionsTrait.php.
| removeClass | ( | $element = 'this', |
|
$class = '', |
|||
$immediatly = false |
|||
| ) |
Execute a javascript library removeClass action.
| string | $element | element |
| string | $class | Class to add |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 316 of file JsUtilsActionsTrait.php.
| setDraggable | ( | $element, | |
$parameters = [ ] |
|||
| ) |
Sets an element draggable (HTML5 drag and drop)
| string | $element | The element selector |
| array | $parameters | default : array("attr"=>"id","preventDefault"=>false,"stopPropagation"=>false,"immediatly"=>true) |
Definition at line 648 of file JsUtilsActionsTrait.php.
| setJsonToElement | ( | $json, | |
$elementClass = "_element", |
|||
$immediatly = true |
|||
| ) |
Definition at line 634 of file JsUtilsActionsTrait.php.
| show | ( | $element = 'this', |
|
$speed = '', |
|||
$callback = '', |
|||
$immediatly = false |
|||
| ) |
Execute a javascript library show action.
| string | $element | element |
| string | $speed | One of 'slow', 'normal', 'fast', or time in milliseconds |
| string | $callback | Javascript callback function |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 432 of file JsUtilsActionsTrait.php.
| slideDown | ( | $element = 'this', |
|
$speed = '', |
|||
$callback = '', |
|||
$immediatly = false |
|||
| ) |
Execute a javascript library slideDown action.
| string | $element | element |
| string | $speed | One of 'slow', 'normal', 'fast', or time in milliseconds |
| string | $callback | Javascript callback function |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 333 of file JsUtilsActionsTrait.php.
| slideToggle | ( | $element = 'this', |
|
$speed = '', |
|||
$callback = '', |
|||
$immediatly = false |
|||
| ) |
Execute a javascript library slideToggle action.
| string | $element | element |
| string | $speed | One of 'slow', 'normal', 'fast', or time in milliseconds |
| string | $callback | Javascript callback function |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 350 of file JsUtilsActionsTrait.php.
| slideUp | ( | $element = 'this', |
|
$speed = '', |
|||
$callback = '', |
|||
$immediatly = false |
|||
| ) |
Execute a javascript library slideUp action.
| string | $element | element |
| string | $speed | One of 'slow', 'normal', 'fast', or time in milliseconds |
| string | $callback | Javascript callback function |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 301 of file JsUtilsActionsTrait.php.
| sortable | ( | $element, | |
$options = array () |
|||
| ) |
Creates a jQuery sortable.
| string | $element | |
| array | $options |
Definition at line 443 of file JsUtilsActionsTrait.php.
| tablesorter | ( | $table = '', |
|
$options = '' |
|||
| ) |
Table Sorter Plugin.
| string | $table | table name |
| string | $options | plugin location |
Definition at line 466 of file JsUtilsActionsTrait.php.
| toggle | ( | $element = 'this', |
|
$speed = '', |
|||
$callback = '', |
|||
$immediatly = false |
|||
| ) |
Execute a javascript library toggle action.
| string | $element | element |
| string | $speed | One of 'slow', 'normal', 'fast', or time in milliseconds |
| string | $callback | Javascript callback function |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 384 of file JsUtilsActionsTrait.php.
| toggleClass | ( | $element = 'this', |
|
$class = '', |
|||
$immediatly = false |
|||
| ) |
Execute a javascript library toggle class action.
| string | $element | element |
| string | $class | |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 398 of file JsUtilsActionsTrait.php.
| trigger | ( | $element = 'this', |
|
$event = 'click', |
|||
$immediatly = false |
|||
| ) |
Execute all handlers and behaviors attached to the matched elements for the given event.
| string | $element | |
| string | $event | |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 410 of file JsUtilsActionsTrait.php.
| val | ( | $element = 'this', |
|
$value = '', |
|||
$immediatly = false |
|||
| ) |
Get or set the value of the first element in the set of matched elements or set one or more attributes for every matched element.
| string | $element | |
| string | $value | |
| boolean | $immediatly | defers the execution if set to false |
Definition at line 172 of file JsUtilsActionsTrait.php.