From 674da55bde86cbe7706fb21642bd3f9dacf44b0b Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Mon, 15 Jun 2020 12:54:42 +0000 Subject: [PATCH] Add entry download button (#45) --- public/js/title.js | 4 +++- src/views/components/entry-modal.ecr | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/public/js/title.js b/public/js/title.js index d23cf8f..95d69f9 100644 --- a/public/js/title.js +++ b/public/js/title.js @@ -35,7 +35,9 @@ function showModal(encodedPath, pages, percentage, encodedeTitle, encodedEntryTi updateProgress(titleID, entryID, 0); }); - $('.uk-modal-title.break-word > a').attr('onclick', `edit("${entryID}")`); + $('#modal-edit-btn').attr('onclick', `edit("${entryID}")`); + + $('#modal-download-btn').attr('href', `/opds/download/${titleID}/${entryID}`); UIkit.modal($('#modal')).show(); styleModal(); diff --git a/src/views/components/entry-modal.ecr b/src/views/components/entry-modal.ecr index c064f4c..2019e9f 100644 --- a/src/views/components/entry-modal.ecr +++ b/src/views/components/entry-modal.ecr @@ -10,9 +10,10 @@ <% unless page == "home" %>   <% if is_admin %> - + <% end %> <% end %> +