},
getPDF: function () {
- return this.fluidbook.service.getBaseURL(true) + 'e/'+this.fluidbook.settings.id+'-' +this.fluidbook.settings.cid + '/' + this.getBookmarksCompacted();
+ return this.fluidbook.service.getBaseURL(true) + 'e/' + this.fluidbook.settings.id + '-' + this.fluidbook.settings.cid + '/' + this.getBookmarksCompacted();
},
getBookmarksCompacted: function () {
this.bookmarks = arrayRemove(this.bookmarks, pages[i]);
}
this.updateBookmarks();
- }, updateBookmarks: function () {
+ },
+
+ updateBookmarks: function () {
this.saveBookmarks();
var $this = this;
$.each(this.bookmarks, function (k, v) {
$this.setCornersEnabled(v, true);
});
- }, saveBookmarks: function () {
+ },
+
+ saveBookmarks: function () {
this.fluidbook.cache.set('bookmarks', this.bookmarks);
- }, getSavedBookmarks: function () {
+ },
+
+ getSavedBookmarks: function () {
var res = [];
if (this.fluidbook.cache.isset('bookmarks')) {
res = this.fluidbook.cache.get('bookmarks');
}
}
return res;
- }, isBookmarked: function (page) {
+ },
+
+ isBookmarked: function (page) {
return this.areBookmarksAllowedOn(page) && this.bookmarks.indexOf(page) > -1;
- }, areBookmarksAllowedOn: function (pageNr) {
+ },
+
+ areBookmarksAllowedOn: function (pageNr) {
if (pageNr === 0 || pageNr > this.fluidbook.settings.pages) {
return false;
}
return this.fluidbook.settings.bookmarkDisablePages.indexOf(pageNr) === -1;
- }, getBookmarkForPage: function (pageNr, allwaysAtRight, permanentIcon) {
+ },
+
+ getBookmarkForPage: function (pageNr, allwaysAtRight, permanentIcon, keyboardShortcut) {
if (!this.areBookmarksAllowedOn(pageNr)) {
return '';
}
var virtual = this.fluidbook.physicalToVirtual(pageNr);
bookmarks += "<a href=\"#\" class=\"bookmark " + side + "\" data-page=\"" + pageNr + "\"";
- bookmarks += ' aria-keyshortcuts="' + shortcut + '" role="button"'
+ if (keyboardShortcut===true) {
+ bookmarks += ' aria-keyshortcuts="' + shortcut + '"';
+ }
+ bookmarks += ' role="button"';
if (this.isBookmarked(pageNr)) {
bookmarks += " data-enabled=\"enabled\"";
bookmarks += " data-tooltip=\"" + this._txtRemove + "\"";
bookmarks += '>' + getSpriteIcon('bookmark-corner') + '</a>';
return bookmarks;
- }, getView: function (title, downloadLabel) {
+ },
+
+ getView: function (title, downloadLabel) {
var c = this.getIndex(false, false, downloadLabel);
if (c === false) {
return c;
index += c;
index += '</div>';
return index;
- }, hasBookmarkedPages: function (all) {
+ },
+
+ hasBookmarkedPages: function (all) {
if (all === undefined) {
all = false;
}
return false;
}
return true;
- }, getIndex: function (all, onlyGroup, downloadLabel) {
+ },
+
+ getIndex: function (all, onlyGroup, downloadLabel) {
if (all === undefined) {
all = false;
}
index += '<div class="doubleThumb simple left"' + dim.doublethumb + ' page="' + group.page + '" data-pages="' + pages.join(',') + '">';
index += this.fluidbook.menu.index._thumb(group.page, 'left', this.fluidbook.mobilefirst.enabled ? undefined : 100, group.name);
if (this.fluidbook.bookmarks.enabled) {
- index += this.fluidbook.bookmarks.getBookmarkForPage(group.page, true, true);
+ index += this.fluidbook.bookmarks.getBookmarkForPage(group.page, true, true,false);
}
index += '</div></div>';
}