2014-01-05 18:53:46 +00:00
|
|
|
/**
|
2017-05-19 22:12:53 +00:00
|
|
|
* DO NOT EDIT THIS FILE.
|
|
|
|
* All changes should be applied to ./modules/toolbar/js/models/ToolbarModel.es6.js
|
|
|
|
* See the following change record for more information,
|
|
|
|
* https://www.drupal.org/node/2873849
|
|
|
|
* @preserve
|
|
|
|
**/
|
2014-01-05 18:53:46 +00:00
|
|
|
|
|
|
|
(function (Backbone, Drupal) {
|
|
|
|
|
2015-10-13 22:37:56 +00:00
|
|
|
'use strict';
|
2014-01-05 18:53:46 +00:00
|
|
|
|
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,
|
2015-06-06 15:55:42 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
activeTray: null,
|
2015-06-06 15:55:42 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
isOriented: false,
|
2015-06-06 15:55:42 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
isFixed: false,
|
2015-06-06 15:55:42 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
areSubtreesLoaded: false,
|
2015-06-06 15:55:42 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
isViewportOverflowConstrained: false,
|
2015-06-06 15:55:42 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
orientation: 'vertical',
|
2015-06-06 15:55:42 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
locked: false,
|
2015-06-06 15:55:42 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
isTrayToggleVisible: false,
|
2015-06-06 15:55:42 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
height: null,
|
2015-06-06 15:55:42 +00:00
|
|
|
|
2014-01-27 21:41:32 +00:00
|
|
|
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);
|