|
@@ -109,7 +109,11 @@ trait CanCascadeFields
|
|
|
'has' => '8',
|
|
|
];
|
|
|
|
|
|
- return sprintf('cascade-%s-%s-%s', str_replace(' ', '-', $this->getElementClassString()), $value, $map[$operator]);
|
|
|
+ return str_replace(
|
|
|
+ '.',
|
|
|
+ '',
|
|
|
+ sprintf('cascade-%s-%s-%s', str_replace(' ', '-', $this->getElementClassString()), $value, $map[$operator])
|
|
|
+ );
|
|
|
}
|
|
|
|
|
|
protected function addCascadeScript()
|
|
@@ -152,26 +156,26 @@ JS
|
|
|
if (! $.isArray(b)) {
|
|
|
return operator_table[o](a, b)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (o === '!=') {
|
|
|
var result = true;
|
|
|
for (var i in b) {
|
|
|
if (! operator_table[o](a, b[i])) {
|
|
|
result = false;
|
|
|
-
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
for (var i in b) {
|
|
|
if (operator_table[o](a, b[i])) {
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
var operator_table = {
|
|
|
'=': function(a, b) {
|
|
|
if ($.isArray(a) && $.isArray(b)) {
|
|
@@ -181,10 +185,10 @@ JS
|
|
|
return String(a) === String(b);
|
|
|
},
|
|
|
'>': function(a, b) {
|
|
|
- return a > b;
|
|
|
+ return a > b;
|
|
|
},
|
|
|
'<': function(a, b) {
|
|
|
- return a < b;
|
|
|
+ return a < b;
|
|
|
},
|
|
|
'>=': function(a, b) { return a >= b; },
|
|
|
'<=': function(a, b) { return a <= b; },
|