|
|
|
|
@ -13,7 +13,21 @@ Template.uploadedFilesList.helpers |
|
|
|
|
|
|
|
|
|
return 'icon-docs' |
|
|
|
|
|
|
|
|
|
customClassForFileType: -> |
|
|
|
|
if this.type.match(/^image\/.+$/) |
|
|
|
|
return 'room-files-swipebox' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Template.uploadedFilesList.events |
|
|
|
|
'click .room-file-item': (e, t) -> |
|
|
|
|
if $(e.currentTarget).siblings('.icon-picture').length |
|
|
|
|
e.preventDefault() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Template.uploadedFilesList.onCreated -> |
|
|
|
|
instance = this |
|
|
|
|
this.autorun -> |
|
|
|
|
instance.subscribe 'roomFiles', Session.get('openedRoom') |
|
|
|
|
|
|
|
|
|
Template.uploadedFilesList.onRendered -> |
|
|
|
|
$('.room-files-swipebox').swipebox() |
|
|
|
|
|