mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Fixed broken progress on mods update button
This commit is contained in:
parent
47629c5f4d
commit
f121729211
@ -40,20 +40,18 @@ define(function (require) {
|
|||||||
var self = this;
|
var self = this;
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
this.laddaBtn = Ladda.create(this.$el.find(".ladda-button").get(0));
|
var $updateBtn = this.$el.find(".update");
|
||||||
this.laddaBtn.start();
|
var laddaBtn = Ladda.create($updateBtn.get(0));
|
||||||
this.$el.find('.ladda-button').addClass('disabled');
|
laddaBtn.start();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "/api/mods/" + this.model.get('name'),
|
url: "/api/mods/" + this.model.get('name'),
|
||||||
type: 'PUT',
|
type: 'PUT',
|
||||||
success: function (resp) {
|
success: function (resp) {
|
||||||
self.laddaBtn.stop();
|
laddaBtn.stop();
|
||||||
self.$el.find('.ladda-button').removeClass('disabled');
|
|
||||||
},
|
},
|
||||||
error: function (resp) {
|
error: function (resp) {
|
||||||
self.laddaBtn.stop();
|
laddaBtn.stop();
|
||||||
self.$el.find('.ladda-button').removeClass('disabled');
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user