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() {
var _this = this;
this.options({disabled: true});
oml.api.download({id: ui.item}, function(result) {
_this.options({disabled: false});
data.mediastate = 'transferring'; data.mediastate = 'transferring';
that.updateElement(data, $data); that.updateElement(data, $data);
oml.api.download({id: ui.item}, function(result) {
// ...
}); });
} }
}), }),