]> _ Git - fluidbook-html5.git/commitdiff
fix #3261 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 17 Dec 2019 14:02:29 +0000 (15:02 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 17 Dec 2019 14:02:29 +0000 (15:02 +0100)
js/libs/fluidbook/fluidbook.bookmarks.js
js/libs/fluidbook/fluidbook.links.js
style/fluidbook.less

index ccf6f34407306127f2c7f79fa9e259085d4ad342..e82148c00ce427d9e271390ffefa96888cb19b7e 100644 (file)
@@ -348,7 +348,10 @@ FluidbookBookmarks.prototype = {
     isBookmarked: function (page) {
         return this.bookmarks.indexOf(page) > -1;
     },
-    getBookmarkForPage: function (pageNr, allwaysAtRight) {
+    getBookmarkForPage: function (pageNr, allwaysAtRight, permanentIcon) {
+        if (permanentIcon === undefined) {
+            permanentIcon = false;
+        }
         if (allwaysAtRight === undefined) {
             allwaysAtRight = false;
         }
@@ -368,6 +371,10 @@ FluidbookBookmarks.prototype = {
             return '';
         }
 
+        if (permanentIcon) {
+            side += ' permanent';
+        }
+
         bookmarks += "<a href=\"#\" class=\"bookmark " + side + "\" data-page=\"" + pageNr + "\"";
         if (this.isBookmarked(pageNr)) {
             bookmarks += " data-enabled=\"enabled\"";
@@ -375,6 +382,7 @@ FluidbookBookmarks.prototype = {
         } else {
             bookmarks += " data-tooltip=\"" + this._txtAdd + "\"";
         }
+
         bookmarks += '>' + getSpriteIcon('bookmark-corner') + '</a>';
 
         return bookmarks;
index 32e75423b91d88d63a2531097ba2c05c7cde79fe..99c0263b3f25fba155a43716291bf5beb05f76b1 100644 (file)
@@ -187,8 +187,8 @@ FluidbookLinks.prototype = {
         leftContainer.html(this.fluidbook.datas.links[leftPage]);
 
         if (this.fluidbook.datas.bookmark) {
-            leftContainer.append(this.fluidbook.bookmarks.getBookmarkForPage(leftPage, this.fluidbook.displayOnePage));
-            rightContainer.append(this.fluidbook.bookmarks.getBookmarkForPage(rightPage, this.fluidbook.displayOnePage));
+            leftContainer.append(this.fluidbook.bookmarks.getBookmarkForPage(leftPage, this.fluidbook.displayOnePage, this.fluidbook.datas.bookmarkPermanentIcon));
+            rightContainer.append(this.fluidbook.bookmarks.getBookmarkForPage(rightPage, this.fluidbook.displayOnePage, this.fluidbook.datas.bookmarkPermanentIcon));
         }
 
         if (this.fluidbook.displayOnePage) {
@@ -579,7 +579,7 @@ FluidbookLinks.prototype = {
             containerHeight = iframeHeight;
         }
         iframe.attr('height', height);
-        iframe.closest('.multimediaScale').css('height',height);
+        iframe.closest('.multimediaScale').css('height', height);
         container.css({maxHeight: Math.min(iframeHeight, containerHeight)});
         if (!Modernizr.ftouch) {
             container.perfectScrollbar('update');
index 5ab214d9a82f1c18dab030c182aa8372945343b0..d876fef18f74d8ea9668308afd3bbe7d737a010f 100644 (file)
@@ -1332,7 +1332,7 @@ html.ios body.portrait #interface {
   display: block;
   cursor: pointer;
 
-  &[data-enabled], &:hover {
+  &[data-enabled], &:hover, &.permanent {
     opacity: 1 !important;
     transition: none;
   }