diff --git a/app/assets/javascripts/boards/components/board_list.js.es6 b/app/assets/javascripts/boards/components/board_list.js.es6 index 208aac504fd591e46f23391544e5d6c142383659..7022a29e81874fff9002f48f09ff25f56bf61054 100644 --- a/app/assets/javascripts/boards/components/board_list.js.es6 +++ b/app/assets/javascripts/boards/components/board_list.js.es6 @@ -76,7 +76,7 @@ group: 'issues', sort: false, disabled: this.disabled, - filter: '.board-list-count, .board-new-issue-form', + filter: '.board-list-count, .is-disabled', onStart: (e) => { const card = this.$refs.issue[e.oldIndex]; diff --git a/app/assets/javascripts/boards/components/board_new_issue.js.es6 b/app/assets/javascripts/boards/components/board_new_issue.js.es6 index eb26ed9721dba5f702a596d379d16f51279441f3..315c16ee242d534f7c5a91b70d7196548359cc10 100644 --- a/app/assets/javascripts/boards/components/board_new_issue.js.es6 +++ b/app/assets/javascripts/boards/components/board_new_issue.js.es6 @@ -25,7 +25,11 @@ labels }); - this.list.newIssue(issue); + this.list.newIssue(issue) + .then(() => { + // Need this because our jQuery very kindly disables buttons on ALL form submissions + $(this.$els.submitButton).enable(); + }); this.cancel(); }, diff --git a/app/assets/javascripts/boards/models/list.js.es6 b/app/assets/javascripts/boards/models/list.js.es6 index 14e42db4cd2ef60d45f52e4c0e874a1635d121fc..5d0a561cdbab4a1b689d9dbc3e508b881284a7ad 100644 --- a/app/assets/javascripts/boards/models/list.js.es6 +++ b/app/assets/javascripts/boards/models/list.js.es6 @@ -91,7 +91,7 @@ class List { this.addIssue(issue); this.issuesSize++; - gl.boardService.newIssue(this.id, issue) + return gl.boardService.newIssue(this.id, issue) .then((resp) => { const data = resp.json(); issue.id = data.iid; diff --git a/app/views/projects/boards/components/_board.html.haml b/app/views/projects/boards/components/_board.html.haml index 4d7d831920427c9fed7331a7ecc97341f05a6a17..26b2236b58174b067e37f9a74ed306fba368fd10 100644 --- a/app/views/projects/boards/components/_board.html.haml +++ b/app/views/projects/boards/components/_board.html.haml @@ -54,7 +54,8 @@ ":id" => "list.id + '-title'" } .clearfix.prepend-top-10 %button.btn.btn-success.pull-left{ type: "submit", - ":disabled" => "title === ''" } + ":disabled" => "title === ''", + "v-el:submit-button" => true } Submit issue %button.btn.btn-default.pull-right{ type: "button", "@click" => "cancel" } diff --git a/app/views/projects/boards/components/_card.html.haml b/app/views/projects/boards/components/_card.html.haml index 25701b0a99e2b55b42ba1c5504e9fc9f98761c8b..f15c87c8185b2bf997821551b486849e9618b6e5 100644 --- a/app/views/projects/boards/components/_card.html.haml +++ b/app/views/projects/boards/components/_card.html.haml @@ -7,7 +7,7 @@ ":issue-link-base" => "issueLinkBase", ":disabled" => "disabled", "track-by" => "id" } - %li.card{ ":class" => "{ 'user-can-drag': !disabled }", + %li.card{ ":class" => "{ 'user-can-drag': !disabled && issue.id, 'is-disabled': disabled || !issue.id }", ":index" => "index" } %h4.card-title = icon("eye-slash", class: "confidential-icon", "v-if" => "issue.confidential")