Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
leomartinez committed Jun 26, 2018
2 parents a9bf2ed + 448068e commit f7b808a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion resources/assets/js/vues/attachment-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ let methods = {
},

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.$events.emit('success', resp.data.message);
Expand Down
4 changes: 2 additions & 2 deletions resources/views/pages/form-toolbox.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<span class="text-primary small" @click="file.deleting = false;">{{ trans('common.cancel') }}</span>
</div>
</div>
<div @click="startEdit(file)" class="drag-card-action text-center text-primary" style="padding: 0;">@icon('edit')</div>
<div @click="deleteFile(file)" class="drag-card-action text-center text-neg" style="padding: 0;">@icon('close')</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">@icon('close')</div>
</div>
</draggable>
<p class="small muted" v-if="files.length === 0">
Expand Down

0 comments on commit f7b808a

Please sign in to comment.