提交 f9d5b674 编写于 作者: 青阳龙野's avatar 青阳龙野

update to version 1.0.3

上级 5a8df087
无法预览此类型文件
......@@ -57,9 +57,14 @@ _注:kift为功能性内核的开发代号,其应用版本被称为kiftd_
最新讯息:
### 常规修复v1.0.2v2
该修复为功能性的紧急修复,旨在修复影响使用的BUG,建议所有的用户进行升级。
+ 修复了由于之前重构疏忽导致的无法使用UI界面修改服务器设置的BUG。该BUG是由于一个引用被错误地指向了另一个位置导致的,经过修正,现在您可以正常修改服务器设置了。
### 新版本v1.0.3
新的kiftd v 1.0.3增加了更多便捷的操作功能,并修复了一些Bug。该版本建议所有用户升级体验。
+ 拖拽,上传!——需要上传已经在文件夹中找好的文件?现在,您可以把它们拖入文件列表试试。
+ 移动文件——需要把一些上传好的文件移动到另一个文件夹中?现在您可以像您喜欢的那样进行“剪切”和“粘贴”了。
+ 文件排序——需要将文件列表按照名称、大小、创建日期或者是创建者进行排序显示?仅需点击文件列表的相应标题栏就行。
+ 更快登录——输入账户、密码,然后回车。
+ 一些Bug修复——完善了纯命令模式下的错误提示信息。修正了文件系统选择相关的一些Bug,修正了IE浏览器下无法上传文件的Bug。
+ 更新了《kiftd说明文档》使其更加易读——指引内容更加全面,还增加了如何升级kiftd至最新版本的提示。
### 常规更新v1.0.2v2
该更新为1.0.2版本基础上的性能优化更新,该版本建议所有用户升级体验。
......@@ -75,20 +80,6 @@ _注:kift为功能性内核的开发代号,其应用版本被称为kiftd_
+ 在说明文档中增加了关于Linux远程服务器管理的相关内容,并优化了说明内容。
+ 其他一些服务器逻辑的优化。
### 新版本v1.0.2
新的kiftd v 1.0.2使用 Spring Boot 框架进行了重构,并全面升级了其功能,该版本建议所有用户升级体验。
新功能包括:
+ 真正的解压即用——点击鼠标、开启网盘。
+ 简单的操作界面——即使不看说明书,您一定也能把它启动起来。
+ 自定义的文件系统存储位置——现在,您可以自由选择将kiftd的文件系统存放在哪个位置了。
+ 加密认证——为了进一步确保用户的账户安全,kiftd加入了RSA加密技术以提高用户登录时的安全性,防止它们被网络窃听者盗用后危害用户安全(防止一锅端)。
+ 同级文件夹下多图片浏览——新版本采用了viewer.js开源框架实现图片的预览,可以对图片进行放大、旋转、全屏,播放、左右翻转、上下翻转……
+ 更加简单快捷的选中操作——您可以点击文件行来选中某一个文件,或是按住Shift键选中多个文件——然后进行批量删除或打包下载。
+ MP3音频在线播放——该功能基于APlayer播放器插件,kiftd现在不但能以列表形式播放同级目录内的所有音乐,还可以显示歌词、歌手和封面图片。
+ 更高效的ZIP压缩——全新的ZIP压缩组件ZT-ZIP替换了原本很初级的ZIP压缩过程,提高了压缩速度。经测试,对于一个370MB大小的MP4视频,kiftd对其压缩的耗时减少了4秒,速度提升达20%。
+ 增加了对IE8的支持(实验性)。这是一个很尴尬的功能:作者最终还是决定将其添加上,但不保证效果。他已经意识到让每个人都装一个chrome确实很难,且很多人连如何切换“极速模式”浏览都无从下手。
+ 一些性能上的和细节上的完善,使得kiftd更加可靠。
--------------------
## Functional Examples
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kohgylw.kiftd.server.mapper.NodeMapper">
<resultMap id="BaseResultMap" type="kohgylw.kiftd.server.model.Node">
<result column="file_id" jdbcType="VARCHAR" property="fileId" />
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
<result column="file_size" jdbcType="VARCHAR" property="fileSize" />
<result column="file_parent_folder" jdbcType="VARCHAR" property="fileParentFolder" />
<result column="file_creation_date" jdbcType="VARCHAR" property="fileCreationDate" />
<result column="file_creator" jdbcType="VARCHAR" property="fileCreator" />
<result column="file_path" jdbcType="VARCHAR" property="filePath" />
</resultMap>
<select id="queryByParentFolderId" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT * FROM FILE WHERE file_parent_folder = #{pfid,jdbcType=VARCHAR}
</select>
<insert id="insert" parameterType="kohgylw.kiftd.server.model.Node">
INSERT INTO FILE VALUES(#{fileId,jdbcType=VARCHAR},#{fileName,jdbcType=VARCHAR},#{fileSize,jdbcType=VARCHAR},#{fileParentFolder,jdbcType=VARCHAR},#{fileCreationDate,jdbcType=VARCHAR},#{fileCreator,jdbcType=VARCHAR},#{filePath,jdbcType=VARCHAR})
</insert>
<delete id="deleteByParentFolderId" parameterType="java.lang.String">
DELETE FROM FILE WHERE file_parent_folder = #{pfid,jdbcType=VARCHAR}
</delete>
<delete id="deleteById" parameterType="java.lang.String">
DELETE FROM FILE WHERE file_id = #{fileId,jdbcType=VARCHAR}
</delete>
<select id="queryById" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT * FROM FILE WHERE file_id = #{fileId,jdbcType=VARCHAR}
</select>
<update id="updateFileNameById" parameterType="java.util.Map">
UPDATE FILE SET file_name = #{newFileName,jdbcType=VARCHAR} WHERE file_id = #{fileId,jdbcType=VARCHAR}
</update>
<select id="queryAll" resultMap="BaseResultMap">
SELECT * FROM FILE
</select>
<select id="queryByPath" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT * FROM FILE WHERE file_path = #{path,jdbcType=VARCHAR}
</select>
<select id="queryBySomeFolder" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT * FROM FILE WHERE file_parent_folder in (SELECT file_parent_folder FROM FILE WHERE file_id = #{fileId,jdbcType=VARCHAR})
</select>
<resultMap id="BaseResultMap" type="kohgylw.kiftd.server.model.Node">
<result column="file_id" jdbcType="VARCHAR" property="fileId" />
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
<result column="file_size" jdbcType="VARCHAR" property="fileSize" />
<result column="file_parent_folder" jdbcType="VARCHAR"
property="fileParentFolder" />
<result column="file_creation_date" jdbcType="VARCHAR"
property="fileCreationDate" />
<result column="file_creator" jdbcType="VARCHAR" property="fileCreator" />
<result column="file_path" jdbcType="VARCHAR" property="filePath" />
</resultMap>
<select id="queryByParentFolderId" parameterType="java.lang.String"
resultMap="BaseResultMap">
SELECT * FROM FILE WHERE file_parent_folder = #{pfid,jdbcType=VARCHAR}
</select>
<insert id="insert" parameterType="kohgylw.kiftd.server.model.Node">
INSERT INTO FILE
VALUES(#{fileId,jdbcType=VARCHAR},#{fileName,jdbcType=VARCHAR},#{fileSize,jdbcType=VARCHAR},#{fileParentFolder,jdbcType=VARCHAR},#{fileCreationDate,jdbcType=VARCHAR},#{fileCreator,jdbcType=VARCHAR},#{filePath,jdbcType=VARCHAR})
</insert>
<delete id="deleteByParentFolderId" parameterType="java.lang.String">
DELETE FROM FILE WHERE file_parent_folder = #{pfid,jdbcType=VARCHAR}
</delete>
<delete id="deleteById" parameterType="java.lang.String">
DELETE FROM FILE WHERE file_id = #{fileId,jdbcType=VARCHAR}
</delete>
<select id="queryById" parameterType="java.lang.String"
resultMap="BaseResultMap">
SELECT * FROM FILE WHERE file_id = #{fileId,jdbcType=VARCHAR}
</select>
<update id="updateFileNameById" parameterType="java.util.Map">
UPDATE FILE SET file_name = #{newFileName,jdbcType=VARCHAR} WHERE file_id =
#{fileId,jdbcType=VARCHAR}
</update>
<select id="queryAll" resultMap="BaseResultMap">
SELECT * FROM FILE
</select>
<select id="queryByPath" parameterType="java.lang.String"
resultMap="BaseResultMap">
SELECT * FROM FILE WHERE file_path = #{path,jdbcType=VARCHAR}
</select>
<select id="queryBySomeFolder" parameterType="java.lang.String"
resultMap="BaseResultMap">
SELECT * FROM FILE WHERE file_parent_folder in (SELECT file_parent_folder
FROM FILE WHERE file_id = #{fileId,jdbcType=VARCHAR})
</select>
<update id="moveById" parameterType="java.util.Map">
UPDATE FILE SET file_parent_folder = #{locationpath,jdbcType=VARCHAR} WHERE file_id =
#{fileId,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
......@@ -57,12 +57,16 @@
</div>
<table class="table table-hover">
<thead>
<tr onclick="checkallfile()">
<th>文件名</th>
<th>创建日期</th>
<th>大小</th>
<th>创建者</th>
<th>操作</th>
<tr>
<th onclick="sortbyfn()">文件名<span id="sortByFN"
aria-hidden="true" style="float: right"></span></th>
<th onclick="sortbycd()">创建日期<span id="sortByCD"
aria-hidden="true" style="float: right"></span></th>
<th onclick="sortbyfs()">大小<span id="sortByFS"
aria-hidden="true" style="float: right"></span></th>
<th onclick="sortbycn()">创建者<span id="sortByCN"
aria-hidden="true" style="float: right"></span></th>
<th onclick="showOriginFolderView()">操作</th>
</tr>
</thead>
<tbody id="foldertable"></tbody>
......@@ -110,7 +114,8 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" id="dologinButton" class="btn btn-primary" onclick="dologin()">登录</button>
<button type="button" id="dologinButton" class="btn btn-primary"
onclick="dologin()">登录</button>
</div>
</div>
</div>
......@@ -258,7 +263,7 @@
<input type="text" id="filepath" class="form-control"
onclick="checkpath()" onfocus="this.blur()"
placeholder="请点击选择要上传的文件……"> <input type="file"
id="uploadfile" style="display: none;" onchange="showfilepath()"
id="uploadfile" style="display: none;" onchange="getInputUpload()"
multiple="multiple"> <br />
<h5>
上传进度:<span id="filecount"></span>
......@@ -446,6 +451,31 @@
</div>
</div>
<!-- end 加载提示框 -->
<!-- 移动文件提示框 -->
<div class="modal fade bs-example-modal-sm" id="moveFilesModal"
tabindex="-1" role="dialog" aria-labelledby="moveFolderModalTitle">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="moveFolderModalTitle">
<span class="glyphicon glyphicon-import"></span> 移动文件
</h4>
</div>
<div class="modal-body">
<h5 id="moveFilesMessage"></h5>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<span id="moveFilesBox"></span>
</div>
</div>
</div>
</div>
<!-- end 移动文件提示框 -->
</body>
<!-- jquery基本框架 -->
<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
......
......@@ -6,12 +6,16 @@ var locationpath = "root";// 记录当前文件路径
var parentpath = "null";// 记录当前文件路径的父级目录
var ap;// 音乐播放器对象
var zipTimer;// 打包下载计时器
var folderView;// 返回的文件系统视图对象
var originFolderView;// 保存原始的文件视图对象
var fs;// 选中的要上传的文件列表
var checkedMovefiles;// 移动文件的存储列表
// 页面初始化
$(function() {
getServerOS();// 得到服务器操作系统信息
showFolderView(locationpath);// 显示根节点页面视图
// 点击空白处取消选中文件(不支持火狐)
// 点击空白处取消选中文件并重新加载文件视图(不支持火狐)
$(document).click(function(e) {
var filetable = $("#filetable")[0];
if (e.target !== filetable && !$.contains(filetable, e.target)) {
......@@ -36,11 +40,98 @@ $(function() {
$("#accountid").val('');
$("#accountpwd").val('');
});
// 回车键快捷登录响应
$("#loginModal").keypress(function (e) {
var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
if (keyCode == 13){
dologin();
}
});
// 响应拖动上传文件
document.ondragover = function(e) {
e.preventDefault();
e.stopPropagation();
}
document.ondrop = function(e) {
e.preventDefault();
e.stopPropagation();
if (folderView.authList != null) {
if (checkAuth(folderView.authList, "U")) {// 如果有上传权限
var dt=e.dataTransfer;
var testFile=true;
if(dt.items!==undefined){
for(var i=0;i<dt.items.length;i++){
var item = dt.items[i];
if(item.kind === "file" && item.webkitGetAsEntry().isFile) {
}else{
testFile=false;
}
}
}else{
for(var i = 0; i < dt.files.length; i++){
var dropFile = df.files[i];
if ( dropFile.type ) {
} else {
try {
var fileReader = new FileReader();
fileReader.readAsDataURL(dropFile.slice(0, 10));
fileReader.addEventListener('load', function (e) {
}, false);
fileReader.addEventListener('error', function (e) {
testFile=false;
}, false);
} catch (e) {
testFile=false;
}
}
}
}
if(testFile){
fs = e.dataTransfer.files; // 获取到拖入上传的文件对象
showfilepath();
showUploadFileModel();
checkUploadFile();
}else{
alert("提示:您拖入的文件中包含了一个或多个文件夹,无法进行上传。");
}
}else{
alert("您不具备上传权限,无法上传文件。");
}
}else{
alert("您不具备上传权限,无法上传文件。");
}
}
// Shift+A全选文件/反选文件
$(document).keypress(function (e) {
var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
if (keyCode == 65){
if (window.event.shiftKey) {
checkallfile();
}
}
});
// 关闭移动提示框自动取消移动
$('#moveFilesModal').on('hidden.bs.modal', function(e) {
checkedMovefiles=undefined;
$("#cutSignTx").text("剪切");
$("#cutSignSp").removeClass();
$("#cutSignSp").addClass("glyphicon glyphicon-scissors");
$('#moveFilesBox').html("");
});
// IE内核浏览器内的startsWith方法的自实现
if(typeof String.prototype.endsWith != 'function') {
String.prototype.endsWith = function(suffix) {
return this.indexOf(suffix, this.length - suffix.length) !== -1;
};
}
});
//全局请求失败提示
// 全局请求失败提示
function doAlert(){
alert("kiftd错误:无法连接到服务器,请检查网络连接或服务器运行状态。");
alert("错误:无法连接到kiftd服务器,请检查您的网络连接或查看服务器运行状态。");
}
// 获取服务器操作系统
......@@ -79,12 +170,17 @@ function showFolderView(fid) {
if (result == "mustLogin") {
window.location.href = "login.html";
} else {
var folderView = eval("(" + result + ")");
folderView = eval("(" + result + ")");
locationpath = folderView.folder.folderId;
parentpath = folderView.folder.folderParent;
showParentList(folderView);
showAccountView(folderView);
showPublishTime(folderView);
originFolderView=$.extend(true, {}, folderView);
$("#sortByFN").removeClass();
$("#sortByCD").removeClass();
$("#sortByFS").removeClass();
$("#sortByCN").removeClass();
showFolderTable(folderView);
}
},
......@@ -110,14 +206,14 @@ function endLoading(){
$('#loadingModal').modal('hide');
}
//开始登陆加载动画
// 开始登陆加载动画
function startLogin(){
$("#accountid").attr('disabled','disabled');
$("#accountpwd").attr('disabled','disabled');
$("#dologinButton").attr('disabled','disabled');
}
//结束登陆加载动画
// 结束登陆加载动画
function finishLogin(){
$("#accountid").removeAttr('disabled','disabled');
$("#accountpwd").removeAttr('disabled','disabled');
......@@ -303,6 +399,14 @@ function showAccountView(folderView) {
.append(
"<button onclick='showDeleteAllCheckedModel()' class='btn btn-link btn-xs rightbtn'><span class='glyphicon glyphicon-trash'></span> 批量删除</button>");
}
if (checkAuth(authList, "M")) {
$("#parentlistbox").append("<button onclick='startMoveFile()' class='btn btn-link btn-xs rightbtn'><span id='cutSignSp' class='glyphicon glyphicon-scissors'></span> <span id='cutSignTx'>剪切</span></button>");
if(checkedMovefiles!==undefined&&checkedMovefiles.length>0){
$("#cutSignTx").text("粘贴("+checkedMovefiles.length+"");
$("#cutSignSp").removeClass();
$("#cutSignSp").addClass("glyphicon glyphicon-import");
}
}
}
}
......@@ -696,9 +800,14 @@ function checkpath() {
$('#uploadfile').click();
}
// 获取选中文件
function getInputUpload(){
fs = $("#uploadfile").get(0).files;
showfilepath();
}
// 文件选中后自动回填文件路径
function showfilepath() {
var fs = $("#uploadfile").get(0).files;
var filename = "";
for (var i = 0; i < fs.length; i++) {
filename = filename + fs[i].name;
......@@ -723,7 +832,6 @@ function checkUploadFile() {
$("#uploadFileAlert").removeClass("alert-danger");
$("#uploadFileAlert").text("");
var fs = $("#uploadfile").get(0).files;
var filenames = new Array();
for (var i = 0; i < fs.length; i++) {
filenames[i] = fs[i].name.replace(/^.+?\\([^\\]+?)?$/gi, "$1");
......@@ -766,13 +874,10 @@ var xhr;
// 执行文件上传并实现上传进度显示
function doupload(count) {
var fs = $("#uploadfile").get(0).files;
var fcount = fs.length;
$("#pros").width("0%");// 先将进度条置0
var uploadfile = fs[count - 1];// 获取要上传的文件
if (uploadfile != null) {
var fname = uploadfile.name;
if (fcount > 1) {
$("#filecount").text("" + count + "/" + fcount + "");// 显示当前进度
......@@ -1099,7 +1204,7 @@ function showDownloadAllCheckedModel() {
if (checkedfiles.length == 0) {
$("#downloadAllCheckedName")
.text(
"提示:您还未选择任何文件,请先选中一些文件后再执行本操作(点击某一文件行来选中单一文件;按住Shift并点击文件行选中多个文件;点击列表的表头来选中/取消选中所有文件)。");
"提示:您还未选择任何文件,请先选中一些文件后再执行本操作(点击某一文件行来选中单一文件;按住Shift并点击文件行选中多个文件;使用Shitf+A选中/取消选中所有文件)。");
} else {
$("#downloadAllCheckedName").text(
"提示:您确认要打包并下载这" + checkedfiles.length + "项么?");
......@@ -1199,7 +1304,7 @@ function showDeleteAllCheckedModel() {
if (checkedfiles.length == 0) {
$('#deleteFileMessage')
.text(
"提示:您还未选择任何文件,请先选中一些文件后再执行本操作(点击某一文件行来选中单一文件;按住Shift并点击文件行选中多个文件;点击列表的表头来选中/取消选中所有文件)。");
"提示:您还未选择任何文件,请先选中一些文件后再执行本操作(点击某一文件行来选中单一文件;按住Shift并点击文件行选中多个文件;使用Shift+A选中/取消选中所有文件)。");
} else {
$('#deleteFileBox')
.html(
......@@ -1337,4 +1442,147 @@ function audio_vulome_up(){
// 音量减少,每次10%
function audio_vulome_down(){
ap.volume(ap.audio.volume-0.1,true);
}
// 按文件名排序
function sortbyfn(){
$("#sortByFN").addClass("glyphicon glyphicon-triangle-bottom");
$("#sortByCD").removeClass();
$("#sortByFS").removeClass();
$("#sortByCN").removeClass();
folderView.fileList.sort(function(v1,v2){
return v1.fileName.localeCompare(v2.fileName,"zh");
});
folderView.folderList.sort(function(v1,v2){
return v1.folderName.localeCompare(v2.folderName,"zh");
});
showFolderTable(folderView);
}
// 按创建日期排序
function sortbycd(){
$("#sortByFN").removeClass();
$("#sortByCD").addClass("glyphicon glyphicon-triangle-bottom");
$("#sortByFS").removeClass();
$("#sortByCN").removeClass();
folderView.fileList.sort(function(v1,v2){
var v1DateStr=v1.fileCreationDate.replace("","-").replace("","-").replace("","");
var v2DateStr=v2.fileCreationDate.replace("","-").replace("","-").replace("","");
var res=((new Date(Date.parse(v1DateStr)).getTime())-(new Date(Date.parse(v2DateStr)).getTime()));
return -1*res;
});
folderView.folderList.sort(function(v1,v2){
var v1DateStr=v1.folderCreationDate.replace("","-").replace("","-").replace("","");
var v2DateStr=v2.folderCreationDate.replace("","-").replace("","-").replace("","");
var res=((new Date(Date.parse(v1DateStr)).getTime())-(new Date(Date.parse(v2DateStr)).getTime()));
return -1*res;
});
showFolderTable(folderView);
}
// 按文件大小排序
function sortbyfs(){
$("#sortByFN").removeClass();
$("#sortByCD").removeClass();
$("#sortByFS").addClass("glyphicon glyphicon-triangle-bottom");
$("#sortByCN").removeClass();
folderView.fileList.sort(function(v1,v2){
return v2.fileSize-v1.fileSize;
});
showFolderTable(folderView);
}
// 按创建者排序
function sortbycn(){
$("#sortByFN").removeClass();
$("#sortByCD").removeClass();
$("#sortByFS").removeClass();
$("#sortByCN").addClass("glyphicon glyphicon-triangle-bottom");
folderView.fileList.sort(function(v1,v2){
return v1.fileCreator.localeCompare(v2.fileCreator,"zh");
});
folderView.folderList.sort(function(v1,v2){
return v1.folderCreator.localeCompare(v2.folderCreator,"zh");
});
showFolderTable(folderView);
}
// 显示原始的顺序
function showOriginFolderView(){
$("#sortByFN").removeClass();
$("#sortByCD").removeClass();
$("#sortByFS").removeClass();
$("#sortByCN").removeClass();
folderView=$.extend(true, {}, originFolderView);
showFolderTable(folderView);
}
// 确认文件移动(剪切-粘贴)操作
function startMoveFile(){
if($("#cutSignSp").hasClass("glyphicon glyphicon-import")&&checkedMovefiles!==undefined){
var moveIdArray = new Array();
for (var i = 0; i < checkedMovefiles.length; i++) {
moveIdArray[i] = checkedMovefiles[i].id;
}
var strIdList = JSON.stringify(moveIdArray);
$('#moveFilesMessage').text("提示:确定将这"+checkedMovefiles.length+"项移动到当前位置么?");
$('#moveFilesBox').html("<button id='dmvfbutton' type='button' class='btn btn-danger' onclick='doMoveFiles()'>全部移动</button>");
$('#moveFilesModal').modal('show');
}else{
checkedMovefiles = $(".info").get();
if (checkedMovefiles==undefined||checkedMovefiles.length == 0) {
$('#moveFilesMessage').text("提示:您还未选择任何文件,请先选中一些文件后再执行本操作(点击某一文件行来选中单一文件;按住Shift并点击文件行选中多个文件;使用Shift+A选中/取消选中所有文件)。");
$('#moveFilesModal').modal('show');
} else {
$("#cutSignTx").text("粘贴("+checkedMovefiles.length+"");
$("#cutSignSp").removeClass();
$("#cutSignSp").addClass("glyphicon glyphicon-import");
}
}
}
// 执行文件移动操作
function doMoveFiles(){
var moveIdArray = new Array();
for (var i = 0; i < checkedMovefiles.length; i++) {
moveIdArray[i] = checkedMovefiles[i].id;
}
var strIdList = JSON.stringify(moveIdArray);
$("#dmvfbutton").attr('disabled', true);
$('#moveFilesMessage').text("提示:正在移动,请稍候...");
$.ajax({
type : "POST",
dataType : "text",
data : {
strIdList : strIdList,
locationpath:locationpath
},
url : "homeController/moveCheckedFiles.ajax",
success : function(result) {
if (result == "mustLogin") {
window.location.href = "login.html";
} else {
if (result == "noAuthorized") {
$('#moveFilesMessage').text("提示:您的操作未被授权,移动失败");
$("#dmvfbutton").attr('disabled', false);
} else if (result == "errorParameter") {
$('#moveFilesMessage').text("提示:参数不正确,未能全部移动文件");
$("#dmvfbutton").attr('disabled', false);
} else if (result == "cannotMoveFiles") {
$('#moveFilesMessage').text("提示:出现意外错误,可能未能移动全部文件");
$("#dmvfbutton").attr('disabled', false);
} else if (result == "moveFilesSuccess") {
$('#moveFilesModal').modal('hide');
showFolderView(locationpath);
} else {
$('#moveFilesMessage').text("提示:出现意外错误,可能未能移动全部文件");
$("#dmvfbutton").attr('disabled', false);
}
}
},
error : function() {
$('#moveFilesMessage').text("提示:出现意外错误,可能未能移动全部文件");
$("#dmvfbutton").attr('disabled', false);
}
});
}
\ No newline at end of file
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册