Tweak to file uploader so that if the upload is complete, it just removes the UI item

This commit is contained in:
Matt@MBP13-PC
2012-07-30 10:22:35 -01:00
parent fe87f6b89f
commit 60ec172d37

View File

@@ -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);
}
};