From: Vincent Vanwaelscappel Date: Fri, 17 May 2019 18:19:47 +0000 (+0200) Subject: wait #2710 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7146cc159b83f05427aba98b9a622240ad23ecb7;p=fluidbook-html5.git wait #2710 @1 --- diff --git a/images/help/help-touch-scroll.svg b/images/help/help-touch-scroll.svg new file mode 100644 index 00000000..73c4cece --- /dev/null +++ b/images/help/help-touch-scroll.svg @@ -0,0 +1,24 @@ + + + + + + + + + + \ No newline at end of file diff --git a/js/libs/fluidbook/fluidbook.help.js b/js/libs/fluidbook/fluidbook.help.js index 7c0295f2..c9a97efe 100644 --- a/js/libs/fluidbook/fluidbook.help.js +++ b/js/libs/fluidbook/fluidbook.help.js @@ -13,31 +13,41 @@ FluidbookHelp.prototype = { var help = ''; // Image centrale - var ext = ''; - if (this.fluidbook.support.SVG) { - ext = 'svg'; - } else { - ext = 'png'; - } + var ext = 'svg'; var width = 400; var height = 200; var zoom = 2; - var name = 'fingers'; - var text = this.fluidbook.l10n.__("tap twice or spread your fingers to zoom in"); - help += '
' + this.fluidbook.loader.getImage('data/images/help-' + name + '.' + ext, width * zoom, height * zoom); - help += '

' + text + '

'; - help += '
'; + + if (this.fluidbook.mobilefirst.enabled) { + var name = 'fingers'; + var text = this.fluidbook.l10n.__("scroll down to read the page content"); + help += '
' + this.fluidbook.loader.getImage('images/help/help-touch-scroll.svg', width * zoom, height * zoom); + help += '

' + text + '

'; + help += '
'; + + + } else { + var name = 'fingers'; + var text = this.fluidbook.l10n.__("tap twice or spread your fingers to zoom in"); + help += '
' + this.fluidbook.loader.getImage('data/images/help-' + name + '.svg', width * zoom, height * zoom); + help += '

' + text + '

'; + help += '
'; + } var width = 100; var height = 200; var zoom = 1; name = 'mouse'; - text = this.fluidbook.l10n.__('click once to zoom in, click again to zoom out') + '
' + this.fluidbook.l10n.__('roll the mouse wheel to zoom in/out'); + if (this.fluidbook.mobilefirst.enabled) { + text = this.fluidbook.l10n.__('scroll down to read the page content'); + } else { + text = this.fluidbook.l10n.__('click once to zoom in, click again to zoom out') + '
' + this.fluidbook.l10n.__('roll the mouse wheel to zoom in/out'); + } - help += '
' + this.fluidbook.loader.getImage('data/images/help-' + name + '.' + ext, width * zoom, height * zoom); + help += '
' + this.fluidbook.loader.getImage('data/images/help-' + name + '.svg', width * zoom, height * zoom); help += '

' + text + '

'; help += '
'; @@ -90,20 +100,25 @@ FluidbookHelp.prototype = { help += '
'; // Interface - var next = this.fluidbook.l10n.__('next double page'); var previous = this.fluidbook.l10n.__('previous double page'); if (this.fluidbook.pad.enabled) { next = this.fluidbook.l10n.__('next chapter'); previous = this.fluidbook.l10n.__('previous chapter'); } + if (this.fluidbook.mobilefirst.enabled) { + var next = this.fluidbook.l10n.__('next page'); + var previous = this.fluidbook.l10n.__('previous page'); + } help += '
'; help += ''; help += '
' + this.fluidbook.l10n.__('last page') + '
'; help += ''; help += '
' + this.fluidbook.l10n.__('frontpage') + '
'; - help += '
' + this.fluidbook.l10n.__('drag handle to switch page') + '
'; + if ($("#slider").length > 0) { + help += '
' + this.fluidbook.l10n.__('drag handle to switch page') + '
'; + } help += this.bookmarkLabel(); help += '
'; @@ -289,6 +304,7 @@ FluidbookHelp.prototype = { baseElement = $('#links .bookmark.' + side), // Original element used to provide position and sizing for overlay html = ''; + // If bookmark icon isn't present on the side we want, it means that we're on // the first/last page and that side is missing so we can't display the help if (baseElement.length === 0) { @@ -306,15 +322,13 @@ FluidbookHelp.prototype = { // Build a HTML string via jQuery with all the styling // Bookmark icon: - var icon = $('
').css({ + var iconHolder = $('
').css({ width: Math.round(box.width), height: Math.round(box.height), margin: Math.round(circleOffset), // Centre inside circle - backgroundSize: 'contain', - backgroundPosition: 'center', - backgroundRepeat: 'no-repeat', - backgroundImage: baseElement.css('backgroundImage').replace('off.svg', 'on.svg') // Show the "on" state if not already set - })[0].outerHTML; + }); + iconHolder.html(getSpriteIcon('bookmark-corner')); + var icon = $(iconHolder).get(0).outerHTML; // Circle around the icon - slightly bigger html += $('
' + icon + '
').css({ diff --git a/style/help.less b/style/help.less index 7dbcc340..9faafe3c 100644 --- a/style/help.less +++ b/style/help.less @@ -22,11 +22,6 @@ overflow: hidden; .illustration { - - .zoom-disabled & { - display: none; - } - .no-using-touch &.touch { display: none; } @@ -51,6 +46,10 @@ position: static; } + &.touch { + top: 25%; + } + } #icons { diff --git a/style/mobilefirst.less b/style/mobilefirst.less index c745694e..e64c60d9 100644 --- a/style/mobilefirst.less +++ b/style/mobilefirst.less @@ -69,6 +69,7 @@ transform: translate3d(unit(-1*(@book-page-width+@transition-margin), px), 0, 0); } } + } .link.multimedia.notinteractive { @@ -80,6 +81,11 @@ opacity: 1; } } + + + #helpView .interface { + display: block; + } } .mview.fs .fonctions {