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
+16 -14
View File
@@ -46,26 +46,27 @@
// Process the administrative toolbar.
$(context).find('#toolbar-administration').once('toolbar').each(function () {
// Establish the toolbar models and views.
const model = Drupal.toolbar.models.toolbarModel = new Drupal.toolbar.ToolbarModel({
const model = new Drupal.toolbar.ToolbarModel({
locked: JSON.parse(localStorage.getItem('Drupal.toolbar.trayVerticalLocked')),
activeTab: document.getElementById(JSON.parse(localStorage.getItem('Drupal.toolbar.activeTabID'))),
height: $('#toolbar-administration').outerHeight(),
});
Drupal.toolbar.models.toolbarModel = model;
// Attach a listener to the configured media query breakpoints.
// Executes it before Drupal.toolbar.views to avoid extra rendering.
for (const label in options.breakpoints) {
if (options.breakpoints.hasOwnProperty(label)) {
const mq = options.breakpoints[label];
const mql = Drupal.toolbar.mql[label] = window.matchMedia(mq);
// Curry the model and the label of the media query breakpoint to
// the mediaQueryChangeHandler function.
mql.addListener(Drupal.toolbar.mediaQueryChangeHandler.bind(null, model, label));
// Fire the mediaQueryChangeHandler for each configured breakpoint
// so that they process once.
Drupal.toolbar.mediaQueryChangeHandler.call(null, model, label, mql);
}
}
Object.keys(options.breakpoints).forEach((label) => {
const mq = options.breakpoints[label];
const mql = window.matchMedia(mq);
Drupal.toolbar.mql[label] = mql;
// Curry the model and the label of the media query breakpoint to
// the mediaQueryChangeHandler function.
mql.addListener(Drupal.toolbar.mediaQueryChangeHandler.bind(null, model, label));
// Fire the mediaQueryChangeHandler for each configured breakpoint
// so that they process once.
Drupal.toolbar.mediaQueryChangeHandler.call(null, model, label, mql);
});
Drupal.toolbar.views.toolbarVisualView = new Drupal.toolbar.ToolbarVisualView({
el: this,
@@ -88,7 +89,8 @@
model.trigger('change:activeTray', model, model.get('activeTray'));
// Render collapsible menus.
const menuModel = Drupal.toolbar.models.menuModel = new Drupal.toolbar.MenuModel();
const menuModel = new Drupal.toolbar.MenuModel();
Drupal.toolbar.models.menuModel = menuModel;
Drupal.toolbar.views.menuVisualView = new Drupal.toolbar.MenuVisualView({
el: $(this).find('.toolbar-menu-administration').get(0),
model: menuModel,
+12 -10
View File
@@ -26,22 +26,23 @@
}
$(context).find('#toolbar-administration').once('toolbar').each(function () {
var model = Drupal.toolbar.models.toolbarModel = new Drupal.toolbar.ToolbarModel({
var model = new Drupal.toolbar.ToolbarModel({
locked: JSON.parse(localStorage.getItem('Drupal.toolbar.trayVerticalLocked')),
activeTab: document.getElementById(JSON.parse(localStorage.getItem('Drupal.toolbar.activeTabID'))),
height: $('#toolbar-administration').outerHeight()
});
for (var label in options.breakpoints) {
if (options.breakpoints.hasOwnProperty(label)) {
var mq = options.breakpoints[label];
var mql = Drupal.toolbar.mql[label] = window.matchMedia(mq);
Drupal.toolbar.models.toolbarModel = model;
mql.addListener(Drupal.toolbar.mediaQueryChangeHandler.bind(null, model, label));
Object.keys(options.breakpoints).forEach(function (label) {
var mq = options.breakpoints[label];
var mql = window.matchMedia(mq);
Drupal.toolbar.mql[label] = mql;
Drupal.toolbar.mediaQueryChangeHandler.call(null, model, label, mql);
}
}
mql.addListener(Drupal.toolbar.mediaQueryChangeHandler.bind(null, model, label));
Drupal.toolbar.mediaQueryChangeHandler.call(null, model, label, mql);
});
Drupal.toolbar.views.toolbarVisualView = new Drupal.toolbar.ToolbarVisualView({
el: this,
@@ -61,7 +62,8 @@
model.trigger('change:isFixed', model, model.get('isFixed'));
model.trigger('change:activeTray', model, model.get('activeTray'));
var menuModel = Drupal.toolbar.models.menuModel = new Drupal.toolbar.MenuModel();
var menuModel = new Drupal.toolbar.MenuModel();
Drupal.toolbar.models.menuModel = menuModel;
Drupal.toolbar.views.menuVisualView = new Drupal.toolbar.MenuVisualView({
el: $(this).find('.toolbar-menu-administration').get(0),
model: menuModel,
@@ -23,14 +23,12 @@
render() {
const subtrees = this.model.get('subtrees');
// Add subtrees.
for (const id in subtrees) {
if (subtrees.hasOwnProperty(id)) {
this.$el
.find(`#toolbar-link-${id}`)
.once('toolbar-subtrees')
.after(subtrees[id]);
}
}
Object.keys(subtrees || {}).forEach((id) => {
this.$el
.find(`#toolbar-link-${id}`)
.once('toolbar-subtrees')
.after(subtrees[id]);
});
// Render the main menu as a nested, collapsible accordion.
if ('drupalToolbarMenu' in $.fn) {
this.$el
@@ -11,13 +11,13 @@
this.listenTo(this.model, 'change:subtrees', this.render);
},
render: function render() {
var _this = this;
var subtrees = this.model.get('subtrees');
for (var id in subtrees) {
if (subtrees.hasOwnProperty(id)) {
this.$el.find('#toolbar-link-' + id).once('toolbar-subtrees').after(subtrees[id]);
}
}
Object.keys(subtrees || {}).forEach(function (id) {
_this.$el.find('#toolbar-link-' + id).once('toolbar-subtrees').after(subtrees[id]);
});
if ('drupalToolbarMenu' in $.fn) {
this.$el.children('.toolbar-menu').drupalToolbarMenu();