]> _ Git - fluidbook-html5.git/commitdiff
Merge remote-tracking branch 'origin/onepage'
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 24 Oct 2018 08:23:51 +0000 (10:23 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 24 Oct 2018 08:23:51 +0000 (10:23 +0200)
# Conflicts:
# js/libs/fluidbook/menu/fluidbook.index.js

1  2 
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.search.js
js/libs/fluidbook/menu/fluidbook.index.js

Simple merge
Simple merge
index 2b68dfac7f5f4aef68b77887c2ab7a8112302132,7d610647dd5a2e0b72c2272fe8ee35d31645f304..b7c361365bbd5b1da38595613bd7e16ba197c24d
@@@ -29,7 -30,10 +30,11 @@@ FluidbookIndex.prototype = 
              var c = '';
              var s1, s2;
  
 -            for (var i = start; i <= this.fluidbook.getMaxPage(); i += increment) {
++
+             var increment = this.singleMode ? 1 : 2;
+             var start = this.singleMode ? 1 : 0;
 +            for (var i = 0; i <= this.fluidbook.contentlock.getMaxPage(); i += 2) {
                  var pages = [];
                  j = i + 1;
                  ix1 = '';
                      s1 = 'right';
                      s2 = 'left'
                  }
 -
+                 if (!this.singleMode) {
 -                    if (j <= this.fluidbook.getMaxPage()) {
 -                        ix2 += '<div class="thumb ' + s1 + '"><a href="#/page/' + j + '">' + this.fluidbook.loader.getThumbImage(j, null, true) + '</a><span class="number">' + this.fluidbook.physicalToVirtual(j) + '</span>';
 -                        if (this.fluidbook.bookmarks.enabled) {
 -                            ix2 += this.fluidbook.bookmarks.getBookmarkForPage(j, true);
 -                        }
 -                        ix2 += '</div>';
 -                        pages.push(j);
 -                    } else {
 -                        c = ' simple ' + s2;
 +
 +                if (j <= this.fluidbook.contentlock.getMaxPage()) {
 +                    ix2 += '<div class="thumb ' + s1 + '"><a href="#/page/' + j + '">' + this.fluidbook.loader.getThumbImage(j, null, true) + '</a><span class="number">' + this.fluidbook.physicalToVirtual(j) + '</span>';
 +                    if (this.fluidbook.bookmarks.enabled) {
 +                        ix2 += this.fluidbook.bookmarks.getBookmarkForPage(j, true);
                      }
 +                    ix2 += '</div>';
 +                    pages.push(j);
 +                } else {
 +                    c = ' simple ' + s2;
 +                }
  
-                 if (j == 1) {
-                     pages.unshift(0);
-                 }
+                     if (j == 1) {
+                         pages.unshift(0);
+                     }
  
-                 ix = ix1 + ix2;
+                     ix = ix1 + ix2;
+                 } else {
+                     ix = ix1;
+                 }
                  this.normalHTML += '<div class="doubleThumb' + c + '" page="' + i + '" data-pages="' + pages.join(',') + '">' + ix;
                  this.normalHTML += '</div>';
              }