<html>\r
<head>\r
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> \r
<title>The source code</title>\r
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
<pre class="prettyprint lang-js"><div id="cls-Ext.QuickTip"></div>/**\r
* @class Ext.QuickTip\r
* @extends Ext.ToolTip\r
+ * @xtype quicktip\r
* A specialized tooltip class for tooltips that can be specified in markup and automatically managed by the global\r
* {@link Ext.QuickTips} instance. See the QuickTips class header for additional usage details and examples.\r
* @constructor\r
this.clearTimer('show');\r
}\r
},\r
+ \r
+ getTipCfg: function(e) {\r
+ var t = e.getTarget(), \r
+ ttp, \r
+ cfg;\r
+ if(this.interceptTitles && t.title && Ext.isString(t.title)){\r
+ ttp = t.title;\r
+ t.qtip = ttp;\r
+ t.removeAttribute("title");\r
+ e.preventDefault();\r
+ }else{\r
+ cfg = this.tagConfig;\r
+ ttp = t.qtip || Ext.fly(t).getAttribute(cfg.attribute, cfg.namespace);\r
+ }\r
+ return ttp;\r
+ },\r
\r
// private\r
onTargetOver : function(e){\r
if(!t || t.nodeType !== 1 || t == document || t == document.body){\r
return;\r
}\r
- if(this.activeTarget && t == this.activeTarget.el){\r
+ if(this.activeTarget && ((t == this.activeTarget.el) || Ext.fly(this.activeTarget.el).contains(t))){\r
this.clearTimer('hide');\r
this.show();\r
return;\r
this.delayShow();\r
return;\r
}\r
- \r
- var ttp, et = Ext.fly(t), cfg = this.tagConfig;\r
- var ns = cfg.namespace;\r
- if(this.interceptTitles && t.title){\r
- ttp = t.title;\r
- t.qtip = ttp;\r
- t.removeAttribute("title");\r
- e.preventDefault();\r
- } else{\r
- ttp = t.qtip || et.getAttribute(cfg.attribute, ns);\r
- }\r
- if(ttp){\r
+ var ttp, et = Ext.fly(t), cfg = this.tagConfig, ns = cfg.namespace;\r
+ if(ttp = this.getTipCfg(e)){\r
var autoHide = et.getAttribute(cfg.hide, ns);\r
this.activeTarget = {\r
el: t,\r
\r
// private\r
onTargetOut : function(e){\r
+\r
+ // If moving within the current target, and it does not have a new tip, ignore the mouseout\r
+ if (this.activeTarget && e.within(this.activeTarget.el) && !this.getTipCfg(e)) {\r
+ return;\r
+ }\r
+\r
this.clearTimer('show');\r
if(this.autoHide !== false){\r
this.delayHide();\r
delete this.activeTarget;\r
Ext.QuickTip.superclass.hide.call(this);\r
}\r
-});</pre> \r
+});\r
+Ext.reg('quicktip', Ext.QuickTip);</pre> \r
</body>\r
</html>
\ No newline at end of file