X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775:/docs/source/QuickTip.html diff --git a/docs/source/QuickTip.html b/docs/source/QuickTip.html index 6cd90d3d..10dfae77 100644 --- a/docs/source/QuickTip.html +++ b/docs/source/QuickTip.html @@ -1,13 +1,20 @@ - - - The source code - - - - -
/** + + + The source code + + + + +
/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+
/** * @class Ext.QuickTip * @extends Ext.ToolTip + * @xtype quicktip * A specialized tooltip class for tooltips that can be specified in markup and automatically managed by the global * {@link Ext.QuickTips} instance. See the QuickTips class header for additional usage details and examples. * @constructor @@ -97,6 +104,23 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, { } }, + // private + getTipCfg: function(e) { + var t = e.getTarget(), + ttp, + cfg; + if(this.interceptTitles && t.title){ + ttp = t.title; + t.qtip = ttp; + t.removeAttribute("title"); + e.preventDefault(); + }else{ + cfg = this.tagConfig; + ttp = t.qtip || Ext.fly(t).getAttribute(cfg.attribute, cfg.namespace); + } + return ttp; + }, + // private onTargetOver : function(e){ if(this.disabled){ @@ -107,7 +131,7 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, { if(!t || t.nodeType !== 1 || t == document || t == document.body){ return; } - if(this.activeTarget && t == this.activeTarget.el){ + if(this.activeTarget && ((t == this.activeTarget.el) || Ext.fly(this.activeTarget.el).contains(t))){ this.clearTimer('hide'); this.show(); return; @@ -122,18 +146,8 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, { this.delayShow(); return; } - - var ttp, et = Ext.fly(t), cfg = this.tagConfig; - var ns = cfg.namespace; - if(this.interceptTitles && t.title){ - ttp = t.title; - t.qtip = ttp; - t.removeAttribute("title"); - e.preventDefault(); - } else{ - ttp = t.qtip || et.getAttribute(cfg.attribute, ns); - } - if(ttp){ + var ttp, et = Ext.fly(t), cfg = this.tagConfig, ns = cfg.namespace; + if(ttp = this.getTipCfg(e)){ var autoHide = et.getAttribute(cfg.hide, ns); this.activeTarget = { el: t, @@ -155,6 +169,12 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, { // private onTargetOut : function(e){ + + // If moving within the current target, and it does not have a new tip, ignore the mouseout + if (this.activeTarget && e.within(this.activeTarget.el) && !this.getTipCfg(e)) { + return; + } + this.clearTimer('show'); if(this.autoHide !== false){ this.delayHide(); @@ -205,6 +225,7 @@ Ext.QuickTip = Ext.extend(Ext.ToolTip, { delete this.activeTarget; Ext.QuickTip.superclass.hide.call(this); } -});
- +}); +Ext.reg('quicktip', Ext.QuickTip);
+ \ No newline at end of file