mirror of https://gitee.com/zhang_1334717033/kiftd
【重大更新v1.0.1】调整了打包下载功能的提示窗口
parent
7a8a4c88f9
commit
e0df2130b7
|
|
@ -24,6 +24,9 @@ _注:kift的解压即用版就叫做kiftd_
|
|||
|
||||
-------------------
|
||||
最新讯息:
|
||||
### 关于打包下载功能的细节调整
|
||||
+ 在打包下载时,ZIP的压缩时间比较长,这回导致用户误以为系统崩溃。现在为压缩过程增加了提示信息。另外,本应用内置的ZIP压缩方式在压缩100MB以上的文件时所用时间会明显变长。原本计划打包下载就是为了给碎片化文件一次性下载准备的,并未考虑到压缩大文件,因此效率不高。在本人找到更好的压缩算法并更新前,请不要对太大的文件进行打包下载(虽然不会崩溃,但压缩时间会很长)。
|
||||
|
||||
### 关于windows下安装方法的修正:
|
||||
+ 本人在Windows虚拟机上进行了模拟安装测试,并发现了之前很多用户反馈闪退问题的根本原因:安装java不会在系统中自动增加JRE_HOME环境变量。这导致kiftd根本无法找到java运行环境,出现闪退。目前本人已经紧急更新了windows下的安装流程并详细说明,为您带来的不便深感歉意!详见《说明文档》。
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
|||
#Generated by Maven Integration for Eclipse
|
||||
#Fri Mar 23 08:34:28 CST 2018
|
||||
#Thu Mar 29 14:06:37 CST 2018
|
||||
version=0.0.1-SNAPSHOT
|
||||
groupId=kohgylw
|
||||
m2e.projectName=KohgylwIFT
|
||||
|
|
|
|||
|
|
@ -79,7 +79,16 @@
|
|||
<version>2.4</version>
|
||||
</dependency>
|
||||
<!-- end file -->
|
||||
|
||||
|
||||
<!-- ZIP lz4 Util -->
|
||||
<!-- https://mvnrepository.com/artifact/net.jpountz.lz4/lz4 -->
|
||||
<dependency>
|
||||
<groupId>net.jpountz.lz4</groupId>
|
||||
<artifactId>lz4</artifactId>
|
||||
<version>1.3.0</version>
|
||||
</dependency>
|
||||
<!-- end ZIP -->
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>KohgylwIFT</finalName>
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -32,7 +32,7 @@ authOverall = l
|
|||
#[Login and browse home page]
|
||||
#This setting means visitor could browse file list if not login
|
||||
#If you want any visitor must log in to entry the home page,you can set this value is N
|
||||
#(N = oN;O = off)
|
||||
#(N = no;O = off)
|
||||
#Example:
|
||||
#mustLogin = N
|
||||
mustLogin = O
|
||||
|
|
|
|||
|
|
@ -249,7 +249,9 @@
|
|||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5>选择文件:<span id="selectcount"></span></h5>
|
||||
<h5>
|
||||
选择文件:<span id="selectcount"></span>
|
||||
</h5>
|
||||
<input type="text" id="filepath" class="form-control"
|
||||
onclick="checkpath()" onfocus="this.blur()"
|
||||
placeholder="请点击选择要上传的文件……"> <input type="file"
|
||||
|
|
@ -368,8 +370,33 @@
|
|||
</div>
|
||||
</div>
|
||||
<%-- end 修改文件夹模态框 --%>
|
||||
<%-- 打包下载模态框 --%>
|
||||
<div class="modal fade bs-example-modal-sm" id="downloadAllCheckedModal"
|
||||
tabindex="-1" role="dialog" aria-labelledby="downloadAllCheckedModalTitle">
|
||||
<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">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="downloadAllCheckedModalTitle">
|
||||
<span class="glyphicon glyphicon-cloud-download"></span> 打包下载
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h5><span id="downloadAllCheckedName"></span><span id="downloadAllCheckedLoad" style="text-align: center;"></span></h5>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
||||
<span id="downloadAllCheckedBox"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- end 打包下载模态框 --%>
|
||||
</body>
|
||||
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="js/home.min.js"></script>
|
||||
<script type="text/javascript" src="js/home.js"></script>
|
||||
</html>
|
||||
|
|
@ -938,47 +938,79 @@ function checkallfile() {
|
|||
}
|
||||
}
|
||||
|
||||
// 显示打包下载模态框
|
||||
function showDownloadAllCheckedModel() {
|
||||
$("#downloadFileBox").html("");
|
||||
$("#downloadAllCheckedBox").html("");
|
||||
$("#downloadAllCheckedLoad").text("");
|
||||
var checkedfiles = $(".info").get();
|
||||
if (checkedfiles.length == 0) {
|
||||
$("#downloadFileName")
|
||||
$("#downloadAllCheckedName")
|
||||
.text(
|
||||
"提示:您还未选择任何文件,请先选中一些文件后再执行本操作(您可以通过点击某一文件行来选中/取消选中文件,也可以通过点击列表上的“文件名”一栏来选中/取消选中所有文件)");
|
||||
} else {
|
||||
$("#downloadFileName").text(
|
||||
$("#downloadAllCheckedName").text(
|
||||
"提示:您确认要打包并下载这" + checkedfiles.length + "项么?");
|
||||
$("#downloadFileBox")
|
||||
$("#downloadAllCheckedBox")
|
||||
.html(
|
||||
"<button id='dlmbutton' type='button' class='btn btn-primary' onclick='downloadAllChecked()'>开始下载</button>");
|
||||
$("#dlmbutton").attr('disabled', false);
|
||||
"<button id='dclmbutton' type='button' class='btn btn-primary' onclick='downloadAllChecked()'>开始下载</button>");
|
||||
$("#dclmbutton").attr('disabled', false);
|
||||
}
|
||||
$("#downloadModal").modal('toggle');
|
||||
$("#downloadAllCheckedModal").modal('toggle');
|
||||
}
|
||||
|
||||
// 下载选中的所有文件
|
||||
function downloadAllChecked() {
|
||||
$("#dclmbutton").attr('disabled', true);
|
||||
var checkedfiles = $(".info").get();
|
||||
var downloadIdArray = new Array();
|
||||
for (var i = 0; i < checkedfiles.length; i++) {
|
||||
downloadIdArray[i] = checkedfiles[i].id;
|
||||
}
|
||||
var strIdList = JSON.stringify(downloadIdArray);
|
||||
$("#dlmbutton").attr('disabled', true);
|
||||
$("#downloadFileName").text(
|
||||
"提示:准备开始下载(共" + checkedfiles.length + "项),请稍候...");
|
||||
var t = setTimeout("$('#downloadModal').modal('hide');", 1000);
|
||||
// POST提交全部下载请求
|
||||
var temp = document.createElement("form");
|
||||
temp.action = 'homeController/downloadCheckedFiles.do';
|
||||
temp.method = "post";
|
||||
temp.style.display = "none";
|
||||
var sl = document.createElement("input");
|
||||
sl.name = 'strIdList';
|
||||
sl.value = strIdList;
|
||||
temp.appendChild(sl);
|
||||
document.body.appendChild(temp);
|
||||
temp.submit();
|
||||
$("#downloadAllCheckedName").text(
|
||||
"提示:正在进行压缩(共" + checkedfiles.length + "项),这可能需要一些时间(文件越大时间越长)。压缩完成后自动开始下载");
|
||||
var count = 0;
|
||||
var c = new Array(".", "..", "...","");
|
||||
setInterval(function() {
|
||||
if(count > c.length) {
|
||||
count = 0;
|
||||
}
|
||||
$("#downloadAllCheckedLoad").text(c[count]);
|
||||
count++;
|
||||
}, 500);
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
url : "homeController/downloadCheckedFiles.ajax",
|
||||
data : {
|
||||
strIdList : strIdList
|
||||
},
|
||||
dataType : "text",
|
||||
success : function(result) {
|
||||
if (result == "ERROR") {
|
||||
$("#downloadAllCheckedName")
|
||||
.text("提示:压缩过程出错。无法完成压缩,请重试或告知管理员。");
|
||||
} else {
|
||||
$("#downloadAllCheckedLoad").text("");
|
||||
$("#downloadAllCheckedName").text("提示:压缩完成!准备开始下载...");
|
||||
var t = setTimeout(
|
||||
"$('#downloadAllCheckedModal').modal('hide');", 800);
|
||||
// POST提交全部下载请求
|
||||
var temp = document.createElement("form");
|
||||
temp.action = 'homeController/downloadCheckedFilesZip.do';
|
||||
temp.method = "post";
|
||||
temp.style.display = "none";
|
||||
var sl = document.createElement("input");
|
||||
sl.name = 'zipId';
|
||||
sl.value = result;
|
||||
temp.appendChild(sl);
|
||||
document.body.appendChild(temp);
|
||||
temp.submit();
|
||||
}
|
||||
},
|
||||
error : function() {
|
||||
$("#downloadAllCheckedName").text("提示:请求失败。无法完成压缩,请重试或告知管理员。");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 删除选中的所有文件
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Generated by the Jasper component of Apache Tomcat
|
||||
* Version: Apache Tomcat/9.0.0.M17
|
||||
* Generated at: 2018-03-23 01:20:08 UTC
|
||||
* Generated at: 2018-03-29 08:26:44 UTC
|
||||
* Note: The last modified time of this file was set to
|
||||
* the last modified time of the source file after
|
||||
* generation to assist with modification tracking.
|
||||
|
|
@ -376,7 +376,9 @@ public final class home_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|||
out.write("\t\t\t\t\t</h4>\n");
|
||||
out.write("\t\t\t\t</div>\n");
|
||||
out.write("\t\t\t\t<div class=\"modal-body\">\n");
|
||||
out.write("\t\t\t\t\t<h5>选择文件:<span id=\"selectcount\"></span></h5>\n");
|
||||
out.write("\t\t\t\t\t<h5>\n");
|
||||
out.write("\t\t\t\t\t\t选择文件:<span id=\"selectcount\"></span>\n");
|
||||
out.write("\t\t\t\t\t</h5>\n");
|
||||
out.write("\t\t\t\t\t<input type=\"text\" id=\"filepath\" class=\"form-control\"\n");
|
||||
out.write("\t\t\t\t\t\tonclick=\"checkpath()\" onfocus=\"this.blur()\"\n");
|
||||
out.write("\t\t\t\t\t\tplaceholder=\"请点击选择要上传的文件……\"> <input type=\"file\"\n");
|
||||
|
|
@ -501,11 +503,38 @@ public final class home_jsp extends org.apache.jasper.runtime.HttpJspBase
|
|||
out.write("\t\t</div>\n");
|
||||
out.write("\t</div>\n");
|
||||
out.write("\t");
|
||||
out.write('\n');
|
||||
out.write(' ');
|
||||
out.write("\n");
|
||||
out.write("\t<div class=\"modal fade bs-example-modal-sm\" id=\"downloadAllCheckedModal\"\n");
|
||||
out.write("\t\ttabindex=\"-1\" role=\"dialog\" aria-labelledby=\"downloadAllCheckedModalTitle\">\n");
|
||||
out.write("\t\t<div class=\"modal-dialog modal-sm\" role=\"document\">\n");
|
||||
out.write("\t\t\t<div class=\"modal-content\">\n");
|
||||
out.write("\t\t\t\t<div class=\"modal-header\">\n");
|
||||
out.write("\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\"\n");
|
||||
out.write("\t\t\t\t\t\taria-label=\"Close\">\n");
|
||||
out.write("\t\t\t\t\t\t<span aria-hidden=\"true\">×</span>\n");
|
||||
out.write("\t\t\t\t\t</button>\n");
|
||||
out.write("\t\t\t\t\t<h4 class=\"modal-title\" id=\"downloadAllCheckedModalTitle\">\n");
|
||||
out.write("\t\t\t\t\t\t<span class=\"glyphicon glyphicon-cloud-download\"></span> 打包下载\n");
|
||||
out.write("\t\t\t\t\t</h4>\n");
|
||||
out.write("\t\t\t\t</div>\n");
|
||||
out.write("\t\t\t\t<div class=\"modal-body\">\n");
|
||||
out.write("\t\t\t\t\t<h5><span id=\"downloadAllCheckedName\"></span><span id=\"downloadAllCheckedLoad\" style=\"text-align: center;\"></span></h5>\n");
|
||||
out.write("\t\t\t\t</div>\n");
|
||||
out.write("\t\t\t\t<div class=\"modal-footer\">\n");
|
||||
out.write("\t\t\t\t\t<button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">取消</button>\n");
|
||||
out.write("\t\t\t\t\t<span id=\"downloadAllCheckedBox\"></span>\n");
|
||||
out.write("\t\t\t\t</div>\n");
|
||||
out.write("\t\t\t</div>\n");
|
||||
out.write("\t\t</div>\n");
|
||||
out.write("\t</div>\n");
|
||||
out.write("\t");
|
||||
out.write("\n");
|
||||
out.write("</body>\n");
|
||||
out.write("<script type=\"text/javascript\" src=\"js/jquery-3.3.1.min.js\"></script>\n");
|
||||
out.write("<script type=\"text/javascript\" src=\"js/bootstrap.min.js\"></script>\n");
|
||||
out.write("<script type=\"text/javascript\" src=\"js/home.min.js\"></script>\n");
|
||||
out.write("<script type=\"text/javascript\" src=\"js/home.js\"></script>\n");
|
||||
out.write("</html>");
|
||||
} catch (java.lang.Throwable t) {
|
||||
if (!(t instanceof javax.servlet.jsp.SkipPageException)){
|
||||
|
|
|
|||
Loading…
Reference in New Issue