X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..f5240829880f87e0cf581c6a296e436fdef0ef80:/src/widgets/menu/Menu.js?ds=sidebyside diff --git a/src/widgets/menu/Menu.js b/src/widgets/menu/Menu.js index 3915d600..71bbbbdb 100644 --- a/src/widgets/menu/Menu.js +++ b/src/widgets/menu/Menu.js @@ -1,5 +1,5 @@ /*! - * Ext JS Library 3.2.0 + * Ext JS Library 3.3.0 * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license @@ -294,7 +294,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { var items = this.items; for(var i = start, len = items.length; i >= 0 && i < len; i+= step){ var item = items.get(i); - if(!item.disabled && (item.canActivate || item.isFormField)){ + if(item.isVisible() && !item.disabled && (item.canActivate || item.isFormField)){ this.setActiveItem(item, false); return item; } @@ -549,8 +549,8 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { return c; }, - applyDefaults : function(c){ - if(!Ext.isString(c)){ + applyDefaults : function(c) { + if (!Ext.isString(c)) { c = Ext.menu.Menu.superclass.applyDefaults.call(this, c); var d = this.internalDefaults; if(d){ @@ -566,10 +566,10 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { }, // private - getMenuItem : function(config){ - if(!config.isXType){ - if(!config.xtype && Ext.isBoolean(config.checked)){ - return new Ext.menu.CheckItem(config) + getMenuItem : function(config) { + if (!config.isXType) { + if (!config.xtype && Ext.isBoolean(config.checked)) { + return new Ext.menu.CheckItem(config); } return Ext.create(config, this.defaultType); } @@ -580,7 +580,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { * Adds a separator bar to the menu * @return {Ext.menu.Item} The menu item that was added */ - addSeparator : function(){ + addSeparator : function() { return this.add(new Ext.menu.Separator()); }, @@ -589,7 +589,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { * @param {Mixed} el The element or DOM node to add, or its id * @return {Ext.menu.Item} The menu item that was added */ - addElement : function(el){ + addElement : function(el) { return this.add(new Ext.menu.BaseItem({ el: el })); @@ -600,7 +600,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { * @param {Ext.menu.Item} item The menu item to add * @return {Ext.menu.Item} The menu item that was added */ - addItem : function(item){ + addItem : function(item) { return this.add(item); }, @@ -609,7 +609,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { * @param {Object} config A MenuItem config object * @return {Ext.menu.Item} The menu item that was added */ - addMenuItem : function(config){ + addMenuItem : function(config) { return this.add(this.getMenuItem(config)); },