mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-23 20:03:48 +01:00
fixing all popover, some hacks
This commit is contained in:
parent
15c13a8f4f
commit
bd3f1b39b2
@ -43,8 +43,20 @@ mindplot.LinkIcon = new Class({
|
|||||||
me._topic.showLinkEditor();
|
me._topic.showLinkEditor();
|
||||||
event.stopPropagation();
|
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 () {
|
getModel:function () {
|
||||||
|
@ -48,7 +48,8 @@ mindplot.NoteIcon = new Class({
|
|||||||
return me._buildTooltipContent();
|
return me._buildTooltipContent();
|
||||||
},
|
},
|
||||||
html:true,
|
html:true,
|
||||||
placement:'bottom'
|
placement:'bottom',
|
||||||
|
destroyOnExit: true
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -28,7 +28,8 @@ mindplot.widget.FloatingTip = new Class({
|
|||||||
title: '',
|
title: '',
|
||||||
content: '',
|
content: '',
|
||||||
delay: 0,
|
delay: 0,
|
||||||
container: false
|
container: false,
|
||||||
|
destroyOnExit: false
|
||||||
},
|
},
|
||||||
|
|
||||||
initialize: function (element, options) {
|
initialize: function (element, options) {
|
||||||
@ -41,10 +42,12 @@ mindplot.widget.FloatingTip = new Class({
|
|||||||
_createPopover: function() {
|
_createPopover: function() {
|
||||||
this.element.popover(this.options);
|
this.element.popover(this.options);
|
||||||
var me = this;
|
var me = this;
|
||||||
this.element.one('hidden.bs.popover', function() {
|
if (this.options.destroyOnExit) {
|
||||||
me.element.popover('destroy');
|
this.element.one('hidden.bs.popover', function() {
|
||||||
me._createPopover();
|
me.element.popover('destroy');
|
||||||
});
|
me._createPopover();
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
show: function () {
|
show: function () {
|
||||||
|
@ -30,14 +30,8 @@ mindplot.widget.LinkIconTooltip = new Class({
|
|||||||
container: 'body',
|
container: 'body',
|
||||||
title: $msg('LINK'),
|
title: $msg('LINK'),
|
||||||
trigger: "manual",
|
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) {
|
_buildContent:function (linkIcon) {
|
||||||
|
Loading…
Reference in New Issue
Block a user