summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/protected_branches
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-01-03 16:31:43 +0000
committerPhil Hughes <me@iamphill.com>2017-02-09 09:16:52 +0000
commitcd5bee0d4438e4bb5158b721580cec8687e95e93 (patch)
tree16f3dcc1fb82f30cf1a0bde970e12259e2796cce /app/assets/javascripts/protected_branches
parent059d1ae4c847aa9018c89900b39c2782aa9b623e (diff)
downloadgitlab-ce-cd5bee0d4438e4bb5158b721580cec8687e95e93.tar.gz
Removed jQuery UI highlight & autocompleteremove-jquery-ui-plugins
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.es69
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();
});
}
};