diff options
author | Marc Delisle <marc@infomarc.info> | 2015-04-21 16:47:18 +0300 |
---|---|---|
committer | Marc Delisle <marc@infomarc.info> | 2015-04-21 16:47:18 +0300 |
commit | 5c3b9c604f192368907a54adb3f290dea3fddf5e (patch) | |
tree | 0054438f02e7da85cfa0640b3d5c2dc6f2504533 /js/tbl_change.js | |
parent | 8d8b2677db0db52fdaab33bef2c8b116c1d27662 (diff) |
Fix JSHint warnings
Signed-off-by: Marc Delisle <marc@infomarc.info>
Diffstat (limited to 'js/tbl_change.js')
-rw-r--r-- | js/tbl_change.js | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/js/tbl_change.js b/js/tbl_change.js index 07df7a7418..fc3a8a35ba 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -245,15 +245,21 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType) min: { param: mini, depends: function() { - if (isNaN($this_input.val())) return false; - else return checkForCheckbox(multi_edit); + if (isNaN($this_input.val())) { + return false; + } else { + return checkForCheckbox(multi_edit); + } } }, max: { param: maxi, depends: function() { - if (isNaN($this_input.val())) return false; - else return checkForCheckbox(multi_edit); + if (isNaN($this_input.val())) { + return false; + } else { + return checkForCheckbox(multi_edit); + } } } }); @@ -284,7 +290,9 @@ function verificationsAfterFieldChange(urlField, multi_edit, theType) } }); } - if (removeOnclick === 1) $this_input.removeAttr('onchange'); + if (removeOnclick === 1) { + $this_input.removeAttr('onchange'); + } } } /* End of fields validation*/ @@ -371,20 +379,21 @@ AJAX.registerOnload('tbl_change.js', function () { jQuery.validator.addMethod("validationFunctionForHex", function(value, element) { if (value.match(/^[a-f0-9]*$/i) === null) { return false; + } else { + return true; } - else return true; }); jQuery.validator.addMethod("validationFunctionForFuns", function(value, element, options) { if (value.substring(0, 3) === "AES" && options.data('type') !== 'HEX') { return false; - } - else if (value.substring(0, 3) === "MD5" + } else if (value.substring(0, 3) === "MD5" && typeof options.data('maxlength') !== 'undefined' && options.data('maxlength') < 32) { return false; + } else { + return true; } - else return true; }); jQuery.validator.addMethod("validationFunctionForDateTime", function(value, element, options) { |