Add entry download button (#45)

This commit is contained in:
Alex Ling 2020-06-15 12:54:42 +00:00
parent dc084aff7c
commit 674da55bde
2 changed files with 5 additions and 2 deletions

View File

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

View File

@ -10,9 +10,10 @@
<% unless page == "home" %>
&nbsp;
<% if is_admin %>
<a class="uk-icon-button" uk-icon="icon:pencil"></a>
<a id="modal-edit-btn" class="uk-icon-button" uk-icon="icon:pencil"></a>
<% end %>
<% end %>
<a id="modal-download-btn" class="uk-icon-button" uk-icon="icon:download"></a>
</h3>
</div>
<p class="uk-text-meta uk-margin-remove-bottom break-word" id="path-text"></p>