Make the subscribe button work correctly
This commit is contained in:
parent
7d20a91b2e
commit
e457161498
|
@ -1,4 +1,6 @@
|
|||
(() => {
|
||||
const Store = gl.issueBoards.BoardsStore;
|
||||
|
||||
window.gl = window.gl || {};
|
||||
|
||||
gl.issueBoards.BoardNewIssue = Vue.extend({
|
||||
|
@ -27,13 +29,16 @@
|
|||
const labels = this.list.label ? [this.list.label] : [];
|
||||
const issue = new ListIssue({
|
||||
title: this.title,
|
||||
labels
|
||||
labels,
|
||||
subscribed: true
|
||||
});
|
||||
|
||||
this.list.newIssue(issue)
|
||||
.then((data) => {
|
||||
// Need this because our jQuery very kindly disables buttons on ALL form submissions
|
||||
$(this.$els.submitButton).enable();
|
||||
|
||||
Store.detail.issue = issue;
|
||||
})
|
||||
.catch(() => {
|
||||
// Need this because our jQuery very kindly disables buttons on ALL form submissions
|
||||
|
|
|
@ -4,7 +4,7 @@ class ListIssue {
|
|||
this.title = obj.title;
|
||||
this.confidential = obj.confidential;
|
||||
this.dueDate = obj.due_date;
|
||||
this.subscribed = true;
|
||||
this.subscribed = obj.subscribed;
|
||||
this.labels = [];
|
||||
|
||||
if (obj.assignee) {
|
||||
|
|
Loading…
Reference in New Issue