diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index cddd5cc557e..0fd1b1b8423 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -59,7 +59,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt $("#'.$htmlname.'").trigger("change"); }); // Check when keyup - $("input#search_'.$htmlname.'").onDelayedKeyup({ handler: function() { + $("input#search_'.$htmlname.'").keyup(function() { //console.log(\'keyup\'); if ($(this).val().length == 0) { @@ -93,7 +93,6 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt }); } } - } }); $("input#search_'.$htmlname.'").autocomplete({ source: function( request, response ) { @@ -366,7 +365,7 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0) $("select#" + htmlname).html(response.value); }); } - + });'."\n"; $msg.= "\n"; diff --git a/htdocs/core/tpl/objectline_add.tpl.php b/htdocs/core/tpl/objectline_add.tpl.php index d27268be121..e26b684d405 100644 --- a/htdocs/core/tpl/objectline_add.tpl.php +++ b/htdocs/core/tpl/objectline_add.tpl.php @@ -521,8 +521,7 @@ $(document).ready(function() { }); }); - $('#product_desc').onDelayedKeyup({ - 'handler': function() { + $('#product_desc').keyup(function() { var addline=false; if ($('#idprod').val() == 0 && $('#select_type').val() >= 0 && $('#price_ht').val().length > 0) { var content = $('#product_desc').val(); @@ -537,7 +536,6 @@ $(document).ready(function() { } else { $('#addlinebutton').attr('disabled','disabled'); } - } }); diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index d48abbc0aa1..c9e8ded2e9e 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -348,8 +348,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 1) // TODO A virer }); }); - $('#product_desc').onDelayedKeyup({ - 'handler': function() { + $('#product_desc').keyup(function() { var addline=false; if ($('#product_id').val() == 0 && $('#select_type').val() >= 0 && $('#price_ht').val().length > 0) { var content = $('#product_desc').val(); @@ -364,7 +363,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 1) // TODO A virer } else { $('#savelinebutton').attr('disabled','disabled'); } - } });