mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-23 04:15:26 +00:00
@@ -237,14 +237,14 @@
|
||||
</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>
|
||||
ng-click="editor.removeAttachment($chip, 'fileInput')">close</md-icon>
|
||||
</md-chip-template>
|
||||
</md-chips>
|
||||
<label class="md-button md-icon-button" for="file-input">
|
||||
<label class="md-button md-icon-button" for="fileInput">
|
||||
<md-icon>attach_file</md-icon>
|
||||
<!-- <span><var:string label:value="Attach"/></span> -->
|
||||
</label>
|
||||
<input id="file-input" name="file-input" type="file" class="ng-hide"
|
||||
<input id="fileInput" name="fileInput" type="file" class="ng-hide"
|
||||
nv-file-select="nv-file-select"
|
||||
uploader="editor.uploader"/>
|
||||
<!--
|
||||
|
||||
@@ -134,13 +134,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
function removeAttachment(item) {
|
||||
function removeAttachment(item, id) {
|
||||
if (item.isUploading)
|
||||
vm.uploader.cancelItem(item);
|
||||
else {
|
||||
vm.message.$deleteAttachment(item.file.name);
|
||||
item.remove();
|
||||
}
|
||||
// Hack to allow adding the same file again
|
||||
// See https://github.com/nervgh/angular-file-upload/issues/671
|
||||
var element = $window.document.getElementById(id);
|
||||
if (element)
|
||||
angular.element(element).prop('value', null);
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
|
||||
Reference in New Issue
Block a user