Merge remote-tracking branch 'adv/bookmarks'

pull/346/head
OzzieIsaacs 7 years ago
commit 378a0ca662

@ -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));

@ -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">

Loading…
Cancel
Save