Tweak to file uploader so that if the upload is complete, it just removes the UI item
This commit is contained in:
@@ -99,7 +99,10 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
|
||||
size: data.size,
|
||||
progress: ko.observable(data.progress),
|
||||
cancel: function () {
|
||||
$("#fileupload").fileUploader("cancelItem", this.itemId);
|
||||
if(this.progress() < 100)
|
||||
$("#fileupload").fileUploader("cancelItem", this.itemId);
|
||||
else
|
||||
_this._viewModel.queued.remove(this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user