Commit d2c94c55 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'tt-revert-weight-change' into 'master'

Revert adding renderMethod to weight select.

Removes an inadvertent revision that throws console errors on issuables.

See merge request !899
parents f8f84a3b 92ce4571
...@@ -12,21 +12,6 @@ ...@@ -12,21 +12,6 @@
$value = $block.find('.value'); $value = $block.find('.value');
abilityName = $dropdown.data('ability-name'); abilityName = $dropdown.data('ability-name');
$loading = $block.find('.block-loading').fadeOut(); $loading = $block.find('.block-loading').fadeOut();
var renderMethod = function(data) {
if (data.weight != null) {
$value.html(data.weight);
} else {
$value.html('None');
}
return $sidebarCollapsedValue.html(data.weight);
};
if (gl.IssuableResource) {
gl.IssuableResource.subscribe(renderMethod);
}
updateWeight = function(selected) { updateWeight = function(selected) {
var data; var data;
data = {}; data = {};
...@@ -43,7 +28,12 @@ ...@@ -43,7 +28,12 @@
$dropdown.trigger('loaded.gl.dropdown'); $dropdown.trigger('loaded.gl.dropdown');
$loading.fadeOut(); $loading.fadeOut();
$selectbox.hide(); $selectbox.hide();
renderMethod(data); if (data.weight != null) {
$value.html(data.weight);
} else {
$value.html('None');
}
return $sidebarCollapsedValue.html(data.weight);
}); });
}; };
return $dropdown.glDropdown({ return $dropdown.glDropdown({
......
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