X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6e39d509471fe9b4e2660e0d1631b350d0c66f40..92c2b89db26be16707f4a805d3303ab2531006e1:/docs/source/Button.html?ds=inline diff --git a/docs/source/Button.html b/docs/source/Button.html index 91c997d6..c2ff572e 100644 --- a/docs/source/Button.html +++ b/docs/source/Button.html @@ -438,7 +438,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { if(this.rendered){ this.clearTip(); } - if(this.menu && this.menu.autoDestroy) { + if(this.menu && this.destroyMenu !== false) { Ext.destroy(this.menu); } Ext.destroy(this.repeater); @@ -453,6 +453,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { delete this.btnEl; Ext.ButtonToggleMgr.unregister(this); } + Ext.Button.superclass.onDestroy.call(this); }, // private @@ -583,6 +584,10 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { if(this.tooltip){ Ext.QuickTips.getQuickTip().cancelShow(this.btnEl); } + if(this.menu.isVisible()){ + this.menu.hide(); + } + this.menu.ownerCt = this; this.menu.show(this.el, this.menuAlign); } return this; @@ -592,7 +597,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { * Hide this button's menu (if it has one) */ hideMenu : function(){ - if(this.menu){ + if(this.hasVisibleMenu()){ this.menu.hide(); } return this; @@ -603,7 +608,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { * @return {Boolean} */ hasVisibleMenu : function(){ - return this.menu && this.menu.isVisible(); + return this.menu && this.menu.ownerCt == this && this.menu.isVisible(); }, // private @@ -618,7 +623,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { if(this.enableToggle && (this.allowDepress !== false || !this.pressed)){ this.toggle(); } - if(this.menu && !this.menu.isVisible() && !this.ignoreNextClick){ + if(this.menu && !this.hasVisibleMenu() && !this.ignoreNextClick){ this.showMenu(); } this.fireEvent('click', this, e); @@ -718,17 +723,21 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { }, // private onMenuShow : function(e){ - this.menu.ownerCt = this; - this.ignoreNextClick = 0; - this.el.addClass('x-btn-menu-active'); - this.fireEvent('menushow', this, this.menu); + if(this.menu.ownerCt == this){ + this.menu.ownerCt = this; + this.ignoreNextClick = 0; + this.el.addClass('x-btn-menu-active'); + this.fireEvent('menushow', this, this.menu); + } }, // private onMenuHide : function(e){ - this.el.removeClass('x-btn-menu-active'); - this.ignoreNextClick = this.restoreClick.defer(250, this); - this.fireEvent('menuhide', this, this.menu); - delete this.menu.ownerCt; + if(this.menu.ownerCt == this){ + this.el.removeClass('x-btn-menu-active'); + this.ignoreNextClick = this.restoreClick.defer(250, this); + this.fireEvent('menuhide', this, this.menu); + delete this.menu.ownerCt; + } }, // private @@ -739,6 +748,21 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { /** * @cfg {String} autoEl @hide */ + /** + * @cfg {String/Object} html @hide + */ + /** + * @cfg {String} contentEl @hide + */ + /** + * @cfg {Mixed} data @hide + */ + /** + * @cfg {Mixed} tpl @hide + */ + /** + * @cfg {String} tplWriteMode @hide + */ }); Ext.reg('button', Ext.Button);