www.pudn.com > Wifle-master.zip > handler.js, change:2014-06-25,size:3091b


/*
 * Compressed by JSA(www.xidea.org)
 */
var uploader=null;$(document).ready(function(){uploader=new SWFUpload({upload_url:"/upload",flash_url:"swfupload/swfupload.swf",flash9_url:"swfupload/swfupload_fp9.swf",file_size_limit:"3 GB",file_post_name:"file",post_params:{"currentDirectory":currentDirectory},file_upload_limit:"0",file_queue_limit:"1",file_dialog_start_handler:fileDialogStart,file_queued_handler:fileQueued,file_queue_error_handler:fileQueueError,file_dialog_complete_handler:fileDialogComplete,upload_start_handler:uploadStart,upload_progress_handler:uploadProgress,upload_error_handler:uploadError,upload_success_handler:uploadSuccess,upload_complete_handler:uploadComplete,button_width:"94",button_height:"31",button_placeholder_id:"SpanButtonPlaceHolder",button_window_mode:SWFUpload.WINDOW_MODE.TRANSPARENT,button_cursor:SWFUpload.CURSOR.HAND,custom_settings:{progress_target:"FileProgressContainer",upload_successful:false},debug:false})});function fileDialogStart(){$("#txtFileName").val("");this.cancelUpload()}function fileQueued(_){$("#txtFileName").val(_.name)}function fileQueueError(A,B,$){try{switch(B){case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:alert("You have attempted to queue too many files.\n"+($===0?"You have reached the upload limit.":"You may select "+($>1?"up to "+$+" files.":"one file.")));return;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:alert("The file you selected is too big.");this.debug("Error Code: File too big, File name: "+A.name+", File size: "+A.size+", Message: "+$);return;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:alert("The file you selected is empty.  Please select another file.");this.debug("Error Code: Zero byte file, File name: "+A.name+", File size: "+A.size+", Message: "+$);return;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:alert("The file you choose is not an allowed file type.");this.debug("Error Code: Invalid File Type, File name: "+A.name+", File size: "+A.size+", Message: "+$);return;default:alert("An error occurred in the upload. Try again later.");this.debug("Error Code: "+B+", File name: "+A.name+", File size: "+A.size+", Message: "+$);return}}catch(_){}}function fileDialogComplete(_,A){this.setPostParams({"currentDirectory":currentDirectory});try{if(_>0)this.startUpload()}catch($){this.debug($)}}function uploadStart(_){$("#FileProgressContainer").css("visibility","visible").hide().fadeIn();$("#upload-state").fadeIn();$("#upload-state-content").removeClass("success");$("#upload-state-content").addClass("warning")}function uploadProgress(C,A,B){var _=Math.ceil((A/B)*100);$("#FileProgressPercent").css({width:_+"%"});$("#upload-state-content").text($.i18n.prop("uploading_file_at")+" "+_+"%");if(_==100){$("#upload-state-content").addClass("success");$("#upload-state-content").text($.i18n.prop("check_file"))}}function uploadSuccess(A,_){$("#FileProgressContainer").fadeOut();$("#upload-state").fadeOut()}function uploadComplete($){list(currentDirectory)}function uploadError(A,B,_){$("#FileProgressContainer").fadeOut();$("#upload-state").fadeOut();alert($.i18n.prop("cannot_upload"))}