Maximum file size exceeded<\/div>"),r.counter.add(),r.counter.added()>r.maxFiles&&(i=":
Only "+r.maxFiles+" item"+(r.maxFiles>1?"s":"")+" can be uploaded.<\/div>"),i.length>0&&r.counter.addError(),r.processFileAdd(t,u,i),typeof r.onAdded=="function")r.onAdded(t,u,i)},submit:function(n,t){if(!t.context.is(":visible"))return!1;if(t.context.hasClass("hasError"))return t.context.remove(),r.counter.removeError(),r.counter.remove(),!1;t.context.find(".delete").addClass("loading");t.formData=[{name:"__RequestVerificationToken",value:VM.Uploader.verificationToken},{name:"tag",value:$("#"+VM.Uploader.prefix+"TagId").val()||""}]},progress:function(n,t){var i=parseInt(t.loaded/t.total*100,10);t.context.find(".progress-bar").css("width",i+"%").attr("aria-valuenow",i);i===100&&t.context.find(".progress-bar").removeClass("progress-bar-info").addClass("progress-bar-success")},done:function(n,t){var i=VM.Uploader,u,f;if(i.counter.complete(),t.result){if(u=t.result,u)if(u.ErrorMessage!==null)f=u.ErrorMessage,r.counter.addError();else{if(r.counter.upload(),typeof r.onUpload=="function")r.onUpload(t,u);i.counter.canSubmit()&&i.done();return}else f="That file could not be uploaded.",r.counter.addError();t.context.addClass("hasError");t.context.find(".upload-filename").append("
"+f+"<\/div>");t.context.find(".progress-bar").removeClass("progress-bar-success").addClass("progress-bar-danger");r.$start.off("click");i.counter.isComplete()&&i.done();typeof r.onUploaded=="function"&&r.onUploaded()}},fail:function(n,t){t.context.remove();var i;try{i=t.errorThrown==="Not Found"||t.errorThrown.name==="SyntaxError"?t.files[0].name+" exceeds the maximum upload size limit.":t.errorThrown}catch(n){i="There was a problem uploading "+t.files[0].name}alert(i);this.counter.addError()}})},processFileAdd:function(n,t,i){var u=VM.Uploader,f=i.length>0?" hasError":"",r,e=i.length===0?"progress-bar-info":"progress-bar-danger";n.context=$('
|