diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-10-10 01:53:35 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2018-10-17 00:44:22 -0500 |
commit | 46e3ad4b948dedf67245708493ee17c4429f8bf3 (patch) | |
tree | 9afee1a5c952174574832f91763a91e3dd0e8a36 /app/assets/javascripts/sidebar/lib/sidebar_move_issue.js | |
parent | 4695b311130d33593ef938fa13e60aecfa27eb52 (diff) | |
download | gitlab-ce-46e3ad4b948dedf67245708493ee17c4429f8bf3.tar.gz |
Prettify sidebar modules
Diffstat (limited to 'app/assets/javascripts/sidebar/lib/sidebar_move_issue.js')
-rw-r--r-- | app/assets/javascripts/sidebar/lib/sidebar_move_issue.js | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/app/assets/javascripts/sidebar/lib/sidebar_move_issue.js b/app/assets/javascripts/sidebar/lib/sidebar_move_issue.js index b267422cd97..225ebb61195 100644 --- a/app/assets/javascripts/sidebar/lib/sidebar_move_issue.js +++ b/app/assets/javascripts/sidebar/lib/sidebar_move_issue.js @@ -37,7 +37,8 @@ class SidebarMoveIssue { // Keep the dropdown open after selecting an option shouldPropagate: false, data: (searchTerm, callback) => { - this.mediator.fetchAutocompleteProjects(searchTerm) + this.mediator + .fetchAutocompleteProjects(searchTerm) .then(callback) .catch(() => new window.Flash('An error occurred while fetching projects autocomplete.')); }, @@ -48,7 +49,7 @@ class SidebarMoveIssue { </a> </li> `, - clicked: (options) => { + clicked: options => { const project = options.selectedObj; const selectedProjectId = options.isMarking ? project.id : 0; this.mediator.setMoveToProjectId(selectedProjectId); @@ -68,17 +69,12 @@ class SidebarMoveIssue { onConfirmClicked() { if (isValidProjectId(this.mediator.store.moveToProjectId)) { - this.$confirmButton - .disable() - .addClass('is-loading'); + this.$confirmButton.disable().addClass('is-loading'); - this.mediator.moveIssue() - .catch(() => { - window.Flash('An error occurred while moving the issue.'); - this.$confirmButton - .enable() - .removeClass('is-loading'); - }); + this.mediator.moveIssue().catch(() => { + window.Flash('An error occurred while moving the issue.'); + this.$confirmButton.enable().removeClass('is-loading'); + }); } } } |