diff options
author | Andrew Dolgov <[email protected]> | 2019-03-15 14:24:07 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-03-15 14:24:07 +0300 |
commit | 8edc1c85da620ae0a7e1a074b49c33e4cb9899a3 (patch) | |
tree | afdf8c42969593f0f352620a5aca972df1a62b17 /js/offline.js | |
parent | fc16a6215ab253c158d0fba85d6571581589c1ad (diff) |
fix cover placeholders
Diffstat (limited to 'js/offline.js')
-rw-r--r-- | js/offline.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/js/offline.js b/js/offline.js index e8af78b..5ad5088 100644 --- a/js/offline.js +++ b/js/offline.js @@ -117,20 +117,22 @@ function populate_list() { </div>`); if (cover) { - cell.find("img") .css("background-image", "url(" + cover + ")") .fadeIn(); + } else { + cell + .find("img").attr("data-src", 'holder.js/130x190?auto=yes') + .fadeIn(); + } - cell.find(".series_link") - .attr("title", info.series_name + " [" + info.series_index + "]") - .attr("href", "offline.html?query=" + encodeURIComponent(info.series_name)); - - cell.find(".author_link") - .attr("title", info.author_sort) - .attr("href", "offline.html?query=" + encodeURIComponent(info.author_sort)); + cell.find(".series_link") + .attr("title", info.series_name + " [" + info.series_index + "]") + .attr("href", "offline.html?query=" + encodeURIComponent(info.series_name)); - } + cell.find(".author_link") + .attr("title", info.author_sort) + .attr("href", "offline.html?query=" + encodeURIComponent(info.author_sort)); books.append(cell); |