forked from Wavyzz/dolibarr
New: [ task #498 ]
This commit is contained in:
@@ -731,3 +731,26 @@ function hideMessage(fieldId,message) {
|
||||
}
|
||||
});
|
||||
})( jQuery );
|
||||
|
||||
/*
|
||||
* Timer for delayed keyup function
|
||||
*/
|
||||
(function($){
|
||||
$.widget("ui.onDelayedKeyup", {
|
||||
_init : function() {
|
||||
var self = this;
|
||||
$(this.element).keyup(function() {
|
||||
if(typeof(window['inputTimeout']) != "undefined"){
|
||||
window.clearTimeout(inputTimeout);
|
||||
}
|
||||
var handler = self.options.handler;
|
||||
window['inputTimeout'] = window.setTimeout(function() { handler.call(self.element) }, self.options.delay);
|
||||
});
|
||||
},
|
||||
options: {
|
||||
handler: $.noop(),
|
||||
delay: 500
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user