diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-10-10 01:41:22 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-10-17 00:40:17 -0500 |
commit | d2ee2eabc2a6b9037e98f3feb9d1534ebda79e19 (patch) | |
tree | c5ed1096ef59229ad610043ff2c5c86db0f91e2c /app/assets/javascripts/pages/dashboard | |
parent | d87e88a616f370421add5b3d964550e456430432 (diff) | |
download | gitlab-ce-d2ee2eabc2a6b9037e98f3feb9d1534ebda79e19.tar.gz |
Prettify app/assets/javascripts/pagesprettify-all-the-things-3
Diffstat (limited to 'app/assets/javascripts/pages/dashboard')
-rw-r--r-- | app/assets/javascripts/pages/dashboard/todos/index/todos.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/app/assets/javascripts/pages/dashboard/todos/index/todos.js b/app/assets/javascripts/pages/dashboard/todos/index/todos.js index 72f3f70b98f..1b56b97f751 100644 --- a/app/assets/javascripts/pages/dashboard/todos/index/todos.js +++ b/app/assets/javascripts/pages/dashboard/todos/index/todos.js @@ -79,7 +79,8 @@ export default class Todos { .then(({ data }) => { this.updateRowState(target); this.updateBadges(data); - }).catch(() => { + }) + .catch(() => { this.updateRowState(target, true); return flash(__('Error updating todo status.')); }); @@ -118,10 +119,12 @@ export default class Todos { axios[target.dataset.method](target.dataset.href, { ids: this.todo_ids, - }).then(({ data }) => { - this.updateAllState(target, data); - this.updateBadges(data); - }).catch(() => flash(__('Error updating status for all todos.'))); + }) + .then(({ data }) => { + this.updateAllState(target, data); + this.updateBadges(data); + }) + .catch(() => flash(__('Error updating status for all todos.'))); } updateAllState(target, data) { @@ -133,7 +136,7 @@ export default class Todos { target.removeAttribute('disabled'); target.classList.remove('disabled'); - this.todo_ids = (target === markAllDoneBtn) ? data.updated_ids : []; + this.todo_ids = target === markAllDoneBtn ? data.updated_ids : []; undoAllBtn.classList.toggle('hidden'); markAllDoneBtn.classList.toggle('hidden'); todoListContainer.classList.toggle('hidden'); |