mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Add support for viewing pdfs
This commit is contained in:
parent
f177e416ee
commit
070e8831b4
3 changed files with 67 additions and 2 deletions
|
|
@ -5,6 +5,17 @@ const filesize = require('filesize');
|
|||
const prettyMilliseconds = require('pretty-ms');
|
||||
|
||||
Template.attachmentsGalery.events({
|
||||
'click .pdf'(event) {
|
||||
let link = $(event.currentTarget).attr("href");
|
||||
$("#pdf-viewer").attr("data", link);
|
||||
$("#viewer-overlay").removeClass("hidden");
|
||||
},
|
||||
'click #viewer-container'(event) {
|
||||
$("#viewer-overlay").addClass("hidden");
|
||||
},
|
||||
'click #viewer-close'(event) {
|
||||
$("#viewer-overlay").addClass("hidden");
|
||||
},
|
||||
'click .js-add-attachment': Popup.open('cardAttachments'),
|
||||
// If we let this event bubble, FlowRouter will handle it and empty the page
|
||||
// content, see #101.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue