Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Leonardo Martinez 2018-06-26 09:37:20 -03:00
commit f7b808a9e6
2 changed files with 5 additions and 3 deletions

View File

@ -52,7 +52,9 @@ let methods = {
}, },
deleteFile(file) { deleteFile(file) {
if (!file.deleting) return file.deleting = true; if (!file.deleting) {
return this.$set(file, 'deleting', true);
}
this.$http.delete(window.baseUrl(`/attachments/${file.id}`)).then(resp => { this.$http.delete(window.baseUrl(`/attachments/${file.id}`)).then(resp => {
this.$events.emit('success', resp.data.message); this.$events.emit('success', resp.data.message);

View File

@ -42,8 +42,8 @@
<span class="text-primary small" @click="file.deleting = false;">{{ trans('common.cancel') }}</span> <span class="text-primary small" @click="file.deleting = false;">{{ trans('common.cancel') }}</span>
</div> </div>
</div> </div>
<div @click="startEdit(file)" class="drag-card-action text-center text-primary" style="padding: 0;">@icon('edit')</div> <div @click="startEdit(file)" class="drag-card-action text-center text-primary">@icon('edit')</div>
<div @click="deleteFile(file)" class="drag-card-action text-center text-neg" style="padding: 0;">@icon('close')</div> <div @click="deleteFile(file)" class="drag-card-action text-center text-neg">@icon('close')</div>
</div> </div>
</draggable> </draggable>
<p class="small muted" v-if="files.length === 0"> <p class="small muted" v-if="files.length === 0">