X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..f5240829880f87e0cf581c6a296e436fdef0ef80:/docs/source/MenuMgr.html diff --git a/docs/source/MenuMgr.html b/docs/source/MenuMgr.html index 28ba54df..7a17e299 100644 --- a/docs/source/MenuMgr.html +++ b/docs/source/MenuMgr.html @@ -1,12 +1,18 @@ - - - - The source code - - - - -
/** + + + + The source code + + + + +
/*!
+ * Ext JS Library 3.3.0
+ * Copyright(c) 2006-2010 Ext JS, Inc.
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Ext.menu.MenuMgr * Provides a common registry of all menu items on a page so that they can be easily accessed by id. * @singleton @@ -58,7 +64,7 @@ Ext.menu.MenuMgr = function(){ if(m.parentMenu){ m.getEl().setZIndex(parseInt(m.parentMenu.getEl().getStyle("z-index"), 10) + 3); m.parentMenu.activeChild = m; - }else if(last && last.isVisible()){ + }else if(last && !last.isDestroyed && last.isVisible()){ m.getEl().setZIndex(parseInt(last.getEl().getStyle("z-index"), 10) + 3); } } @@ -91,18 +97,6 @@ Ext.menu.MenuMgr = function(){ } } - // private - function onBeforeCheck(mi, state){ - if(state){ - var g = groups[mi.group]; - for(var i = 0, l = g.length; i < l; i++){ - if(g[i] != mi){ - g[i].setChecked(false); - } - } - } - } - return {
/** @@ -110,7 +104,7 @@ Ext.menu.MenuMgr = function(){ * @return {Boolean} success True if any active menus were hidden. */ hideAll : function(){ - return hideAll(); + return hideAll(); }, // private @@ -165,7 +159,6 @@ Ext.menu.MenuMgr = function(){ groups[g] = []; } groups[g].push(menuItem); - menuItem.on("beforecheckchange", onBeforeCheck); } }, @@ -174,7 +167,23 @@ Ext.menu.MenuMgr = function(){ var g = menuItem.group; if(g){ groups[g].remove(menuItem); - menuItem.un("beforecheckchange", onBeforeCheck); + } + }, + + // private + onCheckChange: function(item, state){ + if(item.group && state){ + var group = groups[item.group], + i = 0, + len = group.length, + current; + + for(; i < len; i++){ + current = group[i]; + if(current != item){ + current.setChecked(false); + } + } } }, @@ -203,6 +212,6 @@ Ext.menu.MenuMgr = function(){ } }; }(); -
- +
+ \ No newline at end of file