| 1 |
define([ |
| 2 |
"dojo/_base/declare", |
| 3 |
"dojo/keys", |
| 4 |
"dojo/text!./templates/Menu.html", |
| 5 |
"./_MenuBase" |
| 6 |
], function(declare, keys, template, _MenuBase){ |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
return declare("dijit.DropDownMenu", _MenuBase, { |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
templateString: template, |
| 16 |
|
| 17 |
baseClass: "dijitMenu", |
| 18 |
|
| 19 |
|
| 20 |
_onUpArrow: function(){ |
| 21 |
this.focusPrev(); |
| 22 |
}, |
| 23 |
_onDownArrow: function(){ |
| 24 |
this.focusNext(); |
| 25 |
}, |
| 26 |
_onRightArrow: function( evt){ |
| 27 |
this._moveToPopup(evt); |
| 28 |
evt.stopPropagation(); |
| 29 |
evt.preventDefault(); |
| 30 |
}, |
| 31 |
_onLeftArrow: function( 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 |
}); |