From: Vincent Vanwaelscappel Date: Wed, 21 Oct 2020 06:33:18 +0000 (+0200) Subject: wip #3962 @5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b583c9a34adda8b2d2d3960fbd3e0aefdfa0d891;p=fluidbook-html5.git wip #3962 @5 --- diff --git a/images/interface.svg b/images/interface.svg index 45abeb79..3523ab3f 100644 --- a/images/interface.svg +++ b/images/interface.svg @@ -118,6 +118,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '; + res += '' + getSpriteIcon('notes-overview') + ' ' + this.fluidbook.l10n.__('all notes') + ''; + res += '' + getSpriteIcon('notes-unhide') + ' ' + this.fluidbook.l10n.__('unhide notes') + '' + getSpriteIcon('notes-hide') + ' ' + this.fluidbook.l10n.__('hide notes') + ''; + res += ''; + return res; + }, +} \ No newline at end of file diff --git a/js/libs/fluidbook/fluidbook.tooltip.js b/js/libs/fluidbook/fluidbook.tooltip.js index fa11d30a..70c27e22 100644 --- a/js/libs/fluidbook/fluidbook.tooltip.js +++ b/js/libs/fluidbook/fluidbook.tooltip.js @@ -44,6 +44,7 @@ FluidbookTooltip.prototype = { $("body").append(''); }, + updateMousePosition: function (e) { this.mouseX = e.pageX; this.mouseY = e.pageY; @@ -133,6 +134,9 @@ FluidbookTooltip.prototype = { }, displayTooltip: function (text, style) { + if ($('.fixedTooltip:visible').length > 0) { + return; + } var t = $("#tooltip"); if (style == undefined) { style = ''; @@ -162,5 +166,12 @@ FluidbookTooltip.prototype = { }, hideTooltip: function () { $("#tooltip").hide().text(''); - } + }, + showFixedTooltip: function (e, posX, posY, css) { + this.hideTooltip(); + $(e).attr('data-pos-x', posX).attr('data-pos-y', posY).css(css).show(); + $(document).one('click', '*', function () { + $(e).hide(); + }); + }, } \ No newline at end of file diff --git a/style/fluidbook.less b/style/fluidbook.less index eb317220..c2025f88 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -2959,3 +2959,4 @@ body > input { @import "menu-articles.less"; @import "nointerface.less"; @import "posad.less"; +@import "notes.less"; diff --git a/style/notes.less b/style/notes.less new file mode 100644 index 00000000..25fed76b --- /dev/null +++ b/style/notes.less @@ -0,0 +1,11 @@ +.notes-no .having-notes { + display: none; +} + +.notes-unhidden .unhide { + display: none; +} + +.notes-hidden .hide { + display: none; +} \ No newline at end of file diff --git a/style/tooltip.less b/style/tooltip.less index 5627ba6a..e8a9cc4b 100644 --- a/style/tooltip.less +++ b/style/tooltip.less @@ -1,7 +1,6 @@ - /* Tooltip */ -#tooltip { +#tooltip, .fixedTooltip { @tooltip-arrows-size: 10px; position: absolute; @@ -95,4 +94,22 @@ right: 16px; } } +} + +.fixedTooltip { + pointer-events: all; + a { + position: relative; + top:-3px; + margin-right: 25px; + display: inline-block; + text-transform: uppercase; + svg { + height: 19px; + width: auto; + position: relative; + top: 5px; + margin-right: 4px; + } + } } \ No newline at end of file