Skip to content

Commit 7f124c6

Browse files
committed
MAGETWO-71425: Product list configuration with Magento Condition Tree
- Updated js to remove prototype - Fixed static errors
1 parent 9ee357f commit 7f124c6

File tree

2 files changed

+15
-21
lines changed

2 files changed

+15
-21
lines changed

app/code/Magento/Rule/view/adminhtml/web/conditions-data-normalizer.js

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,24 @@
55

66
define([
77
'jquery',
8-
'underscore',
9-
'prototype'
8+
'underscore'
109
], function ($, _) {
1110
'use strict';
1211

13-
var ConditionsDataNormalizer = new Class.create();
12+
/**
13+
* @constructor
14+
*/
15+
var ConditionsDataNormalizer = function () {
16+
this.patterns = {
17+
validate: /^[a-z0-9_-][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_-]+)\])*$/i,
18+
key: /[a-z0-9_-]+|(?=\[\])/gi,
19+
push: /^$/,
20+
fixed: /^\d+$/,
21+
named: /^[a-z0-9_-]+$/i
22+
};
23+
};
1424

1525
ConditionsDataNormalizer.prototype = {
16-
17-
/**
18-
* Initializes component.
19-
*/
20-
initialize: function () {
21-
this.patterns = {
22-
validate: /^[a-z0-9_-][a-z0-9_-]*(?:\[(?:\d*|[a-z0-9_-]+)\])*$/i,
23-
key: /[a-z0-9_-]+|(?=\[\])/gi,
24-
push: /^$/,
25-
fixed: /^\d+$/,
26-
named: /^[a-z0-9_-]+$/i
27-
};
28-
},
29-
3026
/**
3127
* Will convert an object:
3228
* {
@@ -49,8 +45,6 @@ define([
4945
* }
5046
* }
5147
* }
52-
*
53-
*
5448
*/
5549
normalize: function normalize(value) {
5650
var el, _this = this;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
theme * /
2-
library * /
1+
# Format: <componentType=module|library|theme|language|*> <componentName> <globPattern> or simply <globPattern>
2+
* * /

0 commit comments

Comments
 (0)