Support for inline explanatory popups in problem XML
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
'mouseover.TooltipManager': this.showTooltip,
|
||||
'mousemove.TooltipManager': this.moveTooltip,
|
||||
'mouseout.TooltipManager': this.hideTooltip,
|
||||
'click.TooltipManager': this.hideTooltip
|
||||
'click.TooltipManager': this.click
|
||||
}, this.SELECTOR);
|
||||
},
|
||||
|
||||
@@ -68,6 +68,18 @@
|
||||
this.tooltipTimer = setTimeout(this.hide, 50);
|
||||
},
|
||||
|
||||
click: function(event) {
|
||||
var showOnClick = !!$(event.currentTarget).data('tooltip-show-on-click'); // Default is false
|
||||
if (showOnClick) {
|
||||
this.show();
|
||||
if (this.tooltipTimer) {
|
||||
clearTimeout(this.tooltipTimer);
|
||||
}
|
||||
} else {
|
||||
this.hideTooltip(event);
|
||||
}
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
this.tooltip.remove();
|
||||
// Unbind all delegated event handlers in the ".TooltipManager"
|
||||
|
||||
Reference in New Issue
Block a user