(js) Add links to attachments in message editor

This commit is contained in:
Francis Lachapelle
2015-12-02 16:32:39 -05:00
parent 8f8885a8ea
commit af5599015b
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -215,7 +215,7 @@
<span class="md-default-theme md-warn md-bg"
ng-style="{ width: $chip.progress + '%'}"><!-- progress --></span>
</span>
<span>{{$chip.file.name}}</span>
<a ng-href="{{$chip.inlineUrl}}" target="_new">{{$chip.file.name}}</a>
<md-icon ng-class="{ 'md-warn': $chip.isUploading }"
ng-click="editor.removeAttachment($chip)">close</md-icon>
</md-chip-template>
@@ -32,6 +32,7 @@
onSuccessItem: function(item, response, status, headers) {
stateMessage.$setUID(response.uid);
stateMessage.$reload({asDraft: false});
item.inlineUrl = response.lastAttachmentAttrs[0].url;
//console.debug(item); console.debug('success = ' + JSON.stringify(response, undefined, 2));
},
onCancelItem: function(item, response, status, headers) {
@@ -88,6 +89,7 @@
fileItem.progress = 100;
fileItem.isUploaded = true;
fileItem.isSuccess = true;
fileItem.inlineUrl = vm.message.attachmentAttrs[i].url;
vm.uploader.queue.push(fileItem);
}
}