Skip to content
Snippets Groups Projects
Commit a68f1fdd authored by Phil Hughes's avatar Phil Hughes
Browse files

Fix form not re-enabling thanks to jQuery

Stop issue being dragged if it doesn't have an ID
parent b9ede4f1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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];
 
Loading
Loading
Loading
Loading
@@ -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();
},
Loading
Loading
Loading
Loading
@@ -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;
Loading
Loading
Loading
Loading
@@ -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" }
Loading
Loading
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment