]> _ Git - fluidbook-html5.git/commitdiff
wait #5102 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 16 Feb 2022 10:44:38 +0000 (11:44 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 16 Feb 2022 10:44:38 +0000 (11:44 +0100)
js/libs/fluidbook/fluidbook.menu.js
js/libs/fluidbook/fluidbook.print.js

index 05b62c23f35c37655d019b7a4b5dbcda7f4f3b91..6d7347ce7646ef13b5d5e59956d03497b4b9ecbe 100644 (file)
@@ -954,6 +954,9 @@ FluidbookMenu.prototype = {
                 if (!this.fluidbook.settings.printFullBrochure) {
                     w = 560;
                 }
+                if (!this.fluidbook.settings.pdfComplexShowCurrent) {
+                    w = 500;
+                }
                 if (m.find('.print-dialogue').hasClass('compact')) {
                     w = 500;
                 }
index 6352ad7bd86248df0b66f00144efa09cd1156242..c96ef257b108f2ce8f47950cd8b1950a1573d2c7 100644 (file)
@@ -97,27 +97,29 @@ FluidbookPrint.prototype = {
 
         // NOTE: Each option has two labels so thumbnails are also clickable and so it works with the custom radio inputs
 
-        view += this.getSinglePages();
-
-        // Double Page
-        if (!this.isFirstPage && !this.isLastPage && !this.isSinglePageMode) {
-            var label = __('spread');
-            view += '<div class="print-option" role="radio" aria-label="' + label + '">';
-            if (!this.compact) {
-                view += '<label for="doublePage" aria-hidden="true">';
-                view += '<div class="doubleThumb">';
-                view += '<div class="thumb left">';
-                view += this.fluidbook.loader.getThumbImage(this.leftPageNumber, true);
-                view += '</div>';
-                view += '<div class="thumb right">';
-                view += this.fluidbook.loader.getThumbImage(this.rightPageNumber, true);
-                view += '</div>'; // .thumb
-                view += '</div>'; // .doubleThumb
-                view += '</label>';
+        if(this.fluidbook.settings.pdfComplexShowCurrent) {
+            view += this.getSinglePages();
+
+            // Double Page
+            if (!this.isFirstPage && !this.isLastPage && !this.isSinglePageMode) {
+                var label = __('spread');
+                view += '<div class="print-option" role="radio" aria-label="' + label + '">';
+                if (!this.compact) {
+                    view += '<label for="doublePage" aria-hidden="true">';
+                    view += '<div class="doubleThumb">';
+                    view += '<div class="thumb left">';
+                    view += this.fluidbook.loader.getThumbImage(this.leftPageNumber, true);
+                    view += '</div>';
+                    view += '<div class="thumb right">';
+                    view += this.fluidbook.loader.getThumbImage(this.rightPageNumber, true);
+                    view += '</div>'; // .thumb
+                    view += '</div>'; // .doubleThumb
+                    view += '</label>';
+                }
+                view += '<input aria-hidden="true" type="radio" name="pageChoice" value="double" id="doublePage">'
+                view += '<label aria-hidden="true" for="doublePage" class="print-label-text">' + label + '</label>';
+                view += '</div>'; // .print-option
             }
-            view += '<input aria-hidden="true" type="radio" name="pageChoice" value="double" id="doublePage">'
-            view += '<label aria-hidden="true" for="doublePage" class="print-label-text">' + label + '</label>';
-            view += '</div>'; // .print-option
         }
 
         // Full Brochure
@@ -157,7 +159,9 @@ FluidbookPrint.prototype = {
             view += '</div>'; // .print-option
         }
 
-        view += '<div class="print-option blank" aria-hidden="true"></div>'; // Extra empty div to ensure flexbox space-between works as expected
+        if(this.fluidbook.settings.pdfComplexShowCurrent) {
+            view += '<div class="print-option blank" aria-hidden="true"></div>'; // Extra empty div to ensure flexbox space-between works as expected
+        }
 
         // Page range inputs
         if (this.fluidbook.settings.printPageRange) {