From: Vincent Vanwaelscappel Date: Wed, 24 Oct 2018 08:23:51 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/onepage' X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=601bb17b68b2022090866ab34f5b6d8bd5e1a090;p=fluidbook-html5.git Merge remote-tracking branch 'origin/onepage' # Conflicts: # js/libs/fluidbook/menu/fluidbook.index.js --- 601bb17b68b2022090866ab34f5b6d8bd5e1a090 diff --cc js/libs/fluidbook/menu/fluidbook.index.js index 2b68dfac,7d610647..b7c36136 --- a/js/libs/fluidbook/menu/fluidbook.index.js +++ b/js/libs/fluidbook/menu/fluidbook.index.js @@@ -29,7 -30,10 +30,11 @@@ FluidbookIndex.prototype = var c = ''; var s1, s2; ++ + var increment = this.singleMode ? 1 : 2; + var start = this.singleMode ? 1 : 0; + - for (var i = start; i <= this.fluidbook.getMaxPage(); i += increment) { + for (var i = 0; i <= this.fluidbook.contentlock.getMaxPage(); i += 2) { var pages = []; j = i + 1; ix1 = ''; @@@ -63,23 -72,27 +73,27 @@@ s1 = 'right'; s2 = 'left' } - + if (!this.singleMode) { - if (j <= this.fluidbook.getMaxPage()) { - ix2 += '
' + this.fluidbook.loader.getThumbImage(j, null, true) + '' + this.fluidbook.physicalToVirtual(j) + ''; - if (this.fluidbook.bookmarks.enabled) { - ix2 += this.fluidbook.bookmarks.getBookmarkForPage(j, true); - } - ix2 += '
'; - pages.push(j); - } else { - c = ' simple ' + s2; + + if (j <= this.fluidbook.contentlock.getMaxPage()) { + ix2 += '
' + this.fluidbook.loader.getThumbImage(j, null, true) + '' + this.fluidbook.physicalToVirtual(j) + ''; + if (this.fluidbook.bookmarks.enabled) { + ix2 += this.fluidbook.bookmarks.getBookmarkForPage(j, true); } + ix2 += '
'; + 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 += '
' + ix; this.normalHTML += '
'; }