]> _ Git - fluidbook-html5.git/commitdiff
wip #2720 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 10 May 2019 17:38:48 +0000 (19:38 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 10 May 2019 17:38:48 +0000 (19:38 +0200)
js/libs/fluidbook/fluidbook.links.js
js/libs/fluidbook/fluidbook.menu.js
style/mobilefirst.less

index a75ed6866b1a08305dd4417749c3e2b89dcb3138..89c1ee03a3a32ae3768a8e6382146a284e364eac 100644 (file)
@@ -178,7 +178,7 @@ FluidbookLinks.prototype = {
             lClass = 'right';
         }
 
-        if (!this.fluidbook.displayOnePage && pageNr % 2 === 1) {
+        if (pageNr % 2 === 1) {
             pageNr--;
         }
 
@@ -186,7 +186,7 @@ FluidbookLinks.prototype = {
 
         links.removeClass('left').removeClass('right').addClass(lClass).html(this.fluidbook.datas.links[pageNr]).show();
         if (this.fluidbook.datas.bookmark) {
-            links.append(this.fluidbook.bookmarks.getBookmarkForPage(pageNr, this.fluidbook.displayOnePage, this.fluidbook.displayOnePage));
+            links.append(this.fluidbook.bookmarks.getBookmarkForPage(pageNr, false, this.fluidbook.displayOnePage));
         }
 
         links.prepend('<div class="leftContainer"></div><div class="rightContainer"></div>');
index f39585dea54770ed09b5c1c6a5038704b2f402af..08e597fbbcc7dfa3667800371aeb88adfc1d7406 100644 (file)
@@ -595,11 +595,18 @@ FluidbookMenu.prototype = {
                 fullscreen = (w >= ww * 0.9);
                 break;
             case 'index':
-                fullscreen = true;
+                var indexWidth = Math.floor(ww / 230) * 230;
+                $("#indexViewHolder").css('width', indexWidth);
                 if (this.fluidbook.mobilefirst.enabled) {
-                    this.fluidbook.mobilefirst.resizeIndex();
+                    var cw = 130 * this.fluidbook.datas.pages;
+                    fullscreen = (cw >= ww * 0.9);
+                    if (!fullscreen) {
+                        w = cw+30;
+                    }
                 } else {
-                    $("#indexViewHolder").css('width', Math.floor(ww / 230) * 230);
+                    fullscreen = true;
+                    this.fluidbook.mobilefirst.resizeIndex();
+
                 }
                 break;
             case 'share':
@@ -844,7 +851,6 @@ FluidbookMenu.prototype = {
                 if (!this.fluidbook.datas.printFullBrochure) {
                     w = 560;
                 }
-
                 if (m.find('.print-dialogue').hasClass('compact')) {
                     w = 500;
                 }
index 0b94341f73d0555450851ad0f8ed85f850025e51..328209b42e940f5b9cf9c56e06d11645552ee839 100644 (file)
 
   #links {
     &.right {
-      left: 0;
+      .bookmark {
+        &.right {
+          right: -@book-page-width;
+        }
+      }
+
+      .leftContainer {
+        display: none;
+      }
+    }
+
+    &.left {
+      .rightContainer {
+        display: none;
+      }
     }
   }
 
 
   .print-dialogue {
     margin-bottom: 20px;
+
     .print-option {
       flex-basis: 100%;
     }