Mercurial > hg > isophonics-drupal-site
annotate core/modules/toolbar/js/models/ToolbarModel.js @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 /** |
Chris@0 | 2 * DO NOT EDIT THIS FILE. |
Chris@0 | 3 * See the following change record for more information, |
Chris@0 | 4 * https://www.drupal.org/node/2815083 |
Chris@0 | 5 * @preserve |
Chris@0 | 6 **/ |
Chris@0 | 7 |
Chris@0 | 8 (function (Backbone, Drupal) { |
Chris@0 | 9 Drupal.toolbar.ToolbarModel = Backbone.Model.extend({ |
Chris@0 | 10 defaults: { |
Chris@0 | 11 activeTab: null, |
Chris@0 | 12 |
Chris@0 | 13 activeTray: null, |
Chris@0 | 14 |
Chris@0 | 15 isOriented: false, |
Chris@0 | 16 |
Chris@0 | 17 isFixed: false, |
Chris@0 | 18 |
Chris@0 | 19 areSubtreesLoaded: false, |
Chris@0 | 20 |
Chris@0 | 21 isViewportOverflowConstrained: false, |
Chris@0 | 22 |
Chris@0 | 23 orientation: 'horizontal', |
Chris@0 | 24 |
Chris@0 | 25 locked: false, |
Chris@0 | 26 |
Chris@0 | 27 isTrayToggleVisible: true, |
Chris@0 | 28 |
Chris@0 | 29 height: null, |
Chris@0 | 30 |
Chris@0 | 31 offsets: { |
Chris@0 | 32 top: 0, |
Chris@0 | 33 right: 0, |
Chris@0 | 34 bottom: 0, |
Chris@0 | 35 left: 0 |
Chris@0 | 36 } |
Chris@0 | 37 }, |
Chris@0 | 38 |
Chris@0 | 39 validate: function validate(attributes, options) { |
Chris@0 | 40 if (attributes.orientation === 'horizontal' && this.get('locked') && !options.override) { |
Chris@0 | 41 return Drupal.t('The toolbar cannot be set to a horizontal orientation when it is locked.'); |
Chris@0 | 42 } |
Chris@0 | 43 } |
Chris@0 | 44 }); |
Chris@0 | 45 })(Backbone, Drupal); |