source: Dev/trunk/src/client/dijit/DropDownMenu.js @ 536

Last change on this file since 536 was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

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