mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-03 06:55:03 +03:00
20 lines
444 B
JavaScript
20 lines
444 B
JavaScript
Autocompleter.Request.LS = {};
|
|
|
|
Autocompleter.Request.LS.JSON = new Class({
|
|
|
|
Extends: Autocompleter.Request,
|
|
|
|
initialize: function(el, url, options) {
|
|
this.parent(el, options);
|
|
this.request = new Request.JSON($merge({
|
|
'url': url,
|
|
'link': 'cancel'
|
|
}, this.options.ajaxOptions)).addEvent('onComplete', this.queryResponse.bind(this));
|
|
},
|
|
|
|
queryResponse: function(response) {
|
|
this.parent();
|
|
this.update(response.aItems);
|
|
}
|
|
|
|
}); |