mirror of https://gitee.com/zhang_1334717033/kiftd
Compare commits
9 Commits
v1.0.30-re
...
master
| Author | SHA1 | Date |
|---|---|---|
|
|
dbb335ca09 | |
|
|
eaf74ae6c5 | |
|
|
2a81d74a51 | |
|
|
7e44880f93 | |
|
|
79e6f2a434 | |
|
|
9d104a2de9 | |
|
|
317b6bb50a | |
|
|
ea59059f33 | |
|
|
5c19709a2d |
|
|
@ -77,10 +77,10 @@ _注:kift为该功能的开发名称,其实际成果命名为kiftd。_
|
||||||
|
|
||||||
> 提示:当您更新版本后,请手动清除浏览器的缓存,之后刷新网盘主页以确保数据文件保持最新!否则可能导致新版页面功能无法使用。
|
> 提示:当您更新版本后,请手动清除浏览器的缓存,之后刷新网盘主页以确保数据文件保持最新!否则可能导致新版页面功能无法使用。
|
||||||
|
|
||||||
### 常规更新v1.0.30
|
### 常规更新v1.0.35
|
||||||
_本次更新为维护性的更新,修复一些已经发现的问题并优化使用体验,推荐所有用户升级。_
|
_本次更新为维护性的更新,修复一些已经发现的问题并优化使用体验,推荐所有用户升级。_
|
||||||
+ 修复了“自由注册新账户”和“用户修改账户密码”功能中存在的一个安全性漏洞。
|
+ 修复了当用户执行批量上传操作时,中途切换所在的文件夹可能会导致上传路径发生改变的问题。
|
||||||
+ 进一步完善了服务器配置文件的效验机制。
|
+ 升级了内置的MySQL数据库驱动的版本。
|
||||||
|
|
||||||
|
|
||||||
> 需要查看更多版本历史信息?请访问: https://kohgylw.gitee.io/News.html
|
> 需要查看更多版本历史信息?请访问: https://kohgylw.gitee.io/News.html
|
||||||
|
|
|
||||||
Binary file not shown.
BIN
kiftd说明文档.pdf
BIN
kiftd说明文档.pdf
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,5 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<!-- 青阳网络文件传输系统 kiftd v1.0.30-RELEASE -->
|
<!-- 青阳网络文件传输系统 kiftd v1.0.35-RELEASE -->
|
||||||
<!-- 欢迎访问主界面 -->
|
<!-- 欢迎访问主界面 -->
|
||||||
<!-- by 青阳龙野(kohgylw@163.com) -->
|
<!-- by 青阳龙野(kohgylw@163.com) -->
|
||||||
<html>
|
<html>
|
||||||
|
|
@ -101,32 +101,34 @@
|
||||||
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="uploadFileButtonLi"><a href="javascript:void(0);">上传文件 <span
|
<li id="uploadFileButtonLi"><a
|
||||||
class="pull-right"><span
|
href="javascript:void(0);">上传文件 <span class="pull-right"><span
|
||||||
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+U</span></a></li>
|
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+U</span></a></li>
|
||||||
<li id="uploadFolderButtonLi"><a href="javascript:void(0);">上传文件夹 <span
|
<li id="uploadFolderButtonLi"><a
|
||||||
|
href="javascript:void(0);">上传文件夹 <span
|
||||||
class="pull-right"><span
|
class="pull-right"><span
|
||||||
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+F</span></a></li>
|
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+F</span></a></li>
|
||||||
<li role="separator" class="divider"></li>
|
<li role="separator" class="divider"></li>
|
||||||
<li id="createFolderButtonLi"><a href="javascript:void(0);">新建文件夹 <span
|
<li id="createFolderButtonLi"><a
|
||||||
|
href="javascript:void(0);">新建文件夹 <span
|
||||||
class="pull-right"><span
|
class="pull-right"><span
|
||||||
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+N</span></a></li>
|
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="copyFileButtonLi"><a href="javascript:void(0);"><span id='copySignTx'>复制
|
<li id="copyFileButtonLi"><a href="javascript:void(0);"><span
|
||||||
<span class="pull-right"><span
|
id='copySignTx'>复制 <span class="pull-right"><span
|
||||||
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+C</span>
|
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+C</span>
|
||||||
</span></a></li>
|
</span></a></li>
|
||||||
<li id="cutFileButtonLi"><a href="javascript:void(0);"><span id='cutSignTx'>剪切
|
<li id="cutFileButtonLi"><a href="javascript:void(0);"><span
|
||||||
<span class="pull-right"><span
|
id='cutSignTx'>剪切 <span class="pull-right"><span
|
||||||
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+X</span>
|
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+X</span>
|
||||||
</span></a></li>
|
</span></a></li>
|
||||||
<li id="stickFileButtonLi" class="hidden"><a href="javascript:void(0);"><span
|
<li id="stickFileButtonLi" class="hidden"><a
|
||||||
id='stickSignTx'>粘贴<span id="stickFilesCount"></span>
|
href="javascript:void(0);"><span id='stickSignTx'>粘贴<span
|
||||||
<span class="pull-right"><span
|
id="stickFilesCount"></span> <span class="pull-right"><span
|
||||||
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+V</span>
|
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+V</span>
|
||||||
</span></a></li>
|
</span></a></li>
|
||||||
<li id="deleteSeelectFileButtonLi"><a href="javascript:void(0);">删除 <span
|
<li id="deleteSeelectFileButtonLi"><a
|
||||||
class="pull-right"><span
|
href="javascript:void(0);">删除 <span class="pull-right"><span
|
||||||
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+D</span></a></li>
|
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+D</span></a></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -293,7 +295,8 @@
|
||||||
<h5 id="deleteFolderMessage"></h5>
|
<h5 id="deleteFolderMessage"></h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button id="cancelDeleteFolderBtn" type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
<button id="cancelDeleteFolderBtn" type="button"
|
||||||
|
class="btn btn-default" data-dismiss="modal">取消</button>
|
||||||
<span id="deleteFolderBox"></span>
|
<span id="deleteFolderBox"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -545,7 +548,8 @@
|
||||||
<h5 id="deleteFileMessage" class="wordbreak"></h5>
|
<h5 id="deleteFileMessage" class="wordbreak"></h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button id="cancelDeleteFileBox" type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
<button id="cancelDeleteFileBox" type="button"
|
||||||
|
class="btn btn-default" data-dismiss="modal">取消</button>
|
||||||
<span id="deleteFileBox"></span>
|
<span id="deleteFileBox"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -609,7 +613,8 @@
|
||||||
</h5>
|
</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button id="cancelDownloadAllCheckedBtn" type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
<button id="cancelDownloadAllCheckedBtn" type="button"
|
||||||
|
class="btn btn-default" data-dismiss="modal">取消</button>
|
||||||
<span id="downloadAllCheckedBox"></span>
|
<span id="downloadAllCheckedBox"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -698,7 +703,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button id="cancelMoveFilesBtn" type="button" class="btn btn-default" data-dismiss="modal">取消</button>
|
<button id="cancelMoveFilesBtn" type="button"
|
||||||
|
class="btn btn-default" data-dismiss="modal">取消</button>
|
||||||
<span id="moveFilesBox"></span>
|
<span id="moveFilesBox"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ var constraintLevel;// 当前文件夹限制等级
|
||||||
var account;// 用户账户
|
var account;// 用户账户
|
||||||
var isUpLoading = false;// 是否正在执行上传操作
|
var isUpLoading = false;// 是否正在执行上传操作
|
||||||
var isImporting = false;// 是否正在执行上传文件夹操作
|
var isImporting = false;// 是否正在执行上传文件夹操作
|
||||||
|
var uploadTargetFolder;// 执行上传操作时的目标文件夹(单独保存以避免用户切换文件夹)
|
||||||
var isChangingPassword = false;// 是否正在执行修改密码操作
|
var isChangingPassword = false;// 是否正在执行修改密码操作
|
||||||
var importFolderName;// 上传文件夹时保存文件夹名称
|
var importFolderName;// 上传文件夹时保存文件夹名称
|
||||||
var xhr;// 文件或文件夹上传请求对象
|
var xhr;// 文件或文件夹上传请求对象
|
||||||
|
|
@ -988,8 +989,7 @@ function showFolderTable(folderView) {
|
||||||
|
|
||||||
// 根据一个文件对象生成对应的文件行的HTML内容
|
// 根据一个文件对象生成对应的文件行的HTML内容
|
||||||
function createFileRow(fi, aL, aD, aR, aO) {
|
function createFileRow(fi, aL, aD, aR, aO) {
|
||||||
fi.fileName = fi.fileName.replace(/\'/g, ''').replace(/</g, '<')
|
fi.fileName = html2Escape(fi.fileName);
|
||||||
.replace(/>/g, '>');
|
|
||||||
var fileRow = "<tr id=" + fi.fileId + " onclick='checkfile(event," + '"'
|
var fileRow = "<tr id=" + fi.fileId + " onclick='checkfile(event," + '"'
|
||||||
+ fi.fileId + '"' + ")' ondblclick='checkConsFile(event," + '"'
|
+ fi.fileId + '"' + ")' ondblclick='checkConsFile(event," + '"'
|
||||||
+ fi.fileId + '"' + ")' id='" + fi.fileId
|
+ fi.fileId + '"' + ")' id='" + fi.fileId
|
||||||
|
|
@ -1007,7 +1007,7 @@ function createFileRow(fi, aL, aD, aR, aO) {
|
||||||
+ '"'
|
+ '"'
|
||||||
+ fi.fileId
|
+ fi.fileId
|
||||||
+ '","'
|
+ '","'
|
||||||
+ fi.fileName
|
+ replaceAllQuotationMarks(fi.fileName)
|
||||||
+ '"'
|
+ '"'
|
||||||
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-cloud-download'></span> 下载</button>";
|
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-cloud-download'></span> 下载</button>";
|
||||||
// 对于各种特殊格式文件提供的预览和播放功能
|
// 对于各种特殊格式文件提供的预览和播放功能
|
||||||
|
|
@ -1101,7 +1101,7 @@ function createFileRow(fi, aL, aD, aR, aO) {
|
||||||
+ '"'
|
+ '"'
|
||||||
+ fi.fileId
|
+ fi.fileId
|
||||||
+ '","'
|
+ '","'
|
||||||
+ fi.fileName
|
+ replaceAllQuotationMarks(fi.fileName)
|
||||||
+ '"'
|
+ '"'
|
||||||
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-remove'></span> 删除</button>";
|
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-remove'></span> 删除</button>";
|
||||||
}
|
}
|
||||||
|
|
@ -1113,7 +1113,7 @@ function createFileRow(fi, aL, aD, aR, aO) {
|
||||||
+ '"'
|
+ '"'
|
||||||
+ ","
|
+ ","
|
||||||
+ '"'
|
+ '"'
|
||||||
+ fi.fileName
|
+ replaceAllQuotationMarks(fi.fileName)
|
||||||
+ '"'
|
+ '"'
|
||||||
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-wrench'></span> 重命名</button>";
|
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-wrench'></span> 重命名</button>";
|
||||||
}
|
}
|
||||||
|
|
@ -1133,7 +1133,7 @@ function createFileRow(fi, aL, aD, aR, aO) {
|
||||||
+ '"'
|
+ '"'
|
||||||
+ fi.fileId
|
+ fi.fileId
|
||||||
+ '","'
|
+ '","'
|
||||||
+ fi.fileName
|
+ replaceAllQuotationMarks(fi.fileName)
|
||||||
+ '"'
|
+ '"'
|
||||||
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-link'></span> 链接</button>";
|
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-link'></span> 链接</button>";
|
||||||
}
|
}
|
||||||
|
|
@ -1146,8 +1146,7 @@ function createFileRow(fi, aL, aD, aR, aO) {
|
||||||
|
|
||||||
// 根据一个文件夹对象生成对应的文件行的HTML内容
|
// 根据一个文件夹对象生成对应的文件行的HTML内容
|
||||||
function createNewFolderRow(f, aD, aR, aO) {
|
function createNewFolderRow(f, aD, aR, aO) {
|
||||||
f.folderName = f.folderName.replace(/\'/g, ''').replace(/</g, '<')
|
f.folderName = html2Escape(f.folderName);
|
||||||
.replace(/>/g, '>');
|
|
||||||
var folderRow = "<tr id='"
|
var folderRow = "<tr id='"
|
||||||
+ f.folderId
|
+ f.folderId
|
||||||
+ "' onclick='checkfile(event,"
|
+ "' onclick='checkfile(event,"
|
||||||
|
|
@ -1169,7 +1168,7 @@ function createNewFolderRow(f, aD, aR, aO) {
|
||||||
+ '"'
|
+ '"'
|
||||||
+ f.folderId
|
+ f.folderId
|
||||||
+ '","'
|
+ '","'
|
||||||
+ f.folderName
|
+ replaceAllQuotationMarks(f.folderName)
|
||||||
+ '"'
|
+ '"'
|
||||||
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-remove'></span> 删除</button>";
|
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-remove'></span> 删除</button>";
|
||||||
}
|
}
|
||||||
|
|
@ -1179,7 +1178,7 @@ function createNewFolderRow(f, aD, aR, aO) {
|
||||||
+ '"'
|
+ '"'
|
||||||
+ f.folderId
|
+ f.folderId
|
||||||
+ '","'
|
+ '","'
|
||||||
+ f.folderName
|
+ replaceAllQuotationMarks(f.folderName)
|
||||||
+ '",'
|
+ '",'
|
||||||
+ f.folderConstraint
|
+ f.folderConstraint
|
||||||
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-wrench'></span> 编辑</button>";
|
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-wrench'></span> 编辑</button>";
|
||||||
|
|
@ -1484,20 +1483,21 @@ function checkUploadFile() {
|
||||||
var maxSize = 0;
|
var maxSize = 0;
|
||||||
var maxFileIndex = 0;
|
var maxFileIndex = 0;
|
||||||
for (var i = 0; i < fs.length; i++) {
|
for (var i = 0; i < fs.length; i++) {
|
||||||
filenames[i] = fs[i].name.replace(/^.+?\\([^\\]+?)?$/gi, "$1");
|
filenames[i] = fs[i].name;
|
||||||
if (fs[i].size > maxSize) {
|
if (fs[i].size > maxSize) {
|
||||||
maxSize = fs[i].size;
|
maxSize = fs[i].size;
|
||||||
maxFileIndex = i;
|
maxFileIndex = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var namelist = JSON.stringify(filenames);
|
var namelist = JSON.stringify(filenames);
|
||||||
|
uploadTargetFolder = locationpath;// 记录上传目标
|
||||||
|
|
||||||
$
|
$
|
||||||
.ajax({
|
.ajax({
|
||||||
type : "POST",
|
type : "POST",
|
||||||
dataType : "text",
|
dataType : "text",
|
||||||
data : {
|
data : {
|
||||||
folderId : locationpath,
|
folderId : uploadTargetFolder,
|
||||||
namelist : namelist,
|
namelist : namelist,
|
||||||
maxSize : maxSize,
|
maxSize : maxSize,
|
||||||
maxFileIndex : maxFileIndex
|
maxFileIndex : maxFileIndex
|
||||||
|
|
@ -1600,14 +1600,14 @@ function doupload(count) {
|
||||||
$("#filecount").text("(" + count + "/" + fcount + ")");// 显示当前进度
|
$("#filecount").text("(" + count + "/" + fcount + ")");// 显示当前进度
|
||||||
}
|
}
|
||||||
$("#uploadstatus").prepend(
|
$("#uploadstatus").prepend(
|
||||||
"<p>" + fname + "<span id='uls_" + count
|
"<p>" + html2Escape(fname) + "<span id='uls_" + count
|
||||||
+ "'>[正在上传...]</span></p>");
|
+ "'>[正在上传...]</span></p>");
|
||||||
xhr = new XMLHttpRequest();// 这东西类似于servlet里面的request
|
xhr = new XMLHttpRequest();// 这东西类似于servlet里面的request
|
||||||
|
|
||||||
var fd = new FormData();// 用于封装文件数据的对象
|
var fd = new FormData();// 用于封装文件数据的对象
|
||||||
|
|
||||||
fd.append("file", uploadfile);// 将文件对象添加到FormData对象中,字段名为uploadfile
|
fd.append("file", uploadfile);// 将文件对象添加到FormData对象中,字段名为uploadfile
|
||||||
fd.append("folderId", locationpath);
|
fd.append("fname", fname);
|
||||||
|
fd.append("folderId", uploadTargetFolder);
|
||||||
if (repeModelList != null && repeModelList[fname] != null) {
|
if (repeModelList != null && repeModelList[fname] != null) {
|
||||||
if (repeModelList[fname] == 'skip') {
|
if (repeModelList[fname] == 'skip') {
|
||||||
$("#uls_" + count).text("[已完成]");
|
$("#uls_" + count).text("[已完成]");
|
||||||
|
|
@ -1968,7 +1968,8 @@ function createViewList() {
|
||||||
for (var i = 0; i < pvl.pictureViewList.length; i++) {
|
for (var i = 0; i < pvl.pictureViewList.length; i++) {
|
||||||
$(images).append(
|
$(images).append(
|
||||||
"<li><img src='" + pvl.pictureViewList[i].url + "' alt='"
|
"<li><img src='" + pvl.pictureViewList[i].url + "' alt='"
|
||||||
+ pvl.pictureViewList[i].fileName + "' /></li>");
|
+ html2Escape(pvl.pictureViewList[i].fileName)
|
||||||
|
+ "' /></li>");
|
||||||
}
|
}
|
||||||
viewer = $(images);
|
viewer = $(images);
|
||||||
viewer.viewer({
|
viewer.viewer({
|
||||||
|
|
@ -1995,11 +1996,13 @@ function createViewListByPage() {
|
||||||
for (var i = 0; i < viewerPageSize
|
for (var i = 0; i < viewerPageSize
|
||||||
&& i < (pvl.pictureViewList.length - (viewerPageIndex - 1)
|
&& i < (pvl.pictureViewList.length - (viewerPageIndex - 1)
|
||||||
* viewerPageSize); i++) {
|
* viewerPageSize); i++) {
|
||||||
$(images).append(
|
$(images)
|
||||||
"<li><img src='" + pvl.pictureViewList[startIndex + i].url
|
.append(
|
||||||
+ "' alt='"
|
"<li><img src='"
|
||||||
+ pvl.pictureViewList[startIndex + i].fileName
|
+ pvl.pictureViewList[startIndex + i].url
|
||||||
+ "' /></li>");
|
+ "' alt='"
|
||||||
|
+ html2Escape(pvl.pictureViewList[startIndex
|
||||||
|
+ i].fileName) + "' /></li>");
|
||||||
}
|
}
|
||||||
if (viewerPageIndex < viewerTotal) {
|
if (viewerPageIndex < viewerTotal) {
|
||||||
$(images).append("<li><img src='css/right.png' alt='下一页' /></li>");
|
$(images).append("<li><img src='css/right.png' alt='下一页' /></li>");
|
||||||
|
|
@ -3009,7 +3012,7 @@ function getDownloadURL() {
|
||||||
+ window.location.host
|
+ window.location.host
|
||||||
+ "/externalLinksController/downloadFileByKey/"
|
+ "/externalLinksController/downloadFileByKey/"
|
||||||
+ encodeURIComponent(getDownloadFileName.replace(
|
+ encodeURIComponent(getDownloadFileName.replace(
|
||||||
/\'/g, '')) + "?dkey=" + result;
|
/\\/g, "_")) + "?dkey=" + result;
|
||||||
// 显示链接内容
|
// 显示链接内容
|
||||||
$("#downloadHrefBox").html(
|
$("#downloadHrefBox").html(
|
||||||
"<a href='" + dlurl + "'>" + dlurl + "</a>");
|
"<a href='" + dlurl + "'>" + dlurl + "</a>");
|
||||||
|
|
@ -3125,6 +3128,7 @@ function checkImportFolder() {
|
||||||
maxFileIndex = i;
|
maxFileIndex = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
uploadTargetFolder = locationpath;// 记录上传目标
|
||||||
// 发送合法性检查请求
|
// 发送合法性检查请求
|
||||||
$
|
$
|
||||||
.ajax({
|
.ajax({
|
||||||
|
|
@ -3134,7 +3138,7 @@ function checkImportFolder() {
|
||||||
data : {
|
data : {
|
||||||
folderName : importFolderName,
|
folderName : importFolderName,
|
||||||
maxSize : maxSize,
|
maxSize : maxSize,
|
||||||
folderId : locationpath
|
folderId : uploadTargetFolder
|
||||||
},
|
},
|
||||||
success : function(result) {
|
success : function(result) {
|
||||||
var resJson = eval("(" + result + ")");
|
var resJson = eval("(" + result + ")");
|
||||||
|
|
@ -3215,7 +3219,7 @@ function importAndCover() {
|
||||||
url : 'homeController/deleteFolderByName.ajax',
|
url : 'homeController/deleteFolderByName.ajax',
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
data : {
|
data : {
|
||||||
parentId : locationpath,
|
parentId : uploadTargetFolder,
|
||||||
folderName : importFolderName
|
folderName : importFolderName
|
||||||
},
|
},
|
||||||
dataType : 'text',
|
dataType : 'text',
|
||||||
|
|
@ -3241,7 +3245,7 @@ function importAndBoth() {
|
||||||
url : 'homeController/createNewFolderByName.ajax',
|
url : 'homeController/createNewFolderByName.ajax',
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
data : {
|
data : {
|
||||||
parentId : locationpath,
|
parentId : uploadTargetFolder,
|
||||||
folderName : importFolderName,
|
folderName : importFolderName,
|
||||||
folderConstraint : fc
|
folderConstraint : fc
|
||||||
},
|
},
|
||||||
|
|
@ -3274,16 +3278,15 @@ function iteratorImport(i, newFolderName) {
|
||||||
if (fcount > 1) {
|
if (fcount > 1) {
|
||||||
$("#importcount").text("(" + (i + 1) + "/" + fcount + ")");// 显示当前进度
|
$("#importcount").text("(" + (i + 1) + "/" + fcount + ")");// 显示当前进度
|
||||||
}
|
}
|
||||||
$("#importstatus")
|
$("#importstatus").prepend(
|
||||||
.prepend(
|
"<p>" + html2Escape(fname) + "<span id='ils_" + i
|
||||||
"<p>" + fname + "<span id='ils_" + i
|
+ "'>[正在上传...]</span></p>");
|
||||||
+ "'>[正在上传...]</span></p>");
|
|
||||||
xhr = new XMLHttpRequest();// 这东西类似于servlet里面的request
|
xhr = new XMLHttpRequest();// 这东西类似于servlet里面的request
|
||||||
|
|
||||||
var fd = new FormData();// 用于封装文件数据的对象
|
var fd = new FormData();// 用于封装文件数据的对象
|
||||||
|
|
||||||
fd.append("file", uploadfile);// 将文件对象添加到FormData对象中,字段名为uploadfile
|
fd.append("file", uploadfile);// 将文件对象添加到FormData对象中,字段名为uploadfile
|
||||||
fd.append("folderId", locationpath);
|
fd.append("folderId", uploadTargetFolder);
|
||||||
fd.append("folderConstraint", fc);
|
fd.append("folderConstraint", fc);
|
||||||
fd.append("originalFileName", fname);
|
fd.append("originalFileName", fname);
|
||||||
if (!!newFolderName) {
|
if (!!newFolderName) {
|
||||||
|
|
@ -3481,9 +3484,6 @@ function sendChangePasswordInfo(encrypted) {
|
||||||
case "invalidnewpwd":
|
case "invalidnewpwd":
|
||||||
showChangePasswordAlert("提示:密码修改失败,新密码不合法。新密码的长度需为3-32个字符,且仅支持ISO-8859-1中的字符(推荐使用英文字母、英文符号及阿拉伯数字)。");
|
showChangePasswordAlert("提示:密码修改失败,新密码不合法。新密码的长度需为3-32个字符,且仅支持ISO-8859-1中的字符(推荐使用英文字母、英文符号及阿拉伯数字)。");
|
||||||
break;
|
break;
|
||||||
case "hasescapes":
|
|
||||||
showChangePasswordAlert("提示:密码修改失败,新密码不合法。密码中不得包含“\\”。");
|
|
||||||
break;
|
|
||||||
case "error":
|
case "error":
|
||||||
showChangePasswordAlert("提示:密码修改失败,修改请求无法通过加密效验(可能是请求耗时过长导致的)");
|
showChangePasswordAlert("提示:密码修改失败,修改请求无法通过加密效验(可能是请求耗时过长导致的)");
|
||||||
break;
|
break;
|
||||||
|
|
@ -3538,13 +3538,13 @@ function getFileChain(fileId, fileName) {
|
||||||
window.location.href = "prv/login.html";
|
window.location.href = "prv/login.html";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
var getChainFileName = fileName.replace("#", "%23").replace(
|
|
||||||
"%", "%25").replace("?", "%3F");
|
|
||||||
$("#fileChainTextarea").text(
|
$("#fileChainTextarea").text(
|
||||||
encodeURI(window.location.protocol + "//"
|
window.location.protocol
|
||||||
|
+ "//"
|
||||||
+ window.location.host
|
+ window.location.host
|
||||||
+ "/externalLinksController/chain/"
|
+ "/externalLinksController/chain/"
|
||||||
+ getChainFileName + "?ckey=")
|
+ encodeURIComponent(fileName.replace(/\\/g,
|
||||||
|
"_")) + "?ckey="
|
||||||
+ encodeURIComponent(result));
|
+ encodeURIComponent(result));
|
||||||
$("#copyChainBtn").attr('disabled', false);
|
$("#copyChainBtn").attr('disabled', false);
|
||||||
break;
|
break;
|
||||||
|
|
@ -3817,3 +3817,20 @@ function updateTheFolderInfo() {
|
||||||
"共包含 " + folderView.folderList.length + " 个文件夹, "
|
"共包含 " + folderView.folderList.length + " 个文件夹, "
|
||||||
+ folderView.fileList.length + " 个文件。");
|
+ folderView.fileList.length + " 个文件。");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 替换所有引号,将其进一步转义,主要用于传递带引号的文件名
|
||||||
|
function replaceAllQuotationMarks(txt) {
|
||||||
|
return txt.replace(/\\/g, "\\\\").replace(/\"/g, "\\\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 对所有可能进入html的字符串进行转义操作
|
||||||
|
function html2Escape(sHtml) {
|
||||||
|
return sHtml.replace(/[<>&\']/g, function(c) {
|
||||||
|
return {
|
||||||
|
'<' : '<',
|
||||||
|
'>' : '>',
|
||||||
|
'&' : '&',
|
||||||
|
'\'' : '''
|
||||||
|
}[c];
|
||||||
|
});
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -122,9 +122,6 @@ function sendSignUpInfo(encrypted){
|
||||||
case "error":
|
case "error":
|
||||||
showAlert("提示:注册失败,注册请求无法通过加密效验(可能是请求耗时过长导致的)");
|
showAlert("提示:注册失败,注册请求无法通过加密效验(可能是请求耗时过长导致的)");
|
||||||
break;
|
break;
|
||||||
case "hasescapes":
|
|
||||||
showAlert("提示:注册失败,账户名或密码中不得包含“\\”。");
|
|
||||||
break;
|
|
||||||
case "cannotsignup":
|
case "cannotsignup":
|
||||||
showAlert("提示:注册失败,发生意外错误,请稍后重试或联系管理员");
|
showAlert("提示:注册失败,发生意外错误,请稍后重试或联系管理员");
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -21,9 +21,7 @@ $(function() {
|
||||||
success : function(result) {
|
success : function(result) {
|
||||||
if (result != "ERROR") {
|
if (result != "ERROR") {
|
||||||
f = eval("(" + result + ")");
|
f = eval("(" + result + ")");
|
||||||
$("#vname").text(
|
$("#vname").text(f.fileName);
|
||||||
f.fileName.replace('\'', ''').replace('<',
|
|
||||||
'<').replace('>', '>'));
|
|
||||||
$("#vcreator").text(f.fileCreator);
|
$("#vcreator").text(f.fileCreator);
|
||||||
$("#vcdate").text(f.fileCreationDate);
|
$("#vcdate").text(f.fileCreationDate);
|
||||||
$("#vsize").text(f.fileSize);
|
$("#vsize").text(f.fileSize);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
function getFileId(){var b,a=location.search;return-1!=a.indexOf("?")?(b=a.substr(1),strs=b.split("="),strs[1]):""}function playVideo(){$("#playerbox").html("<video id='kiftplayer' class='video-js col-md-12' controls preload='auto' height='500'><source src='resourceController/getResource/"+f.fileId+"' type='video/mp4'></video>");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("<h2>播放器正在努力解码中...</h2><h3>已完成:<span id='transcodeProgress'>0</span>%</h3><p class='text-muted'>提示:该视频需解码后播放,请耐心等待!</p>"),doTranscode())):(alert("错误:无法定位要预览的文件或该操作未被授权。"),reMainPage())},error:function(){alert("错误:请求失败,请刷新重试。"),reMainPage()}})});
|
function getFileId(){var b,a=location.search;return-1!=a.indexOf("?")?(b=a.substr(1),strs=b.split("="),strs[1]):""}function playVideo(){$("#playerbox").html("<video id='kiftplayer' class='video-js col-md-12' controls preload='auto' height='500'><source src='resourceController/getResource/"+f.fileId+"' type='video/mp4'></video>");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),$("#vcreator").text(f.fileCreator),$("#vcdate").text(f.fileCreationDate),$("#vsize").text(f.fileSize),"N"==f.needEncode?playVideo():($("#playerMassage").html("<h2>播放器正在努力解码中...</h2><h3>已完成:<span id='transcodeProgress'>0</span>%</h3><p class='text-muted'>提示:该视频需解码后播放,请耐心等待!</p>"),doTranscode())):(alert("错误:无法定位要预览的文件或该操作未被授权。"),reMainPage())},error:function(){alert("错误:请求失败,请刷新重试。"),reMainPage()}})});
|
||||||
Loading…
Reference in New Issue