提交 65585f97 编写于 作者: K kohsuke

adding a mechanism to keep the tooltip. See...

adding a mechanism to keep the tooltip. See http://www.nabble.com/Build-failure-tf4612458.html#a13309217


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5366 71c3de6d-444a-0410-be80-ed276b4c234a
上级 86cb8b83
......@@ -290,11 +290,16 @@ var hudsonRules = {
form = null; // memory leak prevention
},
// hook up tooltip
// hook up tooltip.
// add nodismiss="" if you'd like to display the tooltip forever as long as the mouse is on the element.
"[tooltip]" : function(e) {
// copied from YAHOO.widget.Tooltip.prototype.configContext to efficiently add a new element
// event registration via YAHOO.util.Event.addListener leaks memory, so do it by ourselves here
e.onmouseover = function(ev) { return tooltip.onContextMouseOver.call(this,YAHOO.util.Event.getEvent(ev),tooltip); }
e.onmouseover = function(ev) {
var delay = this.getAttribute("nodismiss")!=null ? 99999999 : 5000;
tooltip.cfg.setProperty("autodismissdelay",delay);
return tooltip.onContextMouseOver.call(this,YAHOO.util.Event.getEvent(ev),tooltip);
}
e.onmousemove = function(ev) { return tooltip.onContextMouseMove.call(this,YAHOO.util.Event.getEvent(ev),tooltip); }
e.onmouseout = function(ev) { return tooltip.onContextMouseOut .call(this,YAHOO.util.Event.getEvent(ev),tooltip); }
e.title = e.getAttribute("tooltip");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册