MenuBar.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //>>built
  2. require({cache:{"url:dijit/templates/MenuBar.html":"<div class=\"dijitMenuBar dijitMenuPassive\" data-dojo-attach-point=\"containerNode\" role=\"menubar\" tabIndex=\"${tabIndex}\"\n\t ></div>\n"}});
  3. define("dijit/MenuBar",["dojo/_base/declare","dojo/keys","./_MenuBase","dojo/text!./templates/MenuBar.html"],function(_1,_2,_3,_4){
  4. return _1("dijit.MenuBar",_3,{templateString:_4,baseClass:"dijitMenuBar",popupDelay:0,_isMenuBar:true,_orient:["below"],_moveToPopup:function(_5){
  5. if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled){
  6. this.onItemClick(this.focusedChild,_5);
  7. }
  8. },focusChild:function(_6){
  9. this.inherited(arguments);
  10. if(this.activated&&_6.popup&&!_6.disabled){
  11. this._openItemPopup(_6,true);
  12. }
  13. },_onChildDeselect:function(_7){
  14. if(this.currentPopupItem==_7){
  15. this.currentPopupItem=null;
  16. _7._closePopup();
  17. }
  18. this.inherited(arguments);
  19. },_onLeftArrow:function(){
  20. this.focusPrev();
  21. },_onRightArrow:function(){
  22. this.focusNext();
  23. },_onDownArrow:function(_8){
  24. this._moveToPopup(_8);
  25. },_onUpArrow:function(){
  26. },onItemClick:function(_9,_a){
  27. if(_9.popup&&_9.popup.isShowingNow&&(!/^key/.test(_a.type)||_a.keyCode!==_2.DOWN_ARROW)){
  28. _9.focusNode.focus();
  29. this._cleanUp(true);
  30. }else{
  31. this.inherited(arguments);
  32. }
  33. }});
  34. });