From 41c02512c7af351231f4ec280e146eef597be2db Mon Sep 17 00:00:00 2001 From: Hugues Peccatte Date: Sun, 14 Sep 2014 20:47:24 +0200 Subject: [PATCH] Code style improvements. Signed-off-by: Hugues Peccatte --- js/tbl_change.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/tbl_change.js b/js/tbl_change.js index bab668dbad..d73e4edc50 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -311,7 +311,7 @@ AJAX.registerOnload('tbl_change.js', function () { * available). */ $('select[name="submit_type"]').bind('change', function (e) { - var $thisElemSubmitTypeField = $(this); + var thisElemSubmitTypeVal = $(this).val(); var $table = $('table.insertRowTable'); var auto_increment_column = $table.find('input[name^="auto_increment"]'); auto_increment_column.each(function () { @@ -322,9 +322,9 @@ AJAX.registerOnload('tbl_change.js', function () { var value_field = $table.find('input[name="' + thisElemName.replace('auto_increment', 'fields') + '"]'); var previous_value = $(prev_value_field).val(); if (previous_value !== undefined) { - if ($thisElemSubmitTypeField.val() == 'insert' - || $thisElemSubmitTypeField.val() == 'insertignore' - || $thisElemSubmitTypeField.val() == 'showinsert' + if (thisElemSubmitTypeVal == 'insert' + || thisElemSubmitTypeVal == 'insertignore' + || thisElemSubmitTypeVal == 'showinsert' ) { $(value_field).val(0); } else {