From f0cfe83e3725f9a3928da97a6e3085e79cb25309 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 18 Mar 2013 10:26:24 +0400 Subject: upgrade dojo to 1.8.3 (refs #570) --- lib/dijit/DropDownMenu.js.uncompressed.js | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 lib/dijit/DropDownMenu.js.uncompressed.js (limited to 'lib/dijit/DropDownMenu.js.uncompressed.js') diff --git a/lib/dijit/DropDownMenu.js.uncompressed.js b/lib/dijit/DropDownMenu.js.uncompressed.js new file mode 100644 index 000000000..0d5234c98 --- /dev/null +++ b/lib/dijit/DropDownMenu.js.uncompressed.js @@ -0,0 +1,58 @@ +require({cache:{ +'url:dijit/templates/Menu.html':"\n\t\n
\n"}}); +define("dijit/DropDownMenu", [ + "dojo/_base/declare", // declare + "dojo/_base/event", // event.stop + "dojo/keys", // keys + "dojo/text!./templates/Menu.html", + "./_OnDijitClickMixin", + "./_MenuBase" +], function(declare, event, keys, template, _OnDijitClickMixin, _MenuBase){ + + // module: + // dijit/DropDownMenu + + return declare("dijit.DropDownMenu", [_MenuBase, _OnDijitClickMixin], { + // summary: + // A menu, without features for context menu (Meaning, drop down menu) + + templateString: template, + + baseClass: "dijitMenu", + + postCreate: function(){ + this.inherited(arguments); + var l = this.isLeftToRight(); + this._openSubMenuKey = l ? keys.RIGHT_ARROW : keys.LEFT_ARROW; + this._closeSubMenuKey = l ? keys.LEFT_ARROW : keys.RIGHT_ARROW; + this.connectKeyNavHandlers([keys.UP_ARROW], [keys.DOWN_ARROW]); + }, + + _onKeyPress: function(/*Event*/ evt){ + // summary: + // Handle keyboard based menu navigation. + // tags: + // protected + + if(evt.ctrlKey || evt.altKey){ return; } + + switch(evt.charOrCode){ + case this._openSubMenuKey: + this._moveToPopup(evt); + event.stop(evt); + break; + case this._closeSubMenuKey: + if(this.parentMenu){ + if(this.parentMenu._isMenuBar){ + this.parentMenu.focusPrev(); + }else{ + this.onCancel(false); + } + }else{ + event.stop(evt); + } + break; + } + } + }); +}); -- cgit v1.2.3