Qual: Removed useless use of js

This commit is contained in:
Laurent Destailleur 2014-04-27 01:51:31 +02:00
parent ba9dc57912
commit 8beaf30e88
3 changed files with 4 additions and 9 deletions

View File

@ -59,7 +59,7 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
$("#'.$htmlname.'").trigger("change"); $("#'.$htmlname.'").trigger("change");
}); });
// Check when keyup // Check when keyup
$("input#search_'.$htmlname.'").onDelayedKeyup({ handler: function() { $("input#search_'.$htmlname.'").keyup(function() {
//console.log(\'keyup\'); //console.log(\'keyup\');
if ($(this).val().length == 0) if ($(this).val().length == 0)
{ {
@ -93,7 +93,6 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
}); });
} }
} }
}
}); });
$("input#search_'.$htmlname.'").autocomplete({ $("input#search_'.$htmlname.'").autocomplete({
source: function( request, response ) { source: function( request, response ) {

View File

@ -521,8 +521,7 @@ $(document).ready(function() {
}); });
}); });
<?php } else { ?> <?php } else { ?>
$('#product_desc').onDelayedKeyup({ $('#product_desc').keyup(function() {
'handler': function() {
var addline=false; var addline=false;
if ($('#idprod').val() == 0 && $('#select_type').val() >= 0 && $('#price_ht').val().length > 0) { if ($('#idprod').val() == 0 && $('#select_type').val() >= 0 && $('#price_ht').val().length > 0) {
var content = $('#product_desc').val(); var content = $('#product_desc').val();
@ -537,7 +536,6 @@ $(document).ready(function() {
} else { } else {
$('#addlinebutton').attr('disabled','disabled'); $('#addlinebutton').attr('disabled','disabled');
} }
}
}); });
<?php } ?> <?php } ?>

View File

@ -348,8 +348,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 1) // TODO A virer
}); });
}); });
<?php } else { ?> <?php } else { ?>
$('#product_desc').onDelayedKeyup({ $('#product_desc').keyup(function() {
'handler': function() {
var addline=false; var addline=false;
if ($('#product_id').val() == 0 && $('#select_type').val() >= 0 && $('#price_ht').val().length > 0) { if ($('#product_id').val() == 0 && $('#select_type').val() >= 0 && $('#price_ht').val().length > 0) {
var content = $('#product_desc').val(); var content = $('#product_desc').val();
@ -364,7 +363,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 1) // TODO A virer
} else { } else {
$('#savelinebutton').attr('disabled','disabled'); $('#savelinebutton').attr('disabled','disabled');
} }
}
}); });
<?php } ?> <?php } ?>