diff --git a/README.md b/README.md index c261ca3487b09ad94d3d976b3fe33831d790d467..565cbb37fc8d3e450f1350623c35380661c6c2c6 100755 --- a/README.md +++ b/README.md @@ -77,14 +77,12 @@ _注:kift为该功能的开发名称,其实际成果命名为kiftd。_ > 提示:当您更新版本后,请手动清除浏览器的缓存,之后刷新网盘主页以确保数据文件保持最新!否则可能导致新版页面功能无法使用。 -### 新版本v1.0.20 -_本次更新增加了较多用户们一直期待的、实用性较强的新功能,进一步增强kiftd的使用体验。推荐所有用户升级体验。_ -+ 文件夹上传——现在,众多用户期待已久的上传文件夹功能现已上线。当用户同时具备“上传”和“新建文件夹”权限时,便可使用该功能进行文件夹的上传,同时还可以像新建文件夹一样自由设置上传后的文件夹的访问级别。详情请见《kiftd说明文档》。 -+ PPT预览功能——现在,众多用户期待已久的PPT文档在线预览功能正式上线,方便办公使用。PPT预览功能提供ppt和pptx格式的在线打开和预览,且该功能无需额外安装任何插件,可免费用于商业用途。注:在线预览无法显示动画效果,部分复杂内容可能与官方PPT版式有所差异。 -+ 添加扩展存储区——现在,kiftd的文件系统允许用户额外添加最多31个“扩展存储区”路径。这些“扩展存储区”能够设置在不同的硬盘分区中并分担“主文件系统存储区”的存储压力,从而方便用户在不借助硬盘阵列技术的前提下使用多块硬盘来进一步扩展kiftd的可用容量。详情请见《kiftd说明文档》。 -+ 升级了文件列表的排序功能——文件列表现在可以对文件的各项属性进行切换式的双向(升序/降序)排序。 -+ 优化文件列表的显示顺序——文件列表现在将按照上传的时间由新至旧向下排列显示,更加贴合用户的查看习惯。 -+ 优化配置检查机制——当配置出现错误后系统将不再自动还原初配置文件,以便用户根据提示信息进行检查和修改。 +### 新版本v1.0.21 +_本次更新增强了账户的权限管理功能,同时修复了一些问题。推荐所有用户升级体验。_ ++ 为账户在特定文件夹中授予额外权限——借助这一功能,您能够将账户的权限管理精确到文件夹级别,从而方便您在复杂使用场景中更加灵活地设定账户的权限,详情请见《kiftd说明文档》。 ++ 修复了当文件夹名称中含有空格时无法上传的问题。 ++ 优化了配置文件更新机制,使得程序在更新配置文件时能够保留原有的格式和注释。 ++ 修复了在部分情况下,使用命令模启动kiftd后txt预览功能可能无法正确执行的问题。 + 进一步提高了文件系统的安全性和稳定性。 > 需要查看更多版本历史信息?请访问: https://kohgylw.gitee.io/News.html diff --git a/kiftd-1.0.20-RELEASE.jar b/kiftd-1.0.21-RELEASE.jar similarity index 61% rename from kiftd-1.0.20-RELEASE.jar rename to kiftd-1.0.21-RELEASE.jar index 70421aa77dc21ae735253848acf470008e083cef..72566aca8fd541ec820a73d32d7a4eb22f72cf63 100644 Binary files a/kiftd-1.0.20-RELEASE.jar and b/kiftd-1.0.21-RELEASE.jar differ diff --git "a/kiftd\350\257\264\346\230\216\346\226\207\346\241\243.pdf" "b/kiftd\350\257\264\346\230\216\346\226\207\346\241\243.pdf" index 39f2996a2203945a880545ba27501ce773f67d51..8a74f31359b01dc51f7cb87f18df072f511096c8 100644 Binary files "a/kiftd\350\257\264\346\230\216\346\226\207\346\241\243.pdf" and "b/kiftd\350\257\264\346\230\216\346\226\207\346\241\243.pdf" differ diff --git a/webContext/home.html b/webContext/home.html index 4ee5a7af325722d53b63e9bb3f92a43fa4b1e646..472b56a15a4fd6f21590d8f38bb331f79028bf21 100644 --- a/webContext/home.html +++ b/webContext/home.html @@ -714,6 +714,8 @@
"+d+"[正在上传...]
"),xhr=new XMLHttpRequest,e=new FormData,e.append("file",c),e.append("folderId",locationpath),null!=repeModelList&&null!=repeModelList[d]){if("skip"==repeModelList[d])return $("#uls_"+a).text("[已完成]"),b>a?(doupload(a+1),void 0):(isUpLoading=!1,$("#filepath").removeAttr("disabled"),$("#uploadfile").val(""),$("#filepath").val(""),$("#pros").width("0%"),$("#pros").attr("aria-valuenow","0"),$("#umbutton").attr("disabled",!1),$("#filecount").text(""),$("#uploadstatus").text(""),$("#selectcount").text(""),$("#uploadFileModal").modal("hide"),showFolderView(locationpath),void 0);e.append("repeType",repeModelList[d])}xhr.open("POST","homeController/douploadFile.ajax",!0),xhr.upload.addEventListener("progress",uploadProgress,!1),xhr.send(e),null==pingInt&&(pingInt=setInterval("ping()",6e4)),xhr.onloadend=function(){if(null!=pingInt&&(window.clearInterval(pingInt),pingInt=null),200===xhr.status){var c=xhr.responseText;"uploadsuccess"==c?($("#uls_"+a).text("[已完成]"),b>a?doupload(a+1):(isUpLoading=!1,$("#filepath").removeAttr("disabled"),$("#uploadfile").val(""),$("#filepath").val(""),$("#pros").width("0%"),$("#pros").attr("aria-valuenow","0"),$("#umbutton").attr("disabled",!1),$("#filecount").text(""),$("#uploadstatus").text(""),$("#selectcount").text(""),$("#uploadFileModal").modal("hide"),showFolderView(locationpath))):"uploaderror"==c?(showUploadFileAlert("提示:出现意外错误,文件:["+d+"]上传失败,上传被中断。"),$("#uls_"+a).text("[失败]")):(showUploadFileAlert("提示:出现意外错误,文件:["+d+"]上传失败,上传被中断。"),$("#uls_"+a).text("[失败]"))}else showUploadFileAlert("提示:出现意外错误,文件:["+d+"]上传失败,上传被中断。"),$("#uls_"+a).text("[失败]")}}else showUploadFileAlert("提示:要上传的文件不存在。"),$("#uploadstatus").prepend("未找到要上传的文件[失败]
")}function uploadProgress(a){if(a.lengthComputable){var b=Math.round(100*a.loaded/a.total);$("#pros").width(b+"%"),$("#pros").attr("aria-valuenow",""+b)}}function showUploadFileAlert(a){isUpLoading=!1,$("#filepath").removeAttr("disabled"),$("#uploadFileAlert").show(),$("#uploadFileAlert").text(a),$("#umbutton").attr("disabled",!1)}function abortUpload(){isUpLoading=!1,null!=xhr&&xhr.abort(),$("#uploadFileModal").modal("hide"),showFolderView(locationpath)}function showDownloadModel(a,b){$("#downloadFileName").text("提示:您确认要下载文件:["+b+"]么?"),$("#downloadHrefBox").html("正在生成..."),getDownloadFileId=a,getDownloadFileName=b.replace("#","%23").replace("%","%25").replace("?","%3F"),$("#downloadFileBox").html(""),$("#dlmbutton").attr("disabled",!1),$("#downloadModal").modal("show")}function dodownload(a){$("#dlmbutton").attr("disabled",!0),$("#downloadFileName").text("提示:准备开始下载,请稍候..."),setTimeout("$('#downloadModal').modal('hide');",800),window.location.href="homeController/downloadFile.do?fileId="+a}function showDeleteFileModel(a,b){$("#deleteFileBox").html(""),$("#dfmbutton").attr("disabled",!1),$("#deleteFileMessage").text("提示:确定要彻底删除文件:["+b+"]么?该操作不可恢复"),$("#deleteFileModal").modal("toggle")}function deleteFile(a){$("#dfmbutton").attr("disabled",!0),$("#deleteFileMessage").text("提示:正在删除,请稍候..."),$.ajax({type:"POST",dataType:"text",data:{fileId:a},url:"homeController/deleteFile.ajax",success:function(a){"mustLogin"==a?window.location.href="login.html":"noAuthorized"==a?($("#deleteFileMessage").text("提示:您的操作未被授权,删除失败"),$("#dfmbutton").attr("disabled",!1)):"errorParameter"==a?($("#deleteFileMessage").text("提示:参数不正确,删除失败"),$("#dfmbutton").attr("disabled",!1)):"cannotDeleteFile"==a?($("#deleteFileMessage").text("提示:出现意外错误,可能未能删除文件"),$("#dfmbutton").attr("disabled",!1)):"deleteFileSuccess"==a?($("#deleteFileModal").modal("hide"),showFolderView(locationpath)):($("#deleteFileMessage").text("提示:出现意外错误,可能未能删除文件"),$("#dfmbutton").attr("disabled",!1))},error:function(){$("#deleteFileMessage").text("提示:出现意外错误,可能未能删除文件"),$("#dfmbutton").attr("disabled",!1)}})}function showRenameFileModel(a,b){$("#newFileNamealert").removeClass("alert"),$("#newFileNamealert").removeClass("alert-danger"),$("#filerenamebox").removeClass("has-error"),$("#newFileNamealert").text(""),$("#renameFileBox").html(""),$("#newfilename").val(b),$("#renameFileModal").modal("toggle")}function renameFile(a){var b=new RegExp('[/|\\s\\\\*\\<\\>\\?\\:\\&\\$"]+',"g"),c=$("#newfilename").val();c.length>0?c.length<128?b.test(c)||0==c.indexOf(".")?showRFileAlert("提示:文件名中不应含有:空格 引号 / * | < > & $ : ? 且不能以“.”开头。"):$.ajax({type:"POST",dataType:"text",data:{fileId:a,newFileName:c},url:"homeController/renameFile.ajax",success:function(a){"mustLogin"==a?window.location.href="login.html":"cannotRenameFile"==a?showRFileAlert("提示:出现意外错误,可能未能重命名文件,请刷新后重试。"):"renameFileSuccess"==a?($("#renameFileModal").modal("hide"),showFolderView(locationpath)):"errorParameter"==a?showRFileAlert("提示:参数错误,重命名失败,请刷新后重试。"):"nameOccupied"==a?showRFileAlert("提示:该名称已被占用,请选取其他名称。"):"noAuthorized"==a?showRFileAlert("提示:您的操作未被授权,重命名失败,请刷新后重试。"):showRFileAlert("提示:出现意外错误,可能未能重命名文件,请刷新后重试。")},error:function(){showRFileAlert("提示:出现意外错误,可能未能重命名文件。")}}):showRFileAlert("提示:文件名称太长。"):showRFileAlert("提示:文件名不能为空。")}function showRFileAlert(a){$("#newFileNamealert").addClass("alert"),$("#newFileNamealert").addClass("alert-danger"),$("#filerenamebox").addClass("has-error"),$("#newFileNamealert").text(a)}function getSuffix(a){var b=a.lastIndexOf("."),c=a.length,d=a.substring(b+1,c);return d.toLowerCase()}function playVideo(a){window.open("quickview/video.html?fileId="+a)}function pdfView(a){window.open("/pdfview/web/viewer.html?file=/fileblocks/"+a)}function docxView(a){window.open("/pdfview/web/viewer.html?file=/resourceController/getWordView/"+a)}function txtView(a){window.open("/pdfview/web/viewer.html?file=/resourceController/getTxtView/"+a)}function pptView(a){window.open("/pdfview/web/viewer.html?file=/resourceController/getPPTView/"+a)}function showPicture(fileId){$.ajax({url:"homeController/getPrePicture.ajax",data:{fileId:fileId},type:"POST",dataType:"text",success:function(result){if("ERROR"!=result)if(pvl=eval("("+result+")"),pvl.pictureViewList.length<=viewerPageSize)createViewList();else{viewerPageIndex=Math.ceil((pvl.index+1)/viewerPageSize),viewerTotal=Math.ceil(pvl.pictureViewList.length/viewerPageSize),createViewListByPage();var innerIndex=pvl.index-(viewerPageIndex-1)*viewerPageSize;viewerPageIndex>1&&innerIndex++,viewer.viewer("view",innerIndex),viewer.viewer("show",!0)}else alert("错误:无法定位要预览的文件或该操作未被授权。")},error:function(){alert("错误:请求失败,请刷新重试。")}})}function createViewList(){var a,b;if(null==viewer){for(a=document.createElement("ul"),b=0;b"+f+"[正在上传...]
"),xhr=new XMLHttpRequest,g=new FormData,g.append("file",c),g.append("folderId",locationpath),g.append("folderConstraint",e),b&&g.append("newFolderName",b),xhr.open("POST","homeController/doImportFolder.ajax",!0),xhr.upload.addEventListener("progress",importProgress,!1),xhr.send(g),null==pingInt&&(pingInt=setInterval("ping()",6e4)),xhr.onloadend=function(){var c,e;null!=pingInt&&(window.clearInterval(pingInt),pingInt=null),200===xhr.status?(c=xhr.responseText,"uploadsuccess"==c?($("#ils_"+a).text("[已完成]"),e=a+1,d>e?iteratorImport(e,b):(isImporting=!1,$("#folderpath").removeAttr("disabled"),$("#importFolderLevelBtn").removeAttr("disabled"),$("#importfolder").val(""),$("#folderpath").val(""),$("#importpros").width("0%"),$("#importpros").attr("aria-valuenow","0"),$("#importbutton").attr("disabled",!1),$("#importcount").text(""),$("#importstatus").text(""),$("#importFolderModal").modal("hide"),showFolderView(locationpath))):"uploaderror"==c?(showImportFolderAlert("提示:出现意外错误,文件:["+f+"]上传失败,上传被中断。"),$("#ils_"+a).text("[失败]")):(showImportFolderAlert("提示:出现意外错误,文件:["+f+"]上传失败,上传被中断。"),$("#ils_"+a).text("[失败]"))):(showImportFolderAlert("提示:出现意外错误,文件:["+f+"]上传失败,上传被中断。"),$("#ils_"+a).text("[失败]"))}):(showImportFolderAlert("提示:要上传的文件不存在。"),$("#importstatus").prepend("未找到要上传的文件[失败]
"))}function abortImport(){isImporting=!1,null!=xhr&&xhr.abort(),$("#importFolderModal").modal("hide"),showFolderView(locationpath)}function changeImportFolderType(a){$("#importfoldertype").text(folderTypes[a]),$("#folderpath").attr("folderConstraintLevel",a+"")}var ap,zipTimer,folderView,originFolderView,fs,ifs,checkedMovefiles,constraintLevel,account,importFolderName,xhr,viewer,viewerPageIndex,viewerTotal,pvl,winHeight,pingInt,folderTypes,repeList,repeIndex,repeModelList,repeMap,strMoveOptMap,mRepeSize,screenedFoldrView,getDownloadFileId,getDownloadFileName,locationpath="root",parentpath="null",isUpLoading=!1,isImporting=!1,viewerPageSize=15,checkFilesTip="提示:您还未选择任何文件,请先选中一些文件后再执行本操作:"+d+"[正在上传...]
"),xhr=new XMLHttpRequest,e=new FormData,e.append("file",c),e.append("folderId",locationpath),null!=repeModelList&&null!=repeModelList[d]){if("skip"==repeModelList[d])return $("#uls_"+a).text("[已完成]"),b>a?(doupload(a+1),void 0):(isUpLoading=!1,$("#filepath").removeAttr("disabled"),$("#uploadfile").val(""),$("#filepath").val(""),$("#pros").width("0%"),$("#pros").attr("aria-valuenow","0"),$("#umbutton").attr("disabled",!1),$("#filecount").text(""),$("#uploadstatus").text(""),$("#selectcount").text(""),$("#uploadFileModal").modal("hide"),showFolderView(locationpath),void 0);e.append("repeType",repeModelList[d])}xhr.open("POST","homeController/douploadFile.ajax",!0),xhr.upload.addEventListener("progress",uploadProgress,!1),xhr.send(e),null==pingInt&&(pingInt=setInterval("ping()",6e4)),xhr.onloadend=function(){if(null!=pingInt&&(window.clearInterval(pingInt),pingInt=null),200===xhr.status){var c=xhr.responseText;"uploadsuccess"==c?($("#uls_"+a).text("[已完成]"),b>a?doupload(a+1):(isUpLoading=!1,$("#filepath").removeAttr("disabled"),$("#uploadfile").val(""),$("#filepath").val(""),$("#pros").width("0%"),$("#pros").attr("aria-valuenow","0"),$("#umbutton").attr("disabled",!1),$("#filecount").text(""),$("#uploadstatus").text(""),$("#selectcount").text(""),$("#uploadFileModal").modal("hide"),showFolderView(locationpath))):"uploaderror"==c?(showUploadFileAlert("提示:出现意外错误,文件:["+d+"]上传失败,上传被中断。"),$("#uls_"+a).text("[失败]")):(showUploadFileAlert("提示:出现意外错误,文件:["+d+"]上传失败,上传被中断。"),$("#uls_"+a).text("[失败]"))}else showUploadFileAlert("提示:出现意外错误,文件:["+d+"]上传失败,上传被中断。"),$("#uls_"+a).text("[失败]")}}else showUploadFileAlert("提示:要上传的文件不存在。"),$("#uploadstatus").prepend("未找到要上传的文件[失败]
")}function uploadProgress(a){if(a.lengthComputable){var b=Math.round(100*a.loaded/a.total);$("#pros").width(b+"%"),$("#pros").attr("aria-valuenow",""+b)}}function showUploadFileAlert(a){isUpLoading=!1,$("#filepath").removeAttr("disabled"),$("#uploadFileAlert").show(),$("#uploadFileAlert").text(a),$("#umbutton").attr("disabled",!1)}function abortUpload(){isUpLoading=!1,null!=xhr&&xhr.abort(),$("#uploadFileModal").modal("hide"),showFolderView(locationpath)}function showDownloadModel(a,b){$("#downloadFileName").text("提示:您确认要下载文件:["+b+"]么?"),$("#downloadHrefBox").html("正在生成..."),getDownloadFileId=a,getDownloadFileName=b.replace("#","%23").replace("%","%25").replace("?","%3F"),$("#downloadFileBox").html(""),$("#dlmbutton").attr("disabled",!1),$("#downloadModal").modal("show")}function dodownload(a){$("#dlmbutton").attr("disabled",!0),$("#downloadFileName").text("提示:准备开始下载,请稍候..."),setTimeout("$('#downloadModal').modal('hide');",800),window.location.href="homeController/downloadFile.do?fileId="+a}function showDeleteFileModel(a,b){$("#deleteFileBox").html(""),$("#dfmbutton").attr("disabled",!1),$("#deleteFileMessage").text("提示:确定要彻底删除文件:["+b+"]么?该操作不可恢复"),$("#deleteFileModal").modal("toggle")}function deleteFile(a){$("#dfmbutton").attr("disabled",!0),$("#deleteFileMessage").text("提示:正在删除,请稍候..."),$.ajax({type:"POST",dataType:"text",data:{fileId:a},url:"homeController/deleteFile.ajax",success:function(a){"mustLogin"==a?window.location.href="login.html":"noAuthorized"==a?($("#deleteFileMessage").text("提示:您的操作未被授权,删除失败"),$("#dfmbutton").attr("disabled",!1)):"errorParameter"==a?($("#deleteFileMessage").text("提示:参数不正确,删除失败"),$("#dfmbutton").attr("disabled",!1)):"cannotDeleteFile"==a?($("#deleteFileMessage").text("提示:出现意外错误,可能未能删除文件"),$("#dfmbutton").attr("disabled",!1)):"deleteFileSuccess"==a?($("#deleteFileModal").modal("hide"),showFolderView(locationpath)):($("#deleteFileMessage").text("提示:出现意外错误,可能未能删除文件"),$("#dfmbutton").attr("disabled",!1))},error:function(){$("#deleteFileMessage").text("提示:出现意外错误,可能未能删除文件"),$("#dfmbutton").attr("disabled",!1)}})}function showRenameFileModel(a,b){$("#newFileNamealert").removeClass("alert"),$("#newFileNamealert").removeClass("alert-danger"),$("#filerenamebox").removeClass("has-error"),$("#newFileNamealert").text(""),$("#renameFileBox").html(""),$("#newfilename").val(b),$("#renameFileModal").modal("toggle")}function renameFile(a){var b=new RegExp('[/|\\\\*\\<\\>\\?\\:\\&\\$"]+',"g"),c=$("#newfilename").val();c.length>0?c.length<128?b.test(c)||0==c.indexOf(".")?showRFileAlert("提示:文件名中不应含有:引号 / * | < > & $ : ? 且不能以“.”开头。"):$.ajax({type:"POST",dataType:"text",data:{fileId:a,newFileName:c},url:"homeController/renameFile.ajax",success:function(a){"mustLogin"==a?window.location.href="login.html":"cannotRenameFile"==a?showRFileAlert("提示:出现意外错误,可能未能重命名文件,请刷新后重试。"):"renameFileSuccess"==a?($("#renameFileModal").modal("hide"),showFolderView(locationpath)):"errorParameter"==a?showRFileAlert("提示:参数错误,重命名失败,请刷新后重试。"):"nameOccupied"==a?showRFileAlert("提示:该名称已被占用,请选取其他名称。"):"noAuthorized"==a?showRFileAlert("提示:您的操作未被授权,重命名失败,请刷新后重试。"):showRFileAlert("提示:出现意外错误,可能未能重命名文件,请刷新后重试。")},error:function(){showRFileAlert("提示:出现意外错误,可能未能重命名文件。")}}):showRFileAlert("提示:文件名称太长。"):showRFileAlert("提示:文件名不能为空。")}function showRFileAlert(a){$("#newFileNamealert").addClass("alert"),$("#newFileNamealert").addClass("alert-danger"),$("#filerenamebox").addClass("has-error"),$("#newFileNamealert").text(a)}function getSuffix(a){var b=a.lastIndexOf("."),c=a.length,d=a.substring(b+1,c);return d.toLowerCase()}function playVideo(a){window.open("quickview/video.html?fileId="+a)}function pdfView(a){window.open("/pdfview/web/viewer.html?file=/fileblocks/"+a)}function docxView(a){window.open("/pdfview/web/viewer.html?file=/resourceController/getWordView/"+a)}function txtView(a){window.open("/pdfview/web/viewer.html?file=/resourceController/getTxtView/"+a)}function pptView(a){window.open("/pdfview/web/viewer.html?file=/resourceController/getPPTView/"+a)}function showPicture(fileId){$.ajax({url:"homeController/getPrePicture.ajax",data:{fileId:fileId},type:"POST",dataType:"text",success:function(result){if("ERROR"!=result)if(pvl=eval("("+result+")"),pvl.pictureViewList.length<=viewerPageSize)createViewList();else{viewerPageIndex=Math.ceil((pvl.index+1)/viewerPageSize),viewerTotal=Math.ceil(pvl.pictureViewList.length/viewerPageSize),createViewListByPage();var innerIndex=pvl.index-(viewerPageIndex-1)*viewerPageSize;viewerPageIndex>1&&innerIndex++,viewer.viewer("view",innerIndex),viewer.viewer("show",!0)}else alert("错误:无法定位要预览的文件或该操作未被授权。")},error:function(){alert("错误:请求失败,请刷新重试。")}})}function createViewList(){var a,b;if(null==viewer){for(a=document.createElement("ul"),b=0;b"+f+"[正在上传...]
"),xhr=new XMLHttpRequest,g=new FormData,g.append("file",c),g.append("folderId",locationpath),g.append("folderConstraint",e),b&&g.append("newFolderName",b),xhr.open("POST","homeController/doImportFolder.ajax",!0),xhr.upload.addEventListener("progress",importProgress,!1),xhr.send(g),null==pingInt&&(pingInt=setInterval("ping()",6e4)),xhr.onloadend=function(){var c,e;null!=pingInt&&(window.clearInterval(pingInt),pingInt=null),200===xhr.status?(c=xhr.responseText,"uploadsuccess"==c?($("#ils_"+a).text("[已完成]"),e=a+1,d>e?iteratorImport(e,b):(isImporting=!1,$("#folderpath").removeAttr("disabled"),$("#importFolderLevelBtn").removeAttr("disabled"),$("#importfolder").val(""),$("#folderpath").val(""),$("#importpros").width("0%"),$("#importpros").attr("aria-valuenow","0"),$("#importbutton").attr("disabled",!1),$("#importcount").text(""),$("#importstatus").text(""),$("#importFolderModal").modal("hide"),showFolderView(locationpath))):"uploaderror"==c?(showImportFolderAlert("提示:出现意外错误,文件:["+f+"]上传失败,上传被中断。"),$("#ils_"+a).text("[失败]")):(showImportFolderAlert("提示:出现意外错误,文件:["+f+"]上传失败,上传被中断。"),$("#ils_"+a).text("[失败]"))):(showImportFolderAlert("提示:出现意外错误,文件:["+f+"]上传失败,上传被中断。"),$("#ils_"+a).text("[失败]"))}):(showImportFolderAlert("提示:要上传的文件不存在。"),$("#importstatus").prepend("未找到要上传的文件[失败]
"))}function abortImport(){isImporting=!1,null!=xhr&&xhr.abort(),$("#importFolderModal").modal("hide"),showFolderView(locationpath)}function changeImportFolderType(a){$("#importfoldertype").text(folderTypes[a]),$("#folderpath").attr("folderConstraintLevel",a+"")}var ap,zipTimer,folderView,originFolderView,fs,ifs,checkedMovefiles,constraintLevel,account,importFolderName,xhr,viewer,viewerPageIndex,viewerTotal,pvl,winHeight,pingInt,folderTypes,repeList,repeIndex,repeModelList,repeMap,strMoveOptMap,mRepeSize,screenedFoldrView,getDownloadFileId,getDownloadFileName,locationpath="root",parentpath="null",isUpLoading=!1,isImporting=!1,viewerPageSize=15,checkFilesTip="提示:您还未选择任何文件,请先选中一些文件后再执行本操作:提示:该视频需解码后播放,请耐心等待!
"),doTranscode())):(alert("错误:无法定位要预览的文件或该操作未被授权。"),reMainPage())},error:function(){alert("错误:请求失败,请刷新重试。"),reMainPage()}})}); \ No newline at end of file +function getFileId(){var b,a=location.search;return-1!=a.indexOf("?")?(b=a.substr(1),strs=b.split("="),strs[1]):""}function playVideo(){$("#playerbox").html("");var a=videojs("kiftplayer",{preload:"auto"});a.ready(function(){this.play()})}function reMainPage(){null!=tReq&&tReq.abort(),null!=tTimer&&window.clearTimeout(tTimer),window.opener=null,window.open("","_self"),window.close()}function doTranscode(){tReq=$.ajax({url:"resourceController/getVideoTranscodeStatus.ajax",type:"POST",dataType:"text",data:{fileId:f.fileId},success:function(a){"FIN"==a?playVideo():"ERROR"==a?(alert("错误:请求失败,请刷新重试。"),reMainPage()):($("#transcodeProgress").text(a),tTimer=setTimeout("doTranscode()",500))},error:function(){alert("错误:请求失败,请刷新重试。"),reMainPage()}})}function showCloseBtn(){var a=$(window).width();450>a?$("#closeBtn").addClass("hidden"):$("#closeBtn").removeClass("hidden")}function ping(){$.ajax({url:"homeController/ping.ajax",type:"POST",dataType:"text",data:{},success:function(a){"pong"!=a&&window.clearInterval(pingInt)},error:function(){window.clearInterval(pingInt)}})}var tReq,tTimer,pingInt;$(function(){window.onresize=function(){showCloseBtn()},pingInt=setInterval("ping()",6e4);var fileId=getFileId();$.ajax({url:"homeController/playVideo.ajax",type:"POST",dataType:"text",data:{fileId:fileId},success:function(result){"ERROR"!=result?(f=eval("("+result+")"),$("#vname").text(f.fileName.replace("'","'").replace("<","<").replace(">",">")),$("#vcreator").text(f.fileCreator),$("#vcdate").text(f.fileCreationDate),$("#vsize").text(f.fileSize),"N"==f.needEncode?playVideo():($("#playerMassage").html("提示:该视频需解码后播放,请耐心等待!
"),doTranscode())):(alert("错误:无法定位要预览的文件或该操作未被授权。"),reMainPage())},error:function(){alert("错误:请求失败,请刷新重试。"),reMainPage()}})}); \ No newline at end of file