only switch button to transferring after download api returns

This commit is contained in:
j 2016-01-17 17:01:30 +05:30
parent 1266fb9133
commit 0311a33814

View file

@ -184,10 +184,12 @@ oml.ui.infoView = function(externalData, isMixed) {
}) })
.bindEvent({ .bindEvent({
click: function() { click: function() {
data.mediastate = 'transferring'; var _this = this;
that.updateElement(data, $data); this.options({disabled: true});
oml.api.download({id: ui.item}, function(result) { oml.api.download({id: ui.item}, function(result) {
// ... _this.options({disabled: false});
data.mediastate = 'transferring';
that.updateElement(data, $data);
}); });
} }
}), }),