From 9eb03d82b664cd72f94e844109a931a084d8ffbb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 29 Jun 2018 16:56:40 +0300 Subject: cleanup toc displays; fix generated toc; reinstate offline list covers --- js/offline.js | 2 ++ read.html | 15 ++++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/js/offline.js b/js/offline.js index a3448a1..a7c8dcf 100644 --- a/js/offline.js +++ b/js/offline.js @@ -127,6 +127,8 @@ function populate_list() { if (cover) { + cell.find("img").attr("src", cover); + cell.find(".series_link") .attr("title", info.series_name + " [" + info.series_index + "]") .attr("href", "offline.html?query=" + encodeURIComponent(info.series_name)); diff --git a/read.html b/read.html index d7533a5..87dbbe0 100644 --- a/read.html +++ b/read.html @@ -584,8 +584,7 @@ var a = $("") .attr('href', '#') - .html(row.label + " " + - "FIXME" + "") + .html(row.label) .attr('data-href', row.href) .click(function() { book.rendition.display(a.attr('data-href')); @@ -612,8 +611,7 @@ try { var a = $("") .attr('href', '#') - .html(row.label + " " + - "FIXME" + "") + .html(row.label) .attr('data-href', row.href) .click(function() { book.rendition.display(a.attr('data-href')); @@ -633,16 +631,15 @@ list.html(""); - $.each(book.spine, function (i, row) { + $.each(book.spine.items, function (i, row) { var a = $("") .attr('href', '#') .attr('title', row.url) - .html("Section " + (i+1) + " (Loc. " + - book.pagination.pageFromCfi(row.cfi) + ")") - .attr('data-cfi', row.cfi) + .html("Section " + (i+1)) + .attr('data-href', row.href) .click(function() { - book.gotoCfi(a.attr('data-cfi')); + book.rendition.display(a.attr('data-href')); }); list.append($("
  • ").append(a)); -- cgit v1.2.3