From a6855d58db874f05b4d70b74002a558f194928e9 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 10 Dec 2018 16:21:34 +0100 Subject: [PATCH] fix #2419 @1 --- images/interface.svg | 23 +++++++++++++++++++++-- js/libs/fluidbook/fluidbook.bookmarks.js | 12 ++++++------ js/libs/fluidbook/fluidbook.js | 6 +++--- style/fluidbook.less | 24 +++++++++++++----------- 4 files changed, 43 insertions(+), 22 deletions(-) diff --git a/images/interface.svg b/images/interface.svg index a192010f..a258cba8 100644 --- a/images/interface.svg +++ b/images/interface.svg @@ -1,7 +1,8 @@ - @@ -24,6 +25,24 @@ - + + + + + diff --git a/js/libs/fluidbook/fluidbook.bookmarks.js b/js/libs/fluidbook/fluidbook.bookmarks.js index f0044059..ed96ad3b 100644 --- a/js/libs/fluidbook/fluidbook.bookmarks.js +++ b/js/libs/fluidbook/fluidbook.bookmarks.js @@ -81,9 +81,9 @@ FluidbookBookmarks.prototype = { sortnumeric: function (a, b) { return a - b; }, - openPDF: function(element, print) { - print = print || false; - this.fluidbook._openFile(this.getPDF(), element, 'pdf', this.getBookmarksCompacted() + '.pdf', print); + openPDF: function (element, print) { + print = print || false; + this.fluidbook._openFile(this.getPDF(), element, 'pdf', this.getBookmarksCompacted() + '.pdf', print); }, getPDF: function () { return 'https://workshop.fluidbook.com/s/e/' + this.fluidbook.datas.cid + '/' + this.getBookmarksCompacted(); @@ -380,7 +380,7 @@ FluidbookBookmarks.prototype = { } else { bookmarks += " data-tooltip=\"" + this._txtAdd + "\""; } - bookmarks += '>'; + bookmarks += '>' + getSpriteIcon('bookmark-corner') + ''; } } return bookmarks; @@ -488,7 +488,7 @@ FluidbookBookmarks.prototype = { }, // Used by the print function. Will return maximum of 3 pages or a blank page if no bookmarks. - getPrintPreview: function() { + getPrintPreview: function () { if (!this.hasBookmarkedPages()) { return '
'; @@ -509,7 +509,7 @@ FluidbookBookmarks.prototype = { html += '
' + this.fluidbook.loader.getThumbImage(group.page); if (this.fluidbook.bookmarks.enabled) { - html += this.fluidbook.bookmarks.getBookmarkForPage(group.page, true, true); + html += this.fluidbook.bookmarks.getBookmarkForPage(group.page, true, true); } html += '
'; diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index 05282721..553be817 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -410,8 +410,8 @@ Fluidbook.prototype = { } } else { var view = args[1]; - if (this.currentPage == -1) { - if (view == 'multimedia' || view == 'video') { + if (this.currentPage === -1) { + if (view === 'multimedia' || view === 'video') { var $this = this; var searchURL = args.join('/'); $.each(this.datas.links, function (pageNr, links) { @@ -421,7 +421,7 @@ Fluidbook.prototype = { return false; } }); - if (this.currentPage == -1) { + if (this.currentPage === -1) { this.currentPage = 0; } } else { diff --git a/style/fluidbook.less b/style/fluidbook.less index 52e8c60a..1d7341f4 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -1255,7 +1255,6 @@ html.ios body.portrait #interface { /* Bookmarks */ .bookmark { - #links & { z-index: 4999; width: @bookmark-corner-size; @@ -1276,6 +1275,16 @@ html.ios body.portrait #interface { } } + svg { + color: @bookmark-star-disabled-color; + } + + &[data-enabled] { + svg { + color: @bookmark-star-enabled-color; + } + } + background-repeat: no-repeat; position: absolute; background-size: cover; @@ -1296,22 +1305,15 @@ html.ios body.portrait #interface { .bookmark.left { left: 0; - background-image: url("../data/images/bookmark-left-off.svg"); } .bookmark.right, .portrait #fluidbook .bookmark.left { right: 0; - background-image: url("../data/images/bookmark-right-off.svg"); -} - -.bookmark.left[data-enabled] { - background-image: url("../data/images/bookmark-left-on.svg"); -} -.bookmark.right[data-enabled], -.portrait #fluidbook .bookmark.left[data-enabled] { - background-image: url("../data/images/bookmark-right-on.svg"); + svg { + transform: scaleX(-1); + } } .landscape .bookmark.left { -- 2.39.5