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
+27 -29
View File
@@ -19,15 +19,15 @@ window.Drupal = { behaviors: {}, locale: {} };
settings = settings || drupalSettings;
var behaviors = Drupal.behaviors;
for (var i in behaviors) {
if (behaviors.hasOwnProperty(i) && typeof behaviors[i].attach === 'function') {
Object.keys(behaviors || {}).forEach(function (i) {
if (typeof behaviors[i].attach === 'function') {
try {
behaviors[i].attach(context, settings);
} catch (e) {
Drupal.throwError(e);
}
}
}
});
};
Drupal.detachBehaviors = function (context, settings, trigger) {
@@ -36,42 +36,40 @@ window.Drupal = { behaviors: {}, locale: {} };
trigger = trigger || 'unload';
var behaviors = Drupal.behaviors;
for (var i in behaviors) {
if (behaviors.hasOwnProperty(i) && typeof behaviors[i].detach === 'function') {
Object.keys(behaviors || {}).forEach(function (i) {
if (typeof behaviors[i].detach === 'function') {
try {
behaviors[i].detach(context, settings, trigger);
} catch (e) {
Drupal.throwError(e);
}
}
}
});
};
Drupal.checkPlain = function (str) {
str = str.toString().replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
str = str.toString().replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;');
return str;
};
Drupal.formatString = function (str, args) {
var processedArgs = {};
for (var key in args) {
if (args.hasOwnProperty(key)) {
switch (key.charAt(0)) {
case '@':
processedArgs[key] = Drupal.checkPlain(args[key]);
break;
Object.keys(args || {}).forEach(function (key) {
switch (key.charAt(0)) {
case '@':
processedArgs[key] = Drupal.checkPlain(args[key]);
break;
case '!':
processedArgs[key] = args[key];
break;
case '!':
processedArgs[key] = args[key];
break;
default:
processedArgs[key] = Drupal.theme('placeholder', args[key]);
break;
}
default:
processedArgs[key] = Drupal.theme('placeholder', args[key]);
break;
}
}
});
return Drupal.stringReplace(str, processedArgs, null);
};
@@ -82,12 +80,7 @@ window.Drupal = { behaviors: {}, locale: {} };
}
if (!Array.isArray(keys)) {
keys = [];
for (var k in args) {
if (args.hasOwnProperty(k)) {
keys.push(k);
}
}
keys = Object.keys(args || {});
keys.sort(function (a, b) {
return a.length - b.length;
@@ -181,9 +174,14 @@ window.Drupal = { behaviors: {}, locale: {} };
};
Drupal.theme = function (func) {
var args = Array.prototype.slice.apply(arguments, [1]);
if (func in Drupal.theme) {
return Drupal.theme[func].apply(this, args);
var _Drupal$theme;
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return (_Drupal$theme = Drupal.theme)[func].apply(_Drupal$theme, args);
}
};