Commit bd3203b8 authored by Rémy Coutable's avatar Rémy Coutable

Remove dead code and align with some JS code from CE

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 7a1a90f2
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
minimumInputLength: 0, minimumInputLength: 0,
query: function(query) { query: function(query) {
var group_result, project_result; var group_result, project_result;
group_result = Api.groups(query.term, { skip_ldap: skip_ldap }, function(groups) { group_result = Api.groups(query.term, {}, function(groups) {
return groups; return groups;
}); });
project_result = Api.projects(query.term, 'id', function(projects) { project_result = Api.projects(query.term, 'id', function(projects) {
......
/* eslint-disable */
(function() { (function() {
var slice = [].slice; var slice = [].slice;
...@@ -5,8 +6,7 @@ ...@@ -5,8 +6,7 @@
function GroupsSelect() { function GroupsSelect() {
$('.ajax-groups-select').each((function(_this) { $('.ajax-groups-select').each((function(_this) {
return function(i, select) { return function(i, select) {
var skip_ldap, all_available, skip_groups; var all_available, skip_groups;
skip_ldap = $(select).hasClass('skip_ldap');
all_available = $(select).data('all-available'); all_available = $(select).data('all-available');
skip_groups = $(select).data('skip-groups') || []; skip_groups = $(select).data('skip-groups') || [];
return $(select).select2({ return $(select).select2({
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
multiple: $(select).hasClass('multiselect'), multiple: $(select).hasClass('multiselect'),
minimumInputLength: 0, minimumInputLength: 0,
query: function(query) { query: function(query) {
options = { all_available: all_available, skip_groups: skip_groups } options = { all_available: all_available, skip_groups: skip_groups };
return Api.groups(query.term, options, function(groups) { return Api.groups(query.term, options, function(groups) {
var data; var data;
data = { data = {
......
...@@ -35,9 +35,6 @@ ...@@ -35,9 +35,6 @@
} }
}); });
}; };
gl.utils.capitalize = function(str) {
return str[0].toUpperCase() + str.slice(1);
};
gl.utils.getPagePath = function() { gl.utils.getPagePath = function() {
return $('body').data('page').split(':')[0]; return $('body').data('page').split(':')[0];
}; };
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
callback = function() { callback = function() {
return merge_request_widget.mergeInProgress(deleteSourceBranch); return merge_request_widget.mergeInProgress(deleteSourceBranch);
}; };
return setTimeout(callback, 1000); return setTimeout(callback, 2000);
} }
}; };
})(this), })(this),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment