Fix form not re-enabling thanks to jQuery
Stop issue being dragged if it doesn't have an ID
This commit is contained in:
parent
b9ede4f1a5
commit
a68f1fdd29
5 changed files with 10 additions and 5 deletions
|
@ -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];
|
||||
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue