updated core from 8.4 to 8.5 : bug with login_destination
This commit is contained in:
@@ -249,4 +249,18 @@
|
||||
Drupal.theme.contextualTrigger = function () {
|
||||
return '<button class="trigger visually-hidden focusable" type="button"></button>';
|
||||
};
|
||||
|
||||
/**
|
||||
* Bind Ajax contextual links when added.
|
||||
*
|
||||
* @param {jQuery.Event} event
|
||||
* The `drupalContextualLinkAdded` event.
|
||||
* @param {object} data
|
||||
* An object containing the data relevant to the event.
|
||||
*
|
||||
* @listens event:drupalContextualLinkAdded
|
||||
*/
|
||||
$(document).on('drupalContextualLinkAdded', (event, data) => {
|
||||
Drupal.ajax.bindAjaxLinks(data.$el[0]);
|
||||
});
|
||||
}(jQuery, Drupal, drupalSettings, _, Backbone, window.JSON, window.sessionStorage));
|
||||
|
||||
@@ -144,4 +144,8 @@
|
||||
Drupal.theme.contextualTrigger = function () {
|
||||
return '<button class="trigger visually-hidden focusable" type="button"></button>';
|
||||
};
|
||||
|
||||
$(document).on('drupalContextualLinkAdded', function (event, data) {
|
||||
Drupal.ajax.bindAjaxLinks(data.$el[0]);
|
||||
});
|
||||
})(jQuery, Drupal, drupalSettings, _, Backbone, window.JSON, window.sessionStorage);
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
const contextualToolbar = Drupal.contextualToolbar;
|
||||
const model = contextualToolbar.model = new contextualToolbar.StateModel({
|
||||
contextualToolbar.model = new contextualToolbar.StateModel({
|
||||
// Checks whether localStorage indicates we should start in edit mode
|
||||
// rather than view mode.
|
||||
// @see Drupal.contextualToolbar.VisualView.persist
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
const viewOptions = {
|
||||
el: $('.toolbar .toolbar-bar .contextual-toolbar-tab'),
|
||||
model,
|
||||
model: contextualToolbar.model,
|
||||
strings,
|
||||
};
|
||||
new contextualToolbar.VisualView(viewOptions);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
|
||||
var contextualToolbar = Drupal.contextualToolbar;
|
||||
var model = contextualToolbar.model = new contextualToolbar.StateModel({
|
||||
contextualToolbar.model = new contextualToolbar.StateModel({
|
||||
isViewing: localStorage.getItem('Drupal.contextualToolbar.isViewing') !== 'false'
|
||||
}, {
|
||||
contextualCollection: Drupal.contextual.collection
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
var viewOptions = {
|
||||
el: $('.toolbar .toolbar-bar .contextual-toolbar-tab'),
|
||||
model: model,
|
||||
model: contextualToolbar.model,
|
||||
strings: strings
|
||||
};
|
||||
new contextualToolbar.VisualView(viewOptions);
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
this.listenTo(this.model, 'change:isViewing', this.manageTabbing);
|
||||
|
||||
$(document).on('keyup', _.bind(this.onKeypress, this));
|
||||
this.manageTabbing();
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
this.listenTo(this.model, 'change:isViewing', this.manageTabbing);
|
||||
|
||||
$(document).on('keyup', _.bind(this.onKeypress, this));
|
||||
this.manageTabbing();
|
||||
},
|
||||
render: function render() {
|
||||
this.$el.find('button').attr('aria-pressed', !this.model.get('isViewing'));
|
||||
|
||||
Reference in New Issue
Block a user