text: $(document).ready(function(){$('input[name="files"]').fileuploader({limit:1,maxSize:20,fileMaxSize:20,captions:{feedback:"Drag and drop files here",feedback2:"Drag and drop files here",drop:"Drag and drop files here",or:"or",button:"Browse files"},changeInput:'<div class="fileuploader-input"><div class="fileuploader-input-inner"><div class="fileuploader-main-icon"><\/div><h3 class="fileuploader-input-caption"><span>Drag and drop files here<\/span><\/h3><p>or<\/p><div class="fileuploader-input-button"><span>Browse files<\/span><\/div><\/div><\/div>',theme:"dragdrop",extensions:["xlsx","csv","text/plain"],upload:{url:"/FileUpload/Upload",data:{FileType:entityname},type:"POST",enctype:"multipart/form-data",start:!0,synchron:!1,beforeSend:function(n){n.upload.data.ver="2.0";n.upload.data.data_attribute="nice"},onSuccess:function(n,t){if(n.success&&n.filename)t.html.find(".column-title > div:first-child").text(t.name).attr("title",n.filename),$.messager.alert("导入完成","导入完成！<br> 耗时："+n.elapsedTime,"info"),$dg.datagrid("reload"),$("#importwindow").window("close");else return t.html.find(".column-title > div:first-child").text(t.name).attr("title",n.filename),t.html.removeClass("upload-successful").addClass("upload-failed"),$.messager.alert("导入失败",n.message,"error"),this.onError?this.onError(t):null;t.html.find(".fileuploader-action-remove").addClass("fileuploader-action-success");setTimeout(function(){t.html.find(".progress-bar2").fadeOut(400)},400)},onError:function(n){var t=n.html.find(".progress-bar2");t.length&&(t.find("span").html("0%"),t.find(".fileuploader-progressbar .bar").width("0%"),n.html.find(".progress-bar2").fadeOut(400));n.upload.status!="cancelled"&&n.html.find(".fileuploader-action-retry").length==0?n.html.find(".column-actions").prepend('<a class="fileuploader-action fileuploader-action-retry" title="Retry"><i><\/i><\/a>'):null},onProgress:function(n,t){var i=t.html.find(".progress-bar2");i.length>0&&(i.show(),i.find("span").html(n.percentage+"%"),i.find(".fileuploader-progressbar .bar").width(n.percentage+"%"))},onComplete:null},onRemove:function(n){var t=n.html.find(".column-title > div:first-child").attr("title");$.post("/FileUpload/Remove",{filename:t})},thumbnails:{canvasImage:!1,popup:null}})});