2 'url:dijit/templates/Menu.html':"<table class=\"dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable\" role=\"menu\" tabIndex=\"${tabIndex}\"\n\t data-dojo-attach-event=\"onkeypress:_onKeyPress\" cellspacing=\"0\">\n\t<tbody class=\"dijitReset\" data-dojo-attach-point=\"containerNode\"></tbody>\n</table>\n"}});
3 define("dijit/DropDownMenu", [
4 "dojo/_base/declare", // declare
5 "dojo/_base/event", // event.stop
7 "dojo/text!./templates/Menu.html",
8 "./_OnDijitClickMixin",
10 ], function(declare, event, keys, template, _OnDijitClickMixin, _MenuBase){
15 return declare("dijit.DropDownMenu", [_MenuBase, _OnDijitClickMixin], {
17 // A menu, without features for context menu (Meaning, drop down menu)
19 templateString: template,
21 baseClass: "dijitMenu",
23 postCreate: function(){
24 this.inherited(arguments);
25 var l = this.isLeftToRight();
26 this._openSubMenuKey = l ? keys.RIGHT_ARROW : keys.LEFT_ARROW;
27 this._closeSubMenuKey = l ? keys.LEFT_ARROW : keys.RIGHT_ARROW;
28 this.connectKeyNavHandlers([keys.UP_ARROW], [keys.DOWN_ARROW]);
31 _onKeyPress: function(/*Event*/ evt){
33 // Handle keyboard based menu navigation.
37 if(evt.ctrlKey || evt.altKey){ return; }
39 switch(evt.charOrCode){
40 case this._openSubMenuKey:
41 this._moveToPopup(evt);
44 case this._closeSubMenuKey:
46 if(this.parentMenu._isMenuBar){
47 this.parentMenu.focusPrev();