2
0
forked from Wavyzz/dolibarr

New: [ task #498 ]

This commit is contained in:
Regis Houssin
2012-08-22 17:42:40 +02:00
parent 545cb023ff
commit 2ae1d3d3b5
17 changed files with 751 additions and 245 deletions

View File

@@ -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);