Fix attachments downloading

Fixes #219
Fixes #256
reviewable/pr310/r1^2
Maxime Quandalle 10 years ago
parent 4594caf9b7
commit ed35a88a56
  1. 2
      client/components/cards/attachments.jade
  2. 9
      client/components/cards/attachments.js

@ -23,7 +23,7 @@ template(name="attachmentsGalery")
p.attachment-details
= name
span.attachment-details-actions
a.js-download
a.js-download(href="{{url download=true}}")
i.fa.fa-download
| {{_ 'download'}}
if isImage

@ -6,11 +6,14 @@ Template.attachmentsGalery.events({
Popup.close();
}
),
// If we let this event bubble, Iron-Router will handle it and empty the
// page content, see #101.
'click .js-open-viewer, click .js-download': function(event) {
// If we let this event bubble, FlowRouter will handle it and empty the page
// content, see #101.
'click .js-download': function(event) {
event.stopPropagation();
},
'click .js-open-viewer': function() {
// XXX Not implemented!
},
'click .js-add-cover': function() {
Cards.update(this.cardId, { $set: { coverId: this._id } });
},

Loading…
Cancel
Save