mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 06:07:57 +01:00
fixing all popover, some hacks
This commit is contained in:
parent
4732b13196
commit
596d567ee4
@ -43,8 +43,20 @@ mindplot.LinkIcon = new Class({
|
||||
me._topic.showLinkEditor();
|
||||
event.stopPropagation();
|
||||
});
|
||||
//FIXME: we shouldn't have timeout of that..
|
||||
this.addEvent("mouseleave", function(event) {
|
||||
window.setTimeout(function() {
|
||||
if (!$("#linkPopover:hover").length) {
|
||||
me._tip.hide();
|
||||
}
|
||||
event.stopPropagation();
|
||||
}, 100)
|
||||
});
|
||||
}
|
||||
|
||||
$(this.getImage()._peer._native).mouseenter(function() {
|
||||
me._tip.show();
|
||||
})
|
||||
},
|
||||
|
||||
getModel:function () {
|
||||
|
@ -48,7 +48,8 @@ mindplot.NoteIcon = new Class({
|
||||
return me._buildTooltipContent();
|
||||
},
|
||||
html:true,
|
||||
placement:'bottom'
|
||||
placement:'bottom',
|
||||
destroyOnExit: true
|
||||
});
|
||||
|
||||
},
|
||||
|
@ -28,7 +28,8 @@ mindplot.widget.FloatingTip = new Class({
|
||||
title: '',
|
||||
content: '',
|
||||
delay: 0,
|
||||
container: false
|
||||
container: false,
|
||||
destroyOnExit: false
|
||||
},
|
||||
|
||||
initialize: function (element, options) {
|
||||
@ -41,10 +42,12 @@ mindplot.widget.FloatingTip = new Class({
|
||||
_createPopover: function() {
|
||||
this.element.popover(this.options);
|
||||
var me = this;
|
||||
if (this.options.destroyOnExit) {
|
||||
this.element.one('hidden.bs.popover', function() {
|
||||
me.element.popover('destroy');
|
||||
me._createPopover();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
show: function () {
|
||||
|
@ -30,14 +30,8 @@ mindplot.widget.LinkIconTooltip = new Class({
|
||||
container: 'body',
|
||||
title: $msg('LINK'),
|
||||
trigger: "manual",
|
||||
template: '<div class="popover" onmouseover="$(this).mouseleave(function() {$(this).hide(); });" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
||||
template: '<div id="linkPopover" class="popover" onmouseover="$(this).mouseleave(function() {$(this).fadeOut(200); });" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
|
||||
});
|
||||
var me = this;
|
||||
nativeElement.mouseenter(
|
||||
function() {
|
||||
me.show();
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
_buildContent:function (linkIcon) {
|
||||
|
Loading…
Reference in New Issue
Block a user