(function(a,b){var c={BelowFileInput:0,AboveFileInput:1}; if(!b.RadAsyncUpload.Statics){b.RadAsyncUpload.Statics={}; }b.RadAsyncUpload.Statics={extendViewWith:function(d){a.extend(d,{_calculateSelectedFiles:function(e){if(e.hasClass("ruUploadSuccess")||e.hasClass("ruUploadFailure")||e.hasClass("ruUploadCancelled")||e.hasClass("ruUploading")){this._selectedFilesCount--; }},_appendCancelButton:function(e){var f=this._createSpan("ruButton ruCancel",this.get_localization()["Cancel"],this._tabIndex); if(this._enableAriaSupport){this._applyBusyAriaAttribute(a(f),true); this._applyRoleAriaAttribute(a(f),"button"); this._applyLabelAriaAttribute(a(f),a(e).find(".ruUploadProgress").text()+" "+this.get_localization()["Cancel"]); }e.appendChild(f); return f; },_appendSelectButton:function(e){var f=this._createSpan("ruButton ruBrowse",this.get_localization()["Select"],"-1"); e.appendChild(f); return f; },_createSpan:function(e,g,f){return a(""+g+"").attr({"class":e})[0]; },_createStyledRow:function(){var e=a("
  • "),f=a("")[0]; e.append(f); e.addClass("ruSelectWrap"); return e; },_appendFakeInput:function(e){var f; if(!this._hideFileInput){f=this._createSpan("ruFakeInput","","-1"); e.appendChild(f); }this._appendSelectButton(e); },_updateRowContent:function(h,g){var f,e=a(""+$telerik.htmlEncode(this._getFileName(g))+""); a(h).removeClass("ruSelectWrap").addClass("ruFileLI ruUploading").prepend(""); if(this._isManualUpload()){e.addClass("ruUploadOnHold"); }if(this._enableInlineProgress){f=a(''); e.append(f); }a(".ruFakeInput, .ruBrowse",h).remove(); a(".ruFileWrap",h).append(e); },_updateRowImage:function(f,g){var e; switch(g){case"success":e="ruUploadSuccess"; break; case"cancel":e="ruUploadCancelled"; break; default:e="ruUploadFailure"; break; }if(this._isManualUpload()){a(".ruUploadOnHold",f).removeClass("ruUploadOnHold"); }a(f).removeClass("ruUploading").addClass(e); },_updateCancelButton:function(g){var f=this.get_localization()["Remove"]; var e=a(".ruCancel",g); e.removeClass("ruCancel").addClass("ruRemove"); if(this._enableAriaSupport){e.prev().attr("aria-hidden","true"); this._applyLabelAriaAttribute(e,a(g).find(".ruUploadProgress").text()+" "+this.get_localization()["Remove"]); this._applyBusyAriaAttribute(e); }e.text(f); },_disable:function(){var e=this.get_element(); a(e).addClass("ruDisabled"); a("input",e).add(e).attr("disabled","disabled"); },_enable:function(){var e=this.get_element(); a(e).removeClass("ruDisabled"); a("input[disabled]",e).add(e).removeAttr("disabled"); },_marshalUploadedFiles:function(f){var n=this; var e=Sys.Serialization.JavaScriptSerializer.deserialize(f); var o=e.uploadedFiles; var m=function(j){var i=a('
  • '+o[j].fileInfo.FileName+''+l+"
  • "); i.data("fileInfo",o[j]); a(".ruInputs",n.get_element()).append(i); }; this._uploadedFiles=o; this._selectedFilesCount=o.length; var l=this.get_localization()["Remove"]; this._uploadedFiles=o; this._selectedFilesCount=o.length; if(this._uploadedFilesRendering===c.AboveFileInput){for(var g=0,k=o.length; g=0; h--){m(h); }}},_initializeKeyboardSupport:function(){var f=this; var e=a(this._element); e.on("focus",function(g){g.preventDefault(); f._onFocus(); }).on("focus",".ruFileInput",function(g){f._onInputFocus(g); }).on("blur",".ruFileInput",function(g){f._onInputBlur(g); }); e.removeAttr("tabindex").removeAttr("accesskey"); if($telerik.isIE){a(this._element).removeAttr("tabIndex").removeAttr("accessKey"); }a(document).on("keydown."+this.get_id(),function(h){var g=f._accessKey; if($telerik.isFirefox){if(h.altKey==true&&h.shiftKey==true&&h.which==g.charCodeAt()){f._onFocus(); }}if($telerik.isChrome||$telerik.isSafari||$telerik.isIE){if(h.altKey==true&&h.which==g.charCodeAt()){f._onFocus(); }}}); e.on("keyup",".ruRemove",function(g){var h=g.which; if(h===13||h===32){f._deleteFileInput(g.target.parentNode,false); }}); e.on("keyup",".ruCancel",function(g){var h=g.which; if(h===13||h===32){f._cancelUpload(g.target.parentNode); if(!f.get_isUploading()&&f._isPaused){f._resumeFileBrowsing(); }}}); },_applySelectedAriaAttribute:function(e,f){e.attr("aria-selected",!!f); },_applyBusyAriaAttribute:function(e,f){e.attr("aria-busy",!!f); },_applyLabelAriaAttribute:function(e,f){e.attr("aria-label",f); },_applyRoleAriaAttribute:function(e,f){e.attr("role",f); },_onInputBlur:function(){var e=a(this._element).find(".ruButton.ruBrowse"); e.removeClass("ruFocused"); if(this._enableAriaSupport){}},_onInputFocus:function(){var e=a(this._element).find(".ruButton.ruBrowse"); e.addClass("ruFocused"); if(this._enableAriaSupport){}},_deleteFileInput:function(h,i,j){var e=a(h); if(e.hasClass("ruUploadSuccess")){var f=e.data("fileInfo"); if(this._onFileUploadRemoving(f,e[0],e.index())){return; }Array.remove(this._uploadedFiles,f); this.updateClientState(); this._uploadModule.rowRemoved(e); if(e.find("span span object").length==1&&!j){this._markForDeletion(e); }else{e.remove(); }}else{e.remove(); }this._calculateSelectedFiles(e); var g=e.find(".ruUploadProgress").text(); this._onFileUploadRemoved(g); if(this._shouldAddNewInputOnDelete()){this.addFileInput(); }},getUploadedFiles:function(){var e=[]; a(".ruUploadSuccess .ruUploadProgress",this.get_element()).each(function(f,g){e[f]=a(g).text(); }); return e; },getInvalidFiles:function(){var e=[]; a(".ruUploadFailure .ruUploadProgress",this.get_element()).each(function(f,g){e[f]=a(g).text(); }); return e; },_isUploading:function(){var e=a(this._element); var l=e.find(".ruUploadProgress").parentsUntil(e,"li"); for(var k=0; k