comparison core/modules/toolbar/js/models/ToolbarModel.js @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 /**
2 * DO NOT EDIT THIS FILE.
3 * See the following change record for more information,
4 * https://www.drupal.org/node/2815083
5 * @preserve
6 **/
7
8 (function (Backbone, Drupal) {
9 Drupal.toolbar.ToolbarModel = Backbone.Model.extend({
10 defaults: {
11 activeTab: null,
12
13 activeTray: null,
14
15 isOriented: false,
16
17 isFixed: false,
18
19 areSubtreesLoaded: false,
20
21 isViewportOverflowConstrained: false,
22
23 orientation: 'horizontal',
24
25 locked: false,
26
27 isTrayToggleVisible: true,
28
29 height: null,
30
31 offsets: {
32 top: 0,
33 right: 0,
34 bottom: 0,
35 left: 0
36 }
37 },
38
39 validate: function validate(attributes, options) {
40 if (attributes.orientation === 'horizontal' && this.get('locked') && !options.override) {
41 return Drupal.t('The toolbar cannot be set to a horizontal orientation when it is locked.');
42 }
43 }
44 });
45 })(Backbone, Drupal);