1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-28 12:30:00 +00:00

Merge remote-tracking branch 'adv/bookmarks'

This commit is contained in:
OzzieIsaacs 2017-09-17 20:26:58 +02:00
commit 378a0ca662
2 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@
var reader = ePubReader(calibre.bookUrl, { var reader = ePubReader(calibre.bookUrl, {
restore: true, restore: true,
bookmarks: [calibre.bookmark] bookmarks: calibre.bookmark ? [calibre.bookmark] : []
}); });
reader.on("reader:bookmarked", updateBookmark.bind(reader, "add")); reader.on("reader:bookmarked", updateBookmark.bind(reader, "add"));
reader.on("reader:unbookmarked", updateBookmark.bind(reader, "remove")); reader.on("reader:unbookmarked", updateBookmark.bind(reader, "remove"));
@ -21,7 +21,7 @@
// Remove other bookmarks (there can only be one) // Remove other bookmarks (there can only be one)
if (action === "add") { if (action === "add") {
this.settings.bookmarks.filter(function (bookmark) { this.settings.bookmarks.filter(function (bookmark) {
return bookmark !== location; return bookmark && bookmark !== location;
}).map(function (bookmark) { }).map(function (bookmark) {
this.removeBookmark(bookmark); this.removeBookmark(bookmark);
}.bind(this)); }.bind(this));

View File

@ -20,24 +20,24 @@
<!--a id="show-Search" class="show_view icon-search" data-view="Search">Search</a--> <!--a id="show-Search" class="show_view icon-search" data-view="Search">Search</a-->
<a id="show-Toc" class="show_view icon-list-1 active" data-view="Toc">TOC</a> <a id="show-Toc" class="show_view icon-list-1 active" data-view="Toc">TOC</a>
<a id="show-Bookmarks" class="show_view icon-bookmark" data-view="Bookmarks">Bookmarks</a> <a id="show-Bookmarks" class="show_view icon-bookmark" data-view="Bookmarks">Bookmarks</a>
<a id="show-Notes" class="show_view icon-edit" data-view="Notes">Notes</a> <!--a id="show-Notes" class="show_view icon-edit" data-view="Notes">Notes</a-->
</div> </div>
<div id="tocView" class="view"> <div id="tocView" class="view">
</div> </div>
<div id="searchView" class="view"> <!--div id="searchView" class="view">
<ul id="searchResults"></ul> <ul id="searchResults"></ul>
</div> </div-->
<div id="bookmarksView" class="view"> <div id="bookmarksView" class="view">
<ul id="bookmarks"></ul> <ul id="bookmarks"></ul>
</div> </div>
<div id="notesView" class="view"> <!--div id="notesView" class="view">
<div id="new-note"> <div id="new-note">
<textarea id="note-text"></textarea> <textarea id="note-text"></textarea>
<button id="note-anchor">Anchor</button> <button id="note-anchor">Anchor</button>
</div> </div>
<ol id="notes"></ol> <ol id="notes"></ol>
</div> </div-->
</div> </div>
<div id="main"> <div id="main">