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 @@
minimumInputLength: 0,
query: function(query) {
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;
});
project_result = Api.projects(query.term, 'id', function(projects) {
......
/* eslint-disable */
(function() {
var slice = [].slice;
......@@ -5,8 +6,7 @@
function GroupsSelect() {
$('.ajax-groups-select').each((function(_this) {
return function(i, select) {
var skip_ldap, all_available, skip_groups;
skip_ldap = $(select).hasClass('skip_ldap');
var all_available, skip_groups;
all_available = $(select).data('all-available');
skip_groups = $(select).data('skip-groups') || [];
return $(select).select2({
......@@ -14,7 +14,7 @@
multiple: $(select).hasClass('multiselect'),
minimumInputLength: 0,
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) {
var data;
data = {
......
......@@ -35,9 +35,6 @@
}
});
};
gl.utils.capitalize = function(str) {
return str[0].toUpperCase() + str.slice(1);
};
gl.utils.getPagePath = function() {
return $('body').data('page').split(':')[0];
};
......
......@@ -105,7 +105,7 @@
callback = function() {
return merge_request_widget.mergeInProgress(deleteSourceBranch);
};
return setTimeout(callback, 1000);
return setTimeout(callback, 2000);
}
};
})(this),
......@@ -228,11 +228,11 @@
if ($(`.mr-state-widget #${ environment.id }`).length) return;
const $template = $(DEPLOYMENT_TEMPLATE);
if (!environment.external_url || !environment.external_url_formatted) $('.js-environment-link', $template).remove();
if (!environment.stop_url) {
$('.js-stop-env-link', $template).remove();
}
if (environment.deployed_at && environment.deployed_at_formatted) {
environment.deployed_at = $.timeago(environment.deployed_at) + '.';
} else {
......
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