Debian Codegraph @

dijit/DropDownMenu.js

raw symbols SCIP
1 define([
2 "dojo/_base/declare", // declare
3 "dojo/keys", // keys
4 "dojo/text!./templates/Menu.html",
5 "./_MenuBase"
6 ], function(declare, keys, template, _MenuBase){
7
8 // module:
9 // dijit/DropDownMenu
10
11 return declare("dijit.DropDownMenu", _MenuBase, {
12 // summary:
13 // A menu, without features for context menu (Meaning, drop down menu)
14
15 templateString: template,
16
17 baseClass: "dijitMenu",
18
19 // Arrow key navigation
20 _onUpArrow: function(){
21 this.focusPrev();
22 },
23 _onDownArrow: function(){
24 this.focusNext();
25 },
26 _onRightArrow: function(/*Event*/ evt){
27 this._moveToPopup(evt);
28 evt.stopPropagation();
29 evt.preventDefault();
30 },
31 _onLeftArrow: function(/*Event*/ evt){
32 if(this.parentMenu){
33 if(this.parentMenu._isMenuBar){
34 this.parentMenu.focusPrev();
35 }else{
36 this.onCancel(false);
37 }
38 }else{
39 evt.stopPropagation();
40 evt.preventDefault();
41 }
42 }
43 });
44 });