18 parent::__construct(
$js);
19 $this->uiName =
"autocomplete";
31 if (JString::startsWith($url,
"/")) {
32 $url = $this->js->getUrl($url);
34 $ajax =
"%function (request, response) {
38 data: {q : request.term},
39 success: function(data) {response(data);}
42 return $this->
setParam(
"source", $ajax);
70 return $this->
setParamCtrl(
"autoFocus", $value,
"is_bool");
94 return $this->
setParamCtrl(
"disabled", $value,
"is_bool");
107 return $this->
setParamCtrl(
"minLength", $value,
"is_int");
130 return $this->
addEvent(
"change", $jsCode);
141 return $this->
addEvent(
"close", $jsCode);
154 return $this->
addEvent(
"focus", $jsCode);
164 return $this->
addEvent(
"open", $jsCode);
176 return $this->
addEvent(
"response", $jsCode);
187 return $this->
addEvent(
"search", $jsCode);
199 return $this->
addEvent(
"select", $jsCode);
Base component for JQuery UI visuals components.
setParamCtrl($key, $value, $typeCtrl)
addEvent($event, $jsCode)
JQuery UI Autocomplete component.
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.
onClose($jsCode)
Triggered when the menu is hidden.
onResponse($jsCode)
Triggered after a search completes, before the menu is shown.
onChange($jsCode)
Triggered when the field is blurred, if the value has changed.
setSource($source)
Define the source property with a JSON Array of values Example : ["Bordeaux","Alsace",...
onSearch($jsCode)
Triggered before a search is performed, after minLength and delay are met.
setAjaxSource($url)
Define source property with an ajax request based on $url $url must return a JSON array of values.
onOpen($jsCode)
Triggered when the suggestion menu is opened or updated.
setDisabled($value)
Disables the autocomplete if set to true.
setPosition(Position $position)
Identifies the position of the suggestions menu in relation to the associated input element.
onSelect($jsCode)
Triggered when an item is selected from the menu.
setMinLength($value)
The minimum number of characters a user must type before a search is performed.
onFocus($jsCode)
Triggered when focus is moved to an item (not selecting).
Composant JQuery UI Position property.
$source
Project: doxygen-php-filters Author: Alex Schickedanz (AbcAeffchen) Date: 05.03.2015 License: GPL v2....