2014-01-05 18:53:46 +00:00
|
|
|
/**
|
2017-05-19 22:12:53 +00:00
|
|
|
* DO NOT EDIT THIS FILE.
|
|
|
|
* See the following change record for more information,
|
2017-05-23 14:30:14 +00:00
|
|
|
* https://www.drupal.org/node/2815083
|
2017-05-19 22:12:53 +00:00
|
|
|
* @preserve
|
|
|
|
**/
|
2014-01-05 18:53:46 +00:00
|
|
|
|
|
|
|
(function (Backbone, Drupal) {
|
2017-05-19 22:12:53 +00:00
|
|
|
Drupal.toolbar.ToolbarModel = Backbone.Model.extend({
|
|
|
|
defaults: {
|
2014-01-27 21:41:32 +00:00
|
|
|
activeTab: null,
|
|
|
|
activeTray: null,
|
|
|
|
isOriented: false,
|
|
|
|
isFixed: false,
|
|
|
|
areSubtreesLoaded: false,
|
|
|
|
isViewportOverflowConstrained: false,
|
Issue #2542050 by droplet, nod_, dpacassi, Wim Leers, Sam152, andrewmacpherson, tameeshb, jonathanshaw, lokapujya, Daniel Schaefer, Chi, geerlingguy, tarekdj: Toolbar implementation creates super annoying re-rendering
2017-06-19 16:37:48 +00:00
|
|
|
orientation: 'horizontal',
|
2014-01-27 21:41:32 +00:00
|
|
|
locked: false,
|
Issue #2542050 by droplet, nod_, dpacassi, Wim Leers, Sam152, andrewmacpherson, tameeshb, jonathanshaw, lokapujya, Daniel Schaefer, Chi, geerlingguy, tarekdj: Toolbar implementation creates super annoying re-rendering
2017-06-19 16:37:48 +00:00
|
|
|
isTrayToggleVisible: true,
|
2014-01-27 21:41:32 +00:00
|
|
|
height: null,
|
|
|
|
offsets: {
|
|
|
|
top: 0,
|
|
|
|
right: 0,
|
|
|
|
bottom: 0,
|
|
|
|
left: 0
|
|
|
|
}
|
|
|
|
},
|
2017-05-19 22:12:53 +00:00
|
|
|
validate: function validate(attributes, options) {
|
2014-01-27 21:41:32 +00:00
|
|
|
if (attributes.orientation === 'horizontal' && this.get('locked') && !options.override) {
|
|
|
|
return Drupal.t('The toolbar cannot be set to a horizontal orientation when it is locked.');
|
|
|
|
}
|
2014-01-05 18:53:46 +00:00
|
|
|
}
|
2014-01-27 21:41:32 +00:00
|
|
|
});
|
2017-05-19 22:12:53 +00:00
|
|
|
})(Backbone, Drupal);
|