// }}} \r
,\r
unsetMenuBarState : function() { this.menuBarState = false },\r
+ changeMenuBarState: function (target) {\r
+ var parentId = target.id.replace(/[^0-9]/gi,'');\r
+ this.menuBarState = !this.menuBarState;\r
+ this.hideSubMenus();\r
+ if(this.menuBarState) {\r
+ this.__expandGroup(parentId);\r
+ }\r
+ },\r
// {{{ __setBasicEvents()\r
/**\r
* Set basic events for the menu widget.\r
*/ \r
__setBasicEvents : function()\r
{\r
- DHTMLSuite.commonObj.addEvent(document.documentElement,"click",this.hideSubMenus); \r
var menu = this;\r
- $(document).mousedown(function(){ menu.unsetMenuBarState(); });\r
+ $('div.DHTMLSuite_menuBar_sub').click(function() { menu.hideSubMenus(); menu.unsetMenuBarState() });\r
+ $('div.DHTMLSuite_menuBar_top > div > div[objectref!="0"]').click(function() { menu.changeMenuBarState(this) });\r
+ $('div.DHTMLSuite_menuBar_top').click(function(e) {\r
+ if ($(e.target).attr('class') == 'DHTMLSuite_menuBar_top') { menu.hideSubMenus(); menu.unsetMenuBarState() }\r
+ });\r
$('#win1').load(function(){\r
$('#win1').contents().mousedown(function(){\r
menu.hideSubMenus();\r