mirror of https://gitee.com/zhang_1334717033/kiftd
update to v1.0.9-RE
parent
ac87fe11a7
commit
ccc296a788
|
|
@ -74,6 +74,14 @@ _注:kift为该功能的开发名称,其实际成果命名为kiftd。_
|
||||||
|
|
||||||
> 提示:当您更新版本后,请手动清除浏览器的缓存,之后刷新网盘主页以确保数据文件保持最新!否则可能导致新版页面功能无法使用。
|
> 提示:当您更新版本后,请手动清除浏览器的缓存,之后刷新网盘主页以确保数据文件保持最新!否则可能导致新版页面功能无法使用。
|
||||||
|
|
||||||
|
### 新版本v1.0.9
|
||||||
|
本次更新增加了一些新功能,方便用户操作。推荐所有用户升级体验。
|
||||||
|
+ 快捷键——为操作菜单中的每个操作项增加了快捷键(Shift+?),以便于用户高效操作。
|
||||||
|
+ 连续选中——提供连续选中功能:先选中一个文件,然后在另一处Shift+双击,二者之间的文件均会被选中。
|
||||||
|
+ 上传判定——上传过程中,如果路径下已经存在同名文件,您可以为其选择“跳过”、“覆盖”和“保留两者”了。
|
||||||
|
+ 为“必须登录”界面增加回车快捷键。
|
||||||
|
+ 修正了下载文件时特殊符号显示不正确的问题。
|
||||||
|
|
||||||
### 新版本v1.0.8
|
### 新版本v1.0.8
|
||||||
本次更新增加了一些新功能,同时进一步提高了稳定性,推荐所有用户升级体验。
|
本次更新增加了一些新功能,同时进一步提高了稳定性,推荐所有用户升级体验。
|
||||||
+ 修正断点续传存在的问题——经一些使用者反馈,该问题会导致下载速度越来越慢直至降为0。该问题已紧急修复,确保主流下载工具软件能够正确进行多线程下载。
|
+ 修正断点续传存在的问题——经一些使用者反馈,该问题会导致下载速度越来越慢直至降为0。该问题已紧急修复,确保主流下载工具软件能够正确进行多线程下载。
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
BIN
kiftd说明文档.pdf
BIN
kiftd说明文档.pdf
Binary file not shown.
Binary file not shown.
|
|
@ -15,7 +15,8 @@
|
||||||
|
|
||||||
<select id="queryByParentFolderId" parameterType="java.lang.String"
|
<select id="queryByParentFolderId" parameterType="java.lang.String"
|
||||||
resultMap="BaseResultMap">
|
resultMap="BaseResultMap">
|
||||||
SELECT * FROM FILE WHERE file_parent_folder = #{pfid,jdbcType=VARCHAR}
|
SELECT * FROM FILE WHERE file_parent_folder =
|
||||||
|
#{pfid,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insert" parameterType="kohgylw.kiftd.server.model.Node">
|
<insert id="insert" parameterType="kohgylw.kiftd.server.model.Node">
|
||||||
|
|
@ -23,21 +24,36 @@
|
||||||
VALUES(#{fileId,jdbcType=VARCHAR},#{fileName,jdbcType=VARCHAR},#{fileSize,jdbcType=VARCHAR},#{fileParentFolder,jdbcType=VARCHAR},#{fileCreationDate,jdbcType=VARCHAR},#{fileCreator,jdbcType=VARCHAR},#{filePath,jdbcType=VARCHAR})
|
VALUES(#{fileId,jdbcType=VARCHAR},#{fileName,jdbcType=VARCHAR},#{fileSize,jdbcType=VARCHAR},#{fileParentFolder,jdbcType=VARCHAR},#{fileCreationDate,jdbcType=VARCHAR},#{fileCreator,jdbcType=VARCHAR},#{filePath,jdbcType=VARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<update id="update" parameterType="kohgylw.kiftd.server.model.Node">
|
||||||
|
UPDATE FILE SET file_name =
|
||||||
|
#{fileName,jdbcType=VARCHAR},file_size =
|
||||||
|
#{fileSize,jdbcType=VARCHAR},file_parent_folder =
|
||||||
|
#{fileParentFolder,jdbcType=VARCHAR},file_creation_date =
|
||||||
|
#{fileCreationDate,jdbcType=VARCHAR},file_creator =
|
||||||
|
#{fileCreator,jdbcType=VARCHAR},file_path =
|
||||||
|
#{filePath,jdbcType=VARCHAR} WHERE file_id =
|
||||||
|
#{fileId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deleteByParentFolderId" parameterType="java.lang.String">
|
<delete id="deleteByParentFolderId" parameterType="java.lang.String">
|
||||||
DELETE FROM FILE WHERE file_parent_folder = #{pfid,jdbcType=VARCHAR}
|
DELETE FROM
|
||||||
|
FILE WHERE file_parent_folder = #{pfid,jdbcType=VARCHAR}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteById" parameterType="java.lang.String">
|
<delete id="deleteById" parameterType="java.lang.String">
|
||||||
DELETE FROM FILE WHERE file_id = #{fileId,jdbcType=VARCHAR}
|
DELETE FROM FILE WHERE
|
||||||
|
file_id = #{fileId,jdbcType=VARCHAR}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="queryById" parameterType="java.lang.String"
|
<select id="queryById" parameterType="java.lang.String"
|
||||||
resultMap="BaseResultMap">
|
resultMap="BaseResultMap">
|
||||||
SELECT * FROM FILE WHERE file_id = #{fileId,jdbcType=VARCHAR}
|
SELECT * FROM FILE WHERE file_id =
|
||||||
|
#{fileId,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateFileNameById" parameterType="java.util.Map">
|
<update id="updateFileNameById" parameterType="java.util.Map">
|
||||||
UPDATE FILE SET file_name = #{newFileName,jdbcType=VARCHAR} WHERE file_id =
|
UPDATE FILE SET
|
||||||
|
file_name = #{newFileName,jdbcType=VARCHAR} WHERE file_id =
|
||||||
#{fileId,jdbcType=VARCHAR}
|
#{fileId,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
@ -47,17 +63,21 @@
|
||||||
|
|
||||||
<select id="queryByPath" parameterType="java.lang.String"
|
<select id="queryByPath" parameterType="java.lang.String"
|
||||||
resultMap="BaseResultMap">
|
resultMap="BaseResultMap">
|
||||||
SELECT * FROM FILE WHERE file_path = #{path,jdbcType=VARCHAR}
|
SELECT * FROM FILE WHERE file_path =
|
||||||
|
#{path,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryBySomeFolder" parameterType="java.lang.String"
|
<select id="queryBySomeFolder" parameterType="java.lang.String"
|
||||||
resultMap="BaseResultMap">
|
resultMap="BaseResultMap">
|
||||||
SELECT * FROM FILE WHERE file_parent_folder in (SELECT file_parent_folder
|
SELECT * FROM FILE WHERE file_parent_folder in (SELECT
|
||||||
FROM FILE WHERE file_id = #{fileId,jdbcType=VARCHAR})
|
file_parent_folder
|
||||||
|
FROM FILE WHERE file_id =
|
||||||
|
#{fileId,jdbcType=VARCHAR})
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="moveById" parameterType="java.util.Map">
|
<update id="moveById" parameterType="java.util.Map">
|
||||||
UPDATE FILE SET file_parent_folder = #{locationpath,jdbcType=VARCHAR} WHERE file_id =
|
UPDATE FILE SET
|
||||||
|
file_parent_folder = #{locationpath,jdbcType=VARCHAR} WHERE file_id =
|
||||||
#{fileId,jdbcType=VARCHAR}
|
#{fileId,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -85,12 +85,21 @@
|
||||||
class="glyphicon glyphicon-cog"></span> 操作 <span
|
class="glyphicon glyphicon-cog"></span> 操作 <span
|
||||||
class="caret"></span></a>
|
class="caret"></span></a>
|
||||||
<ul class="dropdown-menu" id="fileListDropDown">
|
<ul class="dropdown-menu" id="fileListDropDown">
|
||||||
<li id="createFolderButtonLi"><a>新建文件夹</a></li>
|
<li id="createFolderButtonLi"><a>新建文件夹 <span
|
||||||
|
class="pull-right"><span
|
||||||
|
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+N</span></a></li>
|
||||||
<li role="separator" class="divider"></li>
|
<li role="separator" class="divider"></li>
|
||||||
<li id="uploadFileButtonLi"><a>上传文件</a></li>
|
<li id="uploadFileButtonLi"><a>上传文件 <span
|
||||||
|
class="pull-right"><span
|
||||||
|
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+U</span></a></li>
|
||||||
<li role="separator" class="divider"></li>
|
<li role="separator" class="divider"></li>
|
||||||
<li id="cutFileButtonLi"><a><span id='cutSignTx'>剪切</span></a></li>
|
<li id="cutFileButtonLi"><a><span id='cutSignTx'>剪切
|
||||||
<li id="deleteSeelectFileButtonLi"><a>批量删除</a></li>
|
<span class="pull-right"><span
|
||||||
|
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+C</span>
|
||||||
|
</span></a></li>
|
||||||
|
<li id="deleteSeelectFileButtonLi"><a>批量删除 <span
|
||||||
|
class="pull-right"><span
|
||||||
|
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+D</span></a></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -349,6 +358,17 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="uploadFileAlert" role="alert"></div>
|
<div id="uploadFileAlert" role="alert"></div>
|
||||||
|
<div id="selectFileUpLoadModelAlert" class="alert alert-danger"
|
||||||
|
role="alert">
|
||||||
|
<h4>提示:存在同名文件!</h4>
|
||||||
|
<p>您要上传的文件“<span id="repeFileName"></span>”已存在于该路径下,您希望:</p>
|
||||||
|
<p><input id="selectFileUpLoadModelAsAll" type="checkbox"> 全部应用</p>
|
||||||
|
<p>
|
||||||
|
<button type="button" class="btn btn-danger btn-sm" onclick="selectFileUpLoadModelEnd('cover')">覆盖</button>
|
||||||
|
<button type="button" class="btn btn-default btn-sm" onclick="selectFileUpLoadModelEnd('skip')">跳过</button>
|
||||||
|
<button type="button" class="btn btn-default btn-sm" onclick="selectFileUpLoadModelEnd('both')">保留两者</button>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default"
|
<button type="button" class="btn btn-default"
|
||||||
|
|
@ -592,5 +612,5 @@
|
||||||
<!-- 音乐播放器 -->
|
<!-- 音乐播放器 -->
|
||||||
<script type="text/javascript" src="js/APlayer.min.js"></script>
|
<script type="text/javascript" src="js/APlayer.min.js"></script>
|
||||||
<!-- 页面操作定义 -->
|
<!-- 页面操作定义 -->
|
||||||
<script type="text/javascript" src="js/home.js"></script>
|
<script type="text/javascript" src="js/home.min.js"></script>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
* home.js kiftd主页面操作定义 by 青阳龙野 该文件为home.html的操作定义文件,包含了kiftd页面上的主要操作实现。
|
* home.js kiftd主页面操作定义 by 青阳龙野 该文件为home.html的操作定义文件,包含了kiftd页面上的主要操作实现。
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//所用val名称列表,注意不要冲突,其中一些参数能够设定界面行为。
|
// 所用val名称列表,注意不要冲突,其中一些参数能够设定界面行为。
|
||||||
var locationpath = "root";// 记录当前文件路径
|
var locationpath = "root";// 记录当前文件路径
|
||||||
var parentpath = "null";// 记录当前文件路径的父级目录
|
var parentpath = "null";// 记录当前文件路径的父级目录
|
||||||
var ap;// 音乐播放器对象
|
var ap;// 音乐播放器对象
|
||||||
|
|
@ -19,14 +19,15 @@ var viewerPageSize = 15; // 显示图片页的最大长度,注意最好是奇
|
||||||
var viewer; // viewer对象,用于预览图片功能
|
var viewer; // viewer对象,用于预览图片功能
|
||||||
var viewerPageIndex; // 分页预览图片——已浏览图片页号
|
var viewerPageIndex; // 分页预览图片——已浏览图片页号
|
||||||
var viewerTotal; // 分页预览图片——总页码数
|
var viewerTotal; // 分页预览图片——总页码数
|
||||||
var pvl;//预览图片列表的JSON格式对象
|
var pvl;// 预览图片列表的JSON格式对象
|
||||||
|
var checkFilesTip="提示:您还未选择任何文件,请先选中一些文件后再执行本操作:<br /><br /><kbd>单击</kbd>:选中某一文件<br /><br /><kbd><kbd>Shift</kbd>+<kbd>单击</kbd></kbd>:选中多个文件<br /><br /><kbd><kbd>Shift</kbd>+<kbd>双击</kbd></kbd>:选中连续的文件<br /><br /><kbd><kbd>Shitf</kbd>+<kbd>A</kbd></kbd>:选中/取消选中所有文件";// 选取文件提示
|
||||||
|
|
||||||
//界面功能方法定义
|
// 界面功能方法定义
|
||||||
// 页面初始化
|
// 页面初始化
|
||||||
$(function() {
|
$(function() {
|
||||||
getServerOS();// 得到服务器操作系统信息
|
getServerOS();// 得到服务器操作系统信息
|
||||||
showFolderView("root");// 显示根节点页面视图
|
showFolderView("root");// 显示根节点页面视图
|
||||||
// 点击空白处取消选中文件并重新加载文件视图(不支持火狐)
|
// 点击空白处取消选中文件(不支持火狐)
|
||||||
$(document).click(function(e) {
|
$(document).click(function(e) {
|
||||||
var filetable = $("#filetable")[0];
|
var filetable = $("#filetable")[0];
|
||||||
if (e.target !== filetable && !$.contains(filetable, e.target)) {
|
if (e.target !== filetable && !$.contains(filetable, e.target)) {
|
||||||
|
|
@ -51,7 +52,7 @@ $(function() {
|
||||||
$("#accountid").val('');
|
$("#accountid").val('');
|
||||||
$("#accountpwd").val('');
|
$("#accountpwd").val('');
|
||||||
});
|
});
|
||||||
// 各个模态框的回车响应功能。该功能仅对“首选”的按钮有效,对其他按钮无效,以避免用户误操作。
|
// 各个模态框的打开判定及回车响应功能。该功能仅对“首选”的按钮有效,对其他按钮无效,以避免用户误操作。
|
||||||
$('.modal').on('shown.bs.modal', function(e) {
|
$('.modal').on('shown.bs.modal', function(e) {
|
||||||
$(this).addClass("shown");
|
$(this).addClass("shown");
|
||||||
});
|
});
|
||||||
|
|
@ -192,19 +193,44 @@ $(function() {
|
||||||
alert("提示:您不具备上传权限,无法上传文件。");
|
alert("提示:您不具备上传权限,无法上传文件。");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Shift+A全选文件/反选文件
|
// Shift+A全选文件/反选文件,Shift+N新建文件夹,Shift+U上传文件,Shift+C&V剪切粘贴,Shift+D批量删除
|
||||||
$(document).keypress(function (e) {
|
$(document).keypress(function (e) {
|
||||||
var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
|
if($('.modal.shown').length == 0 || ($('.modal.shown').length == 1 && $('.modal.shown').attr('id') == 'loadingModal')){
|
||||||
if (keyCode == 65){
|
var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
|
||||||
if (window.event.shiftKey) {
|
if (window.event.shiftKey) {
|
||||||
checkallfile();
|
switch (keyCode) {
|
||||||
|
case 65:
|
||||||
|
checkallfile();
|
||||||
|
break;
|
||||||
|
case 78:
|
||||||
|
$('#createFolderButtonLi a').click();
|
||||||
|
break;
|
||||||
|
case 85:
|
||||||
|
$('#uploadFileButtonLi a').click();
|
||||||
|
break;
|
||||||
|
case 68:
|
||||||
|
$('#deleteSeelectFileButtonLi a').click();
|
||||||
|
break;
|
||||||
|
case 67:
|
||||||
|
$('#cutFileButtonLi a').click();
|
||||||
|
break;
|
||||||
|
case 86:
|
||||||
|
if($("#cutSignTx").hasClass("cuted")&&checkedMovefiles!==undefined){
|
||||||
|
$('#cutFileButtonLi a').click();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 关闭移动提示框自动取消移动
|
// 关闭移动提示框自动取消移动
|
||||||
$('#moveFilesModal').on('hidden.bs.modal', function(e) {
|
$('#moveFilesModal').on('hidden.bs.modal', function(e) {
|
||||||
checkedMovefiles=undefined;
|
checkedMovefiles=undefined;
|
||||||
$("#cutSignTx").text("剪切");
|
$("#cutSignTx").html("剪切 <span class='pull-right'><span class='glyphicon glyphicon-arrow-up' aria-hidden='true'></span>+C</span>");
|
||||||
$("#cutSignTx").removeClass("cuted");
|
$("#cutSignTx").removeClass("cuted");
|
||||||
$('#moveFilesBox').html("");
|
$('#moveFilesBox').html("");
|
||||||
});
|
});
|
||||||
|
|
@ -308,11 +334,13 @@ function showFolderView(fid) {
|
||||||
function startLoading(){
|
function startLoading(){
|
||||||
$('#loadingModal').modal({backdrop:'static', keyboard: false});
|
$('#loadingModal').modal({backdrop:'static', keyboard: false});
|
||||||
$('#loadingModal').modal('show');
|
$('#loadingModal').modal('show');
|
||||||
|
$('#loadingModal').addClass("shown");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 结束文件视图加载动画
|
// 结束文件视图加载动画
|
||||||
function endLoading(){
|
function endLoading(){
|
||||||
$('#loadingModal').modal('hide');
|
$('#loadingModal').modal('hide');
|
||||||
|
$('#loadingModal').removeClass("shown");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 开始登陆加载动画
|
// 开始登陆加载动画
|
||||||
|
|
@ -631,7 +659,7 @@ function showFolderTable(folderView) {
|
||||||
folderView.fileList,
|
folderView.fileList,
|
||||||
function(n, fi) {
|
function(n, fi) {
|
||||||
var fileRow = "<tr onclick='checkfile(" + '"'
|
var fileRow = "<tr onclick='checkfile(" + '"'
|
||||||
+ fi.fileId + '"' + ")' id='" + fi.fileId
|
+ fi.fileId + '"' + ")' ondblclick='checkConsFile("+'"'+fi.fileId+'"'+")' id='" + fi.fileId
|
||||||
+ "' class='filerow'><td>" + fi.fileName
|
+ "' class='filerow'><td>" + fi.fileName
|
||||||
+ "</td><td>" + fi.fileCreationDate;
|
+ "</td><td>" + fi.fileCreationDate;
|
||||||
if(fi.fileSize=="0"){
|
if(fi.fileSize=="0"){
|
||||||
|
|
@ -930,10 +958,12 @@ function showUploadFileModel() {
|
||||||
$("#uploadfile").val("");
|
$("#uploadfile").val("");
|
||||||
$("#filepath").val("");
|
$("#filepath").val("");
|
||||||
$("#pros").width("0%");
|
$("#pros").width("0%");
|
||||||
|
$("#pros").attr('aria-valuenow','0');
|
||||||
$("#umbutton").attr('disabled', false);
|
$("#umbutton").attr('disabled', false);
|
||||||
$("#filecount").text("");
|
$("#filecount").text("");
|
||||||
$("#uploadstatus").text("");
|
$("#uploadstatus").text("");
|
||||||
$("#selectcount").text("");
|
$("#selectcount").text("");
|
||||||
|
$("#selectFileUpLoadModelAlert").hide();
|
||||||
}
|
}
|
||||||
$('#uploadFileModal').modal('show');
|
$('#uploadFileModal').modal('show');
|
||||||
}
|
}
|
||||||
|
|
@ -971,8 +1001,9 @@ function checkUploadFile() {
|
||||||
if(isUpLoading==false){
|
if(isUpLoading==false){
|
||||||
if(fs!=null&&fs.length>0){
|
if(fs!=null&&fs.length>0){
|
||||||
$("#filepath").attr("disabled","disabled");
|
$("#filepath").attr("disabled","disabled");
|
||||||
isUpLoading=true;
|
|
||||||
$("#umbutton").attr('disabled', true);
|
$("#umbutton").attr('disabled', true);
|
||||||
|
isUpLoading=true;
|
||||||
|
repeModelList=null;
|
||||||
$("#uploadFileAlert").removeClass("alert");
|
$("#uploadFileAlert").removeClass("alert");
|
||||||
$("#uploadFileAlert").removeClass("alert-danger");
|
$("#uploadFileAlert").removeClass("alert-danger");
|
||||||
$("#uploadFileAlert").text("");
|
$("#uploadFileAlert").text("");
|
||||||
|
|
@ -999,8 +1030,9 @@ function checkUploadFile() {
|
||||||
} else if (result == "noAuthorized") {
|
} else if (result == "noAuthorized") {
|
||||||
showUploadFileAlert("提示:您的操作未被授权,无法开始上传");
|
showUploadFileAlert("提示:您的操作未被授权,无法开始上传");
|
||||||
} else if (result.startsWith("duplicationFileName:")) {
|
} else if (result.startsWith("duplicationFileName:")) {
|
||||||
showUploadFileAlert("提示:本路径下已存在同名的文件:["
|
repeList=eval("("+result.substring(20)+")");
|
||||||
+ result.substring(20) + "],无法开始上传");
|
repeIndex=0;
|
||||||
|
selectFileUpLoadModelStart();
|
||||||
} else if (result == "permitUpload") {
|
} else if (result == "permitUpload") {
|
||||||
doupload(1);
|
doupload(1);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1018,10 +1050,42 @@ function checkUploadFile() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var repeList;//这个是重复文件名的列表,型如['xxx','ooo',...]
|
||||||
|
var repeIndex;//当前设定上传模式的文件序号
|
||||||
|
var repeModelList;//这个是对每一个重复文件选取的上传模式,型如{'xxx':'skip','ooo':'both',...}
|
||||||
|
|
||||||
|
// 针对同名文件,选择上传的模式:跳过(skip)、覆盖(cover)和保留两者(both)
|
||||||
|
function selectFileUpLoadModelStart(){
|
||||||
|
$("#selectFileUpLoadModelAlert").show();
|
||||||
|
$("#repeFileName").text(repeList[repeIndex]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectFileUpLoadModelEnd(t){
|
||||||
|
if(repeModelList == null){
|
||||||
|
repeModelList={};
|
||||||
|
}
|
||||||
|
repeModelList[$("#repeFileName").text()]=t;
|
||||||
|
$("#selectFileUpLoadModelAlert").hide();
|
||||||
|
if($('#selectFileUpLoadModelAsAll').prop('checked')){
|
||||||
|
for(var i=repeIndex;i<repeList.length;i++){
|
||||||
|
repeModelList[repeList[i]]=t;
|
||||||
|
}
|
||||||
|
doupload(1);
|
||||||
|
}else{
|
||||||
|
repeIndex++;
|
||||||
|
if(repeIndex<repeList.length){
|
||||||
|
selectFileUpLoadModelStart();
|
||||||
|
}else{
|
||||||
|
doupload(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 执行文件上传并实现上传进度显示
|
// 执行文件上传并实现上传进度显示
|
||||||
function doupload(count) {
|
function doupload(count) {
|
||||||
var fcount = fs.length;
|
var fcount = fs.length;
|
||||||
$("#pros").width("0%");// 先将进度条置0
|
$("#pros").width("0%");// 先将进度条置0
|
||||||
|
$("#pros").attr('aria-valuenow',"0");
|
||||||
var uploadfile = fs[count - 1];// 获取要上传的文件
|
var uploadfile = fs[count - 1];// 获取要上传的文件
|
||||||
if (uploadfile != null) {
|
if (uploadfile != null) {
|
||||||
var fname = uploadfile.name;
|
var fname = uploadfile.name;
|
||||||
|
|
@ -1037,7 +1101,31 @@ function doupload(count) {
|
||||||
|
|
||||||
fd.append("file", uploadfile);// 将文件对象添加到FormData对象中,字段名为uploadfile
|
fd.append("file", uploadfile);// 将文件对象添加到FormData对象中,字段名为uploadfile
|
||||||
fd.append("folderId", locationpath);
|
fd.append("folderId", locationpath);
|
||||||
|
if(repeModelList != null && repeModelList[fname] != null){
|
||||||
|
if(repeModelList[fname] == 'skip'){
|
||||||
|
$("#uls_" + count).text("[已完成]");
|
||||||
|
if (count < fcount) {
|
||||||
|
doupload(count + 1);
|
||||||
|
return ;
|
||||||
|
} else {
|
||||||
|
// 清空所有提示信息,还原上传窗口
|
||||||
|
isUpLoading=false;
|
||||||
|
$("#filepath").removeAttr("disabled");
|
||||||
|
$("#uploadfile").val("");
|
||||||
|
$("#filepath").val("");
|
||||||
|
$("#pros").width("0%");
|
||||||
|
$("#pros").attr('aria-valuenow',"0");
|
||||||
|
$("#umbutton").attr('disabled', false);
|
||||||
|
$("#filecount").text("");
|
||||||
|
$("#uploadstatus").text("");
|
||||||
|
$("#selectcount").text("");
|
||||||
|
$('#uploadFileModal').modal('hide');
|
||||||
|
showFolderView(locationpath);
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fd.append("repeType", repeModelList[fname]);
|
||||||
|
}
|
||||||
xhr.open("POST", "homeController/douploadFile.ajax", true);// 上传目标
|
xhr.open("POST", "homeController/douploadFile.ajax", true);// 上传目标
|
||||||
|
|
||||||
xhr.upload.addEventListener("progress", uploadProgress, false);// 这个是对上传进度的监听
|
xhr.upload.addEventListener("progress", uploadProgress, false);// 这个是对上传进度的监听
|
||||||
|
|
@ -1061,6 +1149,7 @@ function doupload(count) {
|
||||||
$("#uploadfile").val("");
|
$("#uploadfile").val("");
|
||||||
$("#filepath").val("");
|
$("#filepath").val("");
|
||||||
$("#pros").width("0%");
|
$("#pros").width("0%");
|
||||||
|
$("#pros").attr('aria-valuenow',"0");
|
||||||
$("#umbutton").attr('disabled', false);
|
$("#umbutton").attr('disabled', false);
|
||||||
$("#filecount").text("");
|
$("#filecount").text("");
|
||||||
$("#uploadstatus").text("");
|
$("#uploadstatus").text("");
|
||||||
|
|
@ -1095,10 +1184,11 @@ function uploadProgress(evt) {
|
||||||
var percentComplete = Math.round((evt.loaded) * 100 / evt.total);
|
var percentComplete = Math.round((evt.loaded) * 100 / evt.total);
|
||||||
// 加载进度条,同时显示信息
|
// 加载进度条,同时显示信息
|
||||||
$("#pros").width(percentComplete + "%");
|
$("#pros").width(percentComplete + "%");
|
||||||
|
$("#pros").attr('aria-valuenow',""+percentComplete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示上传文件状态提示
|
// 显示上传文件错误提示
|
||||||
function showUploadFileAlert(txt) {
|
function showUploadFileAlert(txt) {
|
||||||
isUpLoading=false;
|
isUpLoading=false;
|
||||||
$("#filepath").removeAttr("disabled");
|
$("#filepath").removeAttr("disabled");
|
||||||
|
|
@ -1255,6 +1345,7 @@ function abortUpload() {
|
||||||
xhr.abort();
|
xhr.abort();
|
||||||
$("#umbutton").attr('disabled', false);
|
$("#umbutton").attr('disabled', false);
|
||||||
$("#pros").width("0%");
|
$("#pros").width("0%");
|
||||||
|
$("#pros").attr('aria-valuenow',"0");
|
||||||
$("#filecount").text("");
|
$("#filecount").text("");
|
||||||
}
|
}
|
||||||
$("#uploadfile").val("");
|
$("#uploadfile").val("");
|
||||||
|
|
@ -1400,10 +1491,10 @@ function createViewListByPage() {
|
||||||
|
|
||||||
// 选中某一行文件,如果使用Shift点击则为多选
|
// 选中某一行文件,如果使用Shift点击则为多选
|
||||||
function checkfile(fileId) {
|
function checkfile(fileId) {
|
||||||
if (!window.event.shiftKey) {
|
if(!window.event.shiftKey){
|
||||||
$(".filerow").removeClass("info");
|
$(".filerow").removeClass("info");
|
||||||
$("#" + fileId).addClass("info");
|
$("#" + fileId).addClass("info");
|
||||||
} else {
|
}else{
|
||||||
if ($("#" + fileId).hasClass("info")) {
|
if ($("#" + fileId).hasClass("info")) {
|
||||||
$("#" + fileId).removeClass("info");
|
$("#" + fileId).removeClass("info");
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1412,6 +1503,28 @@ function checkfile(fileId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 连续选中若干行文件:Shift+双击,选中规则为:前有选前,后有选后,全有也选后。
|
||||||
|
function checkConsFile(fileId){
|
||||||
|
if(window.event.shiftKey){
|
||||||
|
var endRow=$("#" + fileId);
|
||||||
|
var endRowIndex=endRow.index();
|
||||||
|
var startRowIndex=$('.filerow.info:last').index();
|
||||||
|
if(startRowIndex != -1){
|
||||||
|
if(startRowIndex < endRowIndex){
|
||||||
|
while(endRow[0] && !endRow.hasClass("info")){
|
||||||
|
endRow.addClass("info");
|
||||||
|
endRow=endRow.prev();
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
while(endRow[0] && !endRow.hasClass("info")){
|
||||||
|
endRow.addClass("info");
|
||||||
|
endRow=endRow.next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var checkAll = true;
|
var checkAll = true;
|
||||||
|
|
||||||
// 切换全部文件行的选中或非选中
|
// 切换全部文件行的选中或非选中
|
||||||
|
|
@ -1431,9 +1544,7 @@ function showDownloadAllCheckedModel() {
|
||||||
$("#downloadAllCheckedLoad").text("");
|
$("#downloadAllCheckedLoad").text("");
|
||||||
var checkedfiles = $(".info").get();
|
var checkedfiles = $(".info").get();
|
||||||
if (checkedfiles.length == 0) {
|
if (checkedfiles.length == 0) {
|
||||||
$("#downloadAllCheckedName")
|
$("#downloadAllCheckedName").html(checkFilesTip);
|
||||||
.text(
|
|
||||||
"提示:您还未选择任何文件,请先选中一些文件后再执行本操作(点击某一文件行来选中单一文件;按住Shift并点击文件行选中多个文件;使用Shitf+A选中/取消选中所有文件)。");
|
|
||||||
} else {
|
} else {
|
||||||
$("#downloadAllCheckedName").text(
|
$("#downloadAllCheckedName").text(
|
||||||
"提示:您确认要打包并下载这" + checkedfiles.length + "项么?");
|
"提示:您确认要打包并下载这" + checkedfiles.length + "项么?");
|
||||||
|
|
@ -1531,9 +1642,7 @@ function showDeleteAllCheckedModel() {
|
||||||
var checkedfiles = $(".info").get();
|
var checkedfiles = $(".info").get();
|
||||||
$("#dfmbutton").attr('disabled', false);
|
$("#dfmbutton").attr('disabled', false);
|
||||||
if (checkedfiles.length == 0) {
|
if (checkedfiles.length == 0) {
|
||||||
$('#deleteFileMessage')
|
$('#deleteFileMessage').html(checkFilesTip);
|
||||||
.text(
|
|
||||||
"提示:您还未选择任何文件,请先选中一些文件后再执行本操作(点击某一文件行来选中单一文件;按住Shift并点击文件行选中多个文件;使用Shift+A选中/取消选中所有文件)。");
|
|
||||||
} else {
|
} else {
|
||||||
$('#deleteFileBox')
|
$('#deleteFileBox')
|
||||||
.html(
|
.html(
|
||||||
|
|
@ -1764,10 +1873,10 @@ function startMoveFile(){
|
||||||
}else{
|
}else{
|
||||||
checkedMovefiles = $("#foldertable .info").get();
|
checkedMovefiles = $("#foldertable .info").get();
|
||||||
if (checkedMovefiles==undefined||checkedMovefiles.length == 0) {
|
if (checkedMovefiles==undefined||checkedMovefiles.length == 0) {
|
||||||
$('#moveFilesMessage').text("提示:您还未选择任何文件,请先选中一些文件后再执行本操作(点击某一文件行来选中单一文件;按住Shift并点击文件行选中多个文件;使用Shift+A选中/取消选中所有文件)。");
|
$('#moveFilesMessage').html(checkFilesTip);
|
||||||
$('#moveFilesModal').modal('show');
|
$('#moveFilesModal').modal('show');
|
||||||
} else {
|
} else {
|
||||||
$("#cutSignTx").text("粘贴("+checkedMovefiles.length+")");
|
$("#cutSignTx").html("粘贴("+checkedMovefiles.length+")<span class='pull-right'><span class='glyphicon glyphicon-arrow-up' aria-hidden='true'></span>+V</span>");
|
||||||
$("#cutSignTx").addClass("cuted");
|
$("#cutSignTx").addClass("cuted");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -2,6 +2,19 @@
|
||||||
* login.html
|
* login.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
// 回车键快捷操作
|
||||||
|
$("body").keypress(function(e) {
|
||||||
|
var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
|
||||||
|
if (keyCode == 13) {
|
||||||
|
var g = $("#loginBtn").click();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 打开页面自动聚焦账户输入框
|
||||||
|
$("#accountid").focus();
|
||||||
|
})
|
||||||
|
|
||||||
function dologin() {
|
function dologin() {
|
||||||
var accountId = $("#accountid").val();
|
var accountId = $("#accountid").val();
|
||||||
var accountPwd = $("#accountpwd").val();
|
var accountPwd = $("#accountpwd").val();
|
||||||
|
|
@ -25,7 +38,7 @@ function dologin() {
|
||||||
url : "homeController/getPublicKey.ajax",
|
url : "homeController/getPublicKey.ajax",
|
||||||
data : {},
|
data : {},
|
||||||
success : function(result) {
|
success : function(result) {
|
||||||
var publicKeyInfo=eval("("+result+")");
|
var publicKeyInfo = eval("(" + result + ")");
|
||||||
var loginInfo = '{accountId:"' + accountId + '",accountPwd:"'
|
var loginInfo = '{accountId:"' + accountId + '",accountPwd:"'
|
||||||
+ accountPwd + '",time:"' + publicKeyInfo.time + '"}';
|
+ accountPwd + '",time:"' + publicKeyInfo.time + '"}';
|
||||||
var encrypt = new JSEncrypt();// 加密插件对象
|
var encrypt = new JSEncrypt();// 加密插件对象
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div id="alertbox" role="alert"></div>
|
<div id="alertbox" role="alert"></div>
|
||||||
<input class="form-control btn-success" type="button" value="登录"
|
<input id="loginBtn" class="form-control btn-success" type="button" value="登录"
|
||||||
onclick="dologin()"> <br />
|
onclick="dologin()"> <br />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue