Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023
This commit is contained in:
parent
2720a9ec4b
commit
f3791f1da3
1898 changed files with 54300 additions and 11481 deletions
|
@ -35,6 +35,9 @@
|
|||
* Modules register tabs with hook_toolbar().
|
||||
*
|
||||
* @type {Drupal~behavior}
|
||||
*
|
||||
* @prop {Drupal~behaviorAttach} attach
|
||||
* Attaches the toolbar rendering functionality to the toolbar element.
|
||||
*/
|
||||
Drupal.behaviors.toolbar = {
|
||||
attach: function (context) {
|
||||
|
@ -131,7 +134,7 @@
|
|||
// not the first 'Home' toolbar tab).
|
||||
if (Drupal.toolbar.models.toolbarModel.get('orientation') === 'horizontal' && Drupal.toolbar.models.toolbarModel.get('activeTab') === null) {
|
||||
Drupal.toolbar.models.toolbarModel.set({
|
||||
'activeTab': $('.toolbar-bar .toolbar-tab:not(.home-toolbar-tab) a').get(0)
|
||||
activeTab: $('.toolbar-bar .toolbar-tab:not(.home-toolbar-tab) a').get(0)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -181,38 +184,41 @@
|
|||
* Respond to configured narrow media query changes.
|
||||
*
|
||||
* @param {Drupal.toolbar.ToolbarModel} model
|
||||
* A toolbar model
|
||||
* @param {string} label
|
||||
* Media query label.
|
||||
* @param {object} mql
|
||||
* A MediaQueryList object.
|
||||
*/
|
||||
mediaQueryChangeHandler: function (model, label, mql) {
|
||||
switch (label) {
|
||||
case 'toolbar.narrow':
|
||||
model.set({
|
||||
'isOriented': mql.matches,
|
||||
'isTrayToggleVisible': false
|
||||
isOriented: mql.matches,
|
||||
isTrayToggleVisible: false
|
||||
});
|
||||
// If the toolbar doesn't have an explicit orientation yet, or if the
|
||||
// narrow media query doesn't match then set the orientation to
|
||||
// vertical.
|
||||
if (!mql.matches || !model.get('orientation')) {
|
||||
model.set({'orientation': 'vertical'}, {validate: true});
|
||||
model.set({orientation: 'vertical'}, {validate: true});
|
||||
}
|
||||
break;
|
||||
|
||||
case 'toolbar.standard':
|
||||
model.set({
|
||||
'isFixed': mql.matches
|
||||
isFixed: mql.matches
|
||||
});
|
||||
break;
|
||||
|
||||
case 'toolbar.wide':
|
||||
model.set({
|
||||
'orientation': ((mql.matches) ? 'horizontal' : 'vertical')
|
||||
orientation: ((mql.matches) ? 'horizontal' : 'vertical')
|
||||
}, {validate: true});
|
||||
// The tray orientation toggle visibility does not need to be
|
||||
// validated.
|
||||
model.set({
|
||||
'isTrayToggleVisible': mql.matches
|
||||
isTrayToggleVisible: mql.matches
|
||||
});
|
||||
break;
|
||||
|
||||
|
@ -238,8 +244,11 @@
|
|||
* Ajax command to set the toolbar subtrees.
|
||||
*
|
||||
* @param {Drupal.Ajax} ajax
|
||||
* {@link Drupal.Ajax} object created by {@link Drupal.ajax}.
|
||||
* @param {object} response
|
||||
* JSON response from the Ajax request.
|
||||
* @param {number} [status]
|
||||
* XMLHttpRequest status.
|
||||
*/
|
||||
Drupal.AjaxCommands.prototype.setToolbarSubtrees = function (ajax, response, status) {
|
||||
Drupal.toolbar.setSubtrees.resolve(response.subtrees);
|
||||
|
|
Reference in a new issue