updated core to 8.6.3

This commit is contained in:
2018-11-21 12:49:46 +01:00
parent 8ca34853a3
commit c92c348eee
521 changed files with 12199 additions and 4578 deletions
+21 -8
View File
@@ -24,6 +24,17 @@
return typeof a === 'undefined' || typeof b === 'undefined';
}
function ternary(a, b) {
if (typeof a === 'undefined') {
return b;
}
if (typeof b === 'undefined') {
return a;
}
return a && b;
}
Drupal.behaviors.states = {
attach: function attach(context, settings) {
var $states = $(context).find('[data-drupal-states]');
@@ -127,8 +138,6 @@
}
},
verifyConstraints: function verifyConstraints(constraints, selector) {
var _this3 = this;
var result = void 0;
if ($.isArray(constraints)) {
var hasXor = $.inArray('xor', constraints) === -1;
@@ -144,11 +153,15 @@
}
}
} else if ($.isPlainObject(constraints)) {
result = Object.keys(constraints).every(function (constraint) {
var check = _this3.checkConstraints(constraints[constraint], selector, constraint);
for (var n in constraints) {
if (constraints.hasOwnProperty(n)) {
result = ternary(result, this.checkConstraints(constraints[n], selector, n));
return typeof check === 'undefined' ? true : check;
});
if (result === false) {
return false;
}
}
}
}
return result;
},
@@ -197,7 +210,7 @@
states.Trigger.prototype = {
initialize: function initialize() {
var _this4 = this;
var _this3 = this;
var trigger = states.Trigger.states[this.state];
@@ -205,7 +218,7 @@
trigger.call(window, this.element);
} else {
Object.keys(trigger || {}).forEach(function (event) {
_this4.defaultTrigger(event, trigger[event]);
_this3.defaultTrigger(event, trigger[event]);
});
}