updated core from 8.4 to 8.5 : bug with login_destination

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-13 14:01:21 +01:00
parent 0d78da249b
commit e668535a4e
3486 changed files with 89604 additions and 33283 deletions
+28 -24
View File
@@ -6,27 +6,30 @@
**/
(function ($, Drupal) {
var states = Drupal.states = {
var states = {
postponed: []
};
Drupal.states = states;
Drupal.behaviors.states = {
attach: function attach(context, settings) {
var $states = $(context).find('[data-drupal-states]');
var config = void 0;
var state = void 0;
var il = $states.length;
var _loop = function _loop(i) {
var config = JSON.parse($states[i].getAttribute('data-drupal-states'));
Object.keys(config || {}).forEach(function (state) {
new states.Dependent({
element: $($states[i]),
state: states.State.sanitize(state),
constraints: config[state]
});
});
};
for (var i = 0; i < il; i++) {
config = JSON.parse($states[i].getAttribute('data-drupal-states'));
for (state in config) {
if (config.hasOwnProperty(state)) {
new states.Dependent({
element: $($states[i]),
state: states.State.sanitize(state),
constraints: config[state]
});
}
}
_loop(i);
}
while (states.postponed.length) {
@@ -36,14 +39,14 @@
};
states.Dependent = function (args) {
var _this = this;
$.extend(this, { values: {}, oldValue: null }, args);
this.dependees = this.getDependees();
for (var selector in this.dependees) {
if (this.dependees.hasOwnProperty(selector)) {
this.initializeDependee(selector, this.dependees[selector]);
}
}
Object.keys(this.dependees || {}).forEach(function (selector) {
_this.initializeDependee(selector, _this.dependees[selector]);
});
};
states.Dependent.comparisons = {
@@ -185,16 +188,16 @@
states.Trigger.prototype = {
initialize: function initialize() {
var _this2 = this;
var trigger = states.Trigger.states[this.state];
if (typeof trigger === 'function') {
trigger.call(window, this.element);
} else {
for (var event in trigger) {
if (trigger.hasOwnProperty(event)) {
this.defaultTrigger(event, trigger[event]);
}
}
Object.keys(trigger || {}).forEach(function (event) {
_this2.defaultTrigger(event, trigger[event]);
});
}
this.element.data('trigger:' + this.state, true);
@@ -259,7 +262,8 @@
};
states.State = function (state) {
this.pristine = this.name = state;
this.pristine = state;
this.name = state;
var process = true;
do {