Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
d3e34cd1
Commit
d3e34cd1
authored
Feb 08, 2017
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appease lint
parent
97ecae00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
app/assets/javascripts/task_list.js.es6
app/assets/javascripts/task_list.js.es6
+8
-9
No files found.
app/assets/javascripts/task_list.js.es6
View file @
d3e34cd1
...
@@ -14,29 +14,28 @@ class TaskList {
...
@@ -14,29 +14,28 @@ class TaskList {
init() {
init() {
// Prevent duplicate event bindings
// Prevent duplicate event bindings
this.disable();
this.disable();
$(
this.selector + ' .js-task-list-container'
).taskList('enable');
$(
`${this.selector} .js-task-list-container`
).taskList('enable');
$(document).on('tasklist:changed',
this.selector + ' .js-task-list-container'
, this.update);
$(document).on('tasklist:changed',
`${this.selector} .js-task-list-container`
, this.update);
}
}
disable() {
disable() {
$(
this.selector + ' .js-task-list-container'
).taskList('disable');
$(
`${this.selector} .js-task-list-container`
).taskList('disable');
return $(document).off('tasklist:changed',
this.selector + ' .js-task-list-container'
);
return $(document).off('tasklist:changed',
`${this.selector} .js-task-list-container`
);
}
}
update(e) {
update(e) {
var patchData;
const patchData = {};
patchData = {};
patchData[this.dataType] = {
patchData[this.dataType] = {
'description': $(e.target).val()
description: $(e.target).val(),
};
};
return $.ajax({
return $.ajax({
type: 'PATCH',
type: 'PATCH',
url: $('form.js-issuable-update').attr('action'),
url: $('form.js-issuable-update').attr('action'),
data: patchData,
data: patchData,
success:
function(result)
{
success:
(result) =>
{
document.querySelector('#task_status').innerText = result.task_status;
document.querySelector('#task_status').innerText = result.task_status;
document.querySelector('#task_status_short').innerText = result.task_status_short;
document.querySelector('#task_status_short').innerText = result.task_status_short;
}
}
,
});
});
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment