diff options
author | Phil Hughes <me@iamphill.com> | 2017-01-03 19:31:43 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-02-09 12:16:52 +0300 |
commit | cd5bee0d4438e4bb5158b721580cec8687e95e93 (patch) | |
tree | 16f3dcc1fb82f30cf1a0bde970e12259e2796cce /app/assets/javascripts/protected_branches | |
parent | 059d1ae4c847aa9018c89900b39c2782aa9b623e (diff) |
Removed jQuery UI highlight & autocomplete
In an effort to tackle #18437 this removes 2 of the jQuery UI plugins. Highlight & autocomplete, both used once in our code. Highlight was just removed easily, autocomplete was replaced with GL dropdown
Diffstat (limited to 'app/assets/javascripts/protected_branches')
-rw-r--r-- | app/assets/javascripts/protected_branches/protected_branch_edit.js.es6 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/assets/javascripts/protected_branches/protected_branch_edit.js.es6 b/app/assets/javascripts/protected_branches/protected_branch_edit.js.es6 index 149e511451e..6ef59e94384 100644 --- a/app/assets/javascripts/protected_branches/protected_branch_edit.js.es6 +++ b/app/assets/javascripts/protected_branches/protected_branch_edit.js.es6 @@ -36,6 +36,9 @@ // Do not update if one dropdown has not selected any option if (!($allowedToMergeInput.length && $allowedToPushInput.length)) return; + this.$allowedToMergeDropdown.disable(); + this.$allowedToPushDropdown.disable(); + $.ajax({ type: 'POST', url: this.$wrap.data('url'), @@ -53,13 +56,13 @@ }] } }, - success: () => { - this.$wrap.effect('highlight'); - }, error() { $.scrollTo(0); new Flash('Failed to update branch!'); } + }).always(() => { + this.$allowedToMergeDropdown.enable(); + this.$allowedToPushDropdown.enable(); }); } }; |