瀏覽代碼

Fix attachments downloading

Fixes #219
Fixes #256
Maxime Quandalle 9 年之前
父節點
當前提交
ed35a88a56
共有 2 個文件被更改,包括 7 次插入4 次删除
  1. 1 1
      client/components/cards/attachments.jade
  2. 6 3
      client/components/cards/attachments.js

+ 1 - 1
client/components/cards/attachments.jade

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

+ 6 - 3
client/components/cards/attachments.js

@@ -6,11 +6,14 @@ Template.attachmentsGalery.events({
       Popup.close();
       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();
     event.stopPropagation();
   },
   },
+  'click .js-open-viewer': function() {
+    // XXX Not implemented!
+  },
   'click .js-add-cover': function() {
   'click .js-add-cover': function() {
     Cards.update(this.cardId, { $set: { coverId: this._id } });
     Cards.update(this.cardId, { $set: { coverId: this._id } });
   },
   },