Skip to content

Commit 585323c

Browse files
author
Sergey Shvets
committed
MAGETWO-55814: East team cadenece 3 PR
fixed javascript static test
1 parent 9512674 commit 585323c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

app/code/Magento/Catalog/view/adminhtml/web/catalog/product/attribute/unique-validate.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* See COPYING.txt for license details.
44
*/
55

6-
/* global $break $ $$ */
7-
86
define([
97
'jquery',
108
'mage/backend/validation'
@@ -14,28 +12,30 @@ define([
1412
return function (config) {
1513
var _config = jQuery.extend({
1614
element: null,
17-
message: "",
15+
message: '',
1816
uniqueClass: 'required-unique'
1917
}, config);
2018

21-
if (typeof _config.element === "string") {
19+
if (typeof _config.element === 'string') {
2220
jQuery.validator.addMethod(
2321
_config.element,
2422

2523
function (value, element) {
2624
var inputs = jQuery(element)
27-
.closest("table")
28-
.find('.' + _config.uniqueClass + ":visible"),
25+
.closest('table')
26+
.find('.' + _config.uniqueClass + ':visible'),
2927
valuesHash = {},
3028
isValid = true;
3129

3230
inputs.each(function (el) {
3331
var inputValue = inputs[el].value;
34-
if (typeof valuesHash[inputValue] !== "undefined") {
32+
33+
if (typeof valuesHash[inputValue] !== 'undefined') {
3534
isValid = false;
3635
}
3736
valuesHash[inputValue] = el;
3837
});
38+
3939
return isValid;
4040
},
4141

0 commit comments

Comments
 (0)