From 01edb7dbe498b434e258451af94d1bca287d2e40 Mon Sep 17 00:00:00 2001 From: dtluna Date: Sat, 26 Nov 2016 05:00:06 +0300 Subject: Add remove attachment button --- src/components/post_status_form/post_status_form.js | 4 ++++ src/components/post_status_form/post_status_form.vue | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 60698e6e..9995813e 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -63,6 +63,10 @@ const PostStatusForm = { this.newStatus.files.push(fileInfo) this.enableSubmit() }, + removeMediaFile (fileInfo) { + let index = this.newStatus.files.indexOf(fileInfo) + this.newStatus.files.splice(index, 1) + }, disableSubmit () { this.submitDisabled = true }, diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 71787cc5..b18e5d80 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -10,6 +10,7 @@ {{file.url}} +
@@ -56,6 +57,10 @@ .btn[disabled] { cursor: not-allowed; } + + .icon-cancel { + cursor: pointer; + } } -- cgit v1.2.3-70-g09d2