Commit 15978b8d authored by Bryce Johnson's avatar Bryce Johnson

Revert autoupdate implementation.

parent ae7d3c63
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
abilityName = $dropdown.data('ability-name'); abilityName = $dropdown.data('ability-name');
$loading = $block.find('.block-loading').fadeOut(); $loading = $block.find('.block-loading').fadeOut();
var ajaxResource = gl.IssuableResource ? gl.IssuableResource.put.bind(gl.IssuableResource) : $.ajax;
var renderMethod = function(data) { var renderMethod = function(data) {
if (data.weight != null) { if (data.weight != null) {
...@@ -24,7 +23,9 @@ ...@@ -24,7 +23,9 @@
return $sidebarCollapsedValue.html(data.weight); return $sidebarCollapsedValue.html(data.weight);
}; };
gl.IssuableResource && gl.IssuableResource.subscribe(renderMethod); if (gl.IssuableResource) {
gl.IssuableResource.subscribe(renderMethod);
}
updateWeight = function(selected) { updateWeight = function(selected) {
var data; var data;
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
data[abilityName].weight = selected != null ? selected : null; data[abilityName].weight = selected != null ? selected : null;
$loading.fadeIn(); $loading.fadeIn();
$dropdown.trigger('loading.gl.dropdown'); $dropdown.trigger('loading.gl.dropdown');
return ajaxResource({ return $.ajax({
type: 'PUT', type: 'PUT',
dataType: 'json', dataType: 'json',
url: updateUrl, url: updateUrl,
......
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