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>';
}