]> _ Git - fluidbook-html5.git/commitdiff
fix #2419 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 10 Dec 2018 15:21:34 +0000 (16:21 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 10 Dec 2018 15:21:34 +0000 (16:21 +0100)
images/interface.svg
js/libs/fluidbook/fluidbook.bookmarks.js
js/libs/fluidbook/fluidbook.js
style/fluidbook.less

index a192010f804367983499583a9914a508538b1eb4..a258cba8e0e3171b02db02578ef2ccad6ebae226 100644 (file)
@@ -1,7 +1,8 @@
 <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
     <symbol id="interface-loader" viewBox="0 0 48 48">
         <circle cx="24" cy="24" r="23"></circle>
-        <circle class="animate" cx="24" cy="24" fill="none" stroke="currentColor" stroke-width="3" r="16" stroke-dasharray="80 80"
+        <circle class="animate" cx="24" cy="24" fill="none" stroke="currentColor" stroke-width="3" r="16"
+                stroke-dasharray="80 80"
                 transform="rotate(0 24 24)">
         </circle>
     </symbol>
         <rect x="16.5" y="23.5" class="st0" width="17" height="2.9"/>
     </symbol>
     <symbol id="interface-plus" viewBox="0 0 50 50">
-        <polygon class="st0" points="33.5,23.5 26.5,23.5 26.5,16.5 23.5,16.5 23.5,23.5 16.5,23.5 16.5,26.5 23.5,26.5 23.5,33.5 26.5,33.5 26.5,26.5 33.5,26.5 "/>
+        <polygon class="st0"
+                 points="33.5,23.5 26.5,23.5 26.5,16.5 23.5,16.5 23.5,23.5 16.5,23.5 16.5,26.5 23.5,26.5 23.5,33.5 26.5,33.5 26.5,26.5 33.5,26.5 "/>
+    </symbol>
+    <symbol id="bookmark-corner" viewBox="0 0 50 50">
+        <path fill="currentColor" stroke="currentColor" d="M20.4,29.512c-0.213,0.21-0.488,0.356-0.799,0.407c-0.629,0.102-1.251-0.213-1.542-0.779l-3.212-6.252
+       l-7.155,1.092c-0.629,0.096-1.249-0.225-1.535-0.793s-0.174-1.256,0.277-1.704l5.094-5.055l-3.17-6.178
+       C8.067,9.682,8.182,8.997,8.635,8.547c0.002-0.002,0.003-0.003,0.005-0.005c0.451-0.447,1.131-0.563,1.697-0.272l6.236,3.161
+       l5.052-5.02c0,0,0,0,0,0c0.524-0.446,1.112-0.53,1.678-0.242c0.565,0.288,0.871,0.919,0.773,1.546l-1.094,7.029l6.313,3.243
+       c0.567,0.291,0.88,0.916,0.778,1.545c-0.102,0.63-0.6,1.122-1.23,1.219l-6.959,1.063l-1.065,6.879
+       C20.77,29.011,20.619,29.296,20.4,29.512z"/>
+        <path fill="$bookmark-color" d="M49.292,24.43L25.636,0.71C25.182,0.255,24.566,0,23.925,0H2.406C1.069,0,0,1.086,0,2.426v21.038
+       c0,0.641,0.246,1.256,0.697,1.711l23.915,24.11C25.075,49.752,25.694,50,26.325,50c0.312,0,0.624-0.061,0.922-0.184
+       c0.906-0.374,1.497-1.045,1.497-2.026L28.75,29h18.831c0.979,0,1.86-0.805,2.234-1.711C50.19,26.382,49.983,25.124,49.292,24.43z
+        M30.074,19.532c-0.102,0.63-0.6,1.122-1.23,1.219l-6.959,1.063l-1.065,6.879c-0.05,0.318-0.2,0.604-0.419,0.819
+       c-0.213,0.21-0.488,0.356-0.799,0.407c-0.629,0.102-1.251-0.213-1.542-0.779l-3.212-6.252l-7.155,1.092
+       c-0.629,0.096-1.249-0.225-1.535-0.793s-0.174-1.256,0.277-1.704l5.094-5.055l-3.17-6.178C8.067,9.682,8.182,8.997,8.635,8.547
+       c0.002-0.002,0.003-0.003,0.005-0.005c0.451-0.447,1.131-0.563,1.697-0.272l6.236,3.161l5.052-5.02c0,0,0,0,0,0
+       c0.524-0.446,1.112-0.53,1.678-0.242c0.565,0.288,0.871,0.919,0.773,1.546l-1.094,7.029l6.313,3.243
+       C29.863,18.278,30.176,18.903,30.074,19.532z"/>
     </symbol>
 </svg>
index f004405916973ada66d778925765ba35a3a078f2..ed96ad3bc340a3a7f3530b813bc6a39baf91d1df 100644 (file)
@@ -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 += '></a>';
+                bookmarks += '>' + getSpriteIcon('bookmark-corner') + '</a>';
             }
         }
         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 '<div class="thumb left blank"><div class="blank-mask"></div></div>';
@@ -509,7 +509,7 @@ FluidbookBookmarks.prototype = {
             html += '<div class="thumb">' + 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 += '</div>';
index 05282721414bbffb78254baffde36165e1a71e97..553be81747f93337f6e2505d66d511b8c93488be 100644 (file)
@@ -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 {
index 52e8c60af38993dd82f0782d789c83c28d9d51ad..1d7341f48a73d5ff2f04bc0e0741c23d622aabbd 100644 (file)
@@ -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 {