[256] | 1 | define([ |
---|
| 2 | "require", |
---|
| 3 | "dojo/_base/declare", // declare |
---|
| 4 | "dojo/_base/kernel", |
---|
| 5 | "dojo/keys", // keys.LEFT_ARROW keys.RIGHT_ARROW |
---|
| 6 | "dojo/ready", |
---|
| 7 | "./_Widget", |
---|
| 8 | "./_KeyNavContainer", |
---|
| 9 | "./_TemplatedMixin" |
---|
| 10 | ], function(require, declare, kernel, keys, ready, _Widget, _KeyNavContainer, _TemplatedMixin){ |
---|
| 11 | |
---|
| 12 | /*===== |
---|
| 13 | var _Widget = dijit._Widget; |
---|
| 14 | var _KeyNavContainer = dijit._KeyNavContainer; |
---|
| 15 | var _TemplatedMixin = dijit._TemplatedMixin; |
---|
| 16 | =====*/ |
---|
| 17 | |
---|
| 18 | // module: |
---|
| 19 | // dijit/Toolbar |
---|
| 20 | // summary: |
---|
| 21 | // A Toolbar widget, used to hold things like `dijit.Editor` buttons |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | // Back compat w/1.6, remove for 2.0 |
---|
| 25 | if(!kernel.isAsync){ |
---|
| 26 | ready(0, function(){ |
---|
| 27 | var requires = ["dijit/ToolbarSeparator"]; |
---|
| 28 | require(requires); // use indirection so modules not rolled into a build |
---|
| 29 | }); |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | return declare("dijit.Toolbar", [_Widget, _TemplatedMixin, _KeyNavContainer], { |
---|
| 33 | // summary: |
---|
| 34 | // A Toolbar widget, used to hold things like `dijit.Editor` buttons |
---|
| 35 | |
---|
| 36 | templateString: |
---|
| 37 | '<div class="dijit" role="toolbar" tabIndex="${tabIndex}" data-dojo-attach-point="containerNode">' + |
---|
| 38 | '</div>', |
---|
| 39 | |
---|
| 40 | baseClass: "dijitToolbar", |
---|
| 41 | |
---|
| 42 | postCreate: function(){ |
---|
| 43 | this.inherited(arguments); |
---|
| 44 | |
---|
| 45 | this.connectKeyNavHandlers( |
---|
| 46 | this.isLeftToRight() ? [keys.LEFT_ARROW] : [keys.RIGHT_ARROW], |
---|
| 47 | this.isLeftToRight() ? [keys.RIGHT_ARROW] : [keys.LEFT_ARROW] |
---|
| 48 | ); |
---|
| 49 | } |
---|
| 50 | }); |
---|
| 51 | }); |
---|