phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
|
JQuery UI Autocomplete component. More...
Public Member Functions | |
__construct (JsUtils $js) | |
setAjaxSource ($url) | |
Define source property with an ajax request based on $url $url must return a JSON array of values. | |
setSource ($source) | |
Define the source property with a JSON Array of values Example : ["Bordeaux","Alsace","Bourgogne"] Example : [{value : "BO", label : "Bordeaux"}, {value : "AL", label : "Alsace"}, {value : "BOU", label : "Bourgogne"}]. | |
setAutofocus ($value) | |
If set to true the first item will automatically be focused when the menu is shown. | |
setDelay ($value) | |
The delay in milliseconds between when a keystroke occurs and when a search is performed. | |
setDisabled ($value) | |
Disables the autocomplete if set to true. | |
setMinLength ($value) | |
The minimum number of characters a user must type before a search is performed. | |
setPosition (Position $position) | |
Identifies the position of the suggestions menu in relation to the associated input element. | |
onChange ($jsCode) | |
Triggered when the field is blurred, if the value has changed. | |
onClose ($jsCode) | |
Triggered when the menu is hidden. | |
onFocus ($jsCode) | |
Triggered when focus is moved to an item (not selecting). | |
onOpen ($jsCode) | |
Triggered when the suggestion menu is opened or updated. | |
onResponse ($jsCode) | |
Triggered after a search completes, before the menu is shown. | |
onSearch ($jsCode) | |
Triggered before a search is performed, after minLength and delay are met. | |
onSelect ($jsCode) | |
Triggered when an item is selected from the menu. | |
Public Member Functions inherited from SimpleComponent | |
getScript () | |
attach ($identifier) | |
addEvent ($event, $jsCode) | |
on ($event, $jsCode) | |
getAttachTo () | |
getItemSelector () | |
setItemSelector ($itemSelector) | |
Public Member Functions inherited from BaseComponent | |
setParam ($key, $value) | |
getParam ($key) | |
getParams () | |
compile (JsUtils $js=NULL) | |
setParams ($params) | |
addParams ($params) | |
setDebug ($value) | |
setVerbose ($value) | |
Additional Inherited Members | |
Data Fields inherited from BaseComponent | |
$jquery_code_for_compile =array () | |
Protected Member Functions inherited from SimpleComponent | |
compileEvents () | |
_createSelector ($itemSelector, $selector) | |
compileJQueryCode () | |
setParamCtrl ($key, $value, $typeCtrl) | |
Protected Member Functions inherited from BaseComponent | |
getParamsAsJSON ($params) | |
Protected Attributes inherited from SimpleComponent | |
$attachTo | |
$itemSelector | |
$uiName | |
$events | |
Protected Attributes inherited from BaseComponent | |
$params =array () | |
$js | |
__construct | ( | JsUtils | $js | ) |
Reimplemented from SimpleComponent.
Definition at line 17 of file Autocomplete.php.
onChange | ( | $jsCode | ) |
Triggered when the field is blurred, if the value has changed.
string | $jsCode |
Definition at line 129 of file Autocomplete.php.
onClose | ( | $jsCode | ) |
Triggered when the menu is hidden.
Not every close event will be accompanied by a change event.
string | $jsCode |
Definition at line 140 of file Autocomplete.php.
onFocus | ( | $jsCode | ) |
Triggered when focus is moved to an item (not selecting).
The default action is to replace the text field's value with the value of the focused item, though only if the event was triggered by a keyboard interaction. Canceling this event prevents the value from being updated, but does not prevent the menu item from being focused.
string | $jsCode |
Definition at line 153 of file Autocomplete.php.
onOpen | ( | $jsCode | ) |
Triggered when the suggestion menu is opened or updated.
string | $jsCode |
Definition at line 163 of file Autocomplete.php.
onResponse | ( | $jsCode | ) |
Triggered after a search completes, before the menu is shown.
Useful for local manipulation of suggestion data, where a custom source option callback is not required. This event is always triggered when a search completes, even if the menu will not be shown because there are no results or the Autocomplete is disabled.
string | $jsCode |
Definition at line 175 of file Autocomplete.php.
onSearch | ( | $jsCode | ) |
Triggered before a search is performed, after minLength and delay are met.
If canceled, then no request will be started and no items suggested.
string | $jsCode |
Definition at line 186 of file Autocomplete.php.
onSelect | ( | $jsCode | ) |
Triggered when an item is selected from the menu.
The default action is to replace the text field's value with the value of the selected item. Canceling this event prevents the value from being updated, but does not prevent the menu from closing.
string | $jsCode |
Definition at line 198 of file Autocomplete.php.
setAjaxSource | ( | $url | ) |
Define source property with an ajax request based on $url $url must return a JSON array of values.
String | $url |
Definition at line 30 of file Autocomplete.php.
setAutofocus | ( | $value | ) |
If set to true the first item will automatically be focused when the menu is shown.
default : false
Boolean | $value |
Definition at line 69 of file Autocomplete.php.
setDelay | ( | $value | ) |
The delay in milliseconds between when a keystroke occurs and when a search is performed.
A zero-delay makes sense for local data (more responsive), but can produce a lot of load for remote data, while being less responsive. default : 300
int | $value |
Definition at line 82 of file Autocomplete.php.
setDisabled | ( | $value | ) |
Disables the autocomplete if set to true.
Boolean | $value | default : false |
Definition at line 93 of file Autocomplete.php.
setMinLength | ( | $value | ) |
The minimum number of characters a user must type before a search is performed.
Zero is useful for local data with just a few items, but a higher value should be used when a single character search could match a few thousand items.
int | $value | default : 1 |
Definition at line 106 of file Autocomplete.php.
setPosition | ( | Position | $position | ) |
Identifies the position of the suggestions menu in relation to the associated input element.
The of option defaults to the input element, but you can specify another element to position against. You can refer to the jQuery UI Position utility for more details about the various options.
int | $position | default : { my: "left top", at: "left bottom", collision: "none" } |
Definition at line 119 of file Autocomplete.php.
setSource | ( | $source | ) |
Define the source property with a JSON Array of values Example : ["Bordeaux","Alsace","Bourgogne"] Example : [{value : "BO", label : "Bordeaux"}, {value : "AL", label : "Alsace"}, {value : "BOU", label : "Bourgogne"}].
String | $source |
Definition at line 54 of file Autocomplete.php.