mirror of
https://github.com/KOHGYLW/kiftd-source.git
synced 2025-01-09 04:27:56 +08:00
update to v1.0.27 优化了普通排序的操作效果
This commit is contained in:
parent
a594f4ab2c
commit
69f5b60cb3
2
TODO.txt
2
TODO.txt
@ -101,10 +101,10 @@ test.auth.xxx=ucd
|
||||
【计划中】优化视频在线转码机制,增加ffmpeg引擎判断平台是否可用功能、强制关闭在线转码功能、替换ffmpeg版本功能。
|
||||
【计划中】增加下载限速功能,允许设置全局下载速度限制或者某特定账户的下载速度限制。
|
||||
【计划中】优化文件夹视图加载机制,当打开文件数目超过1000个的文件夹时分段加载以提供更好的访问体验。
|
||||
【已完成】为本地(普通)排序功能添加了等待动画效果,在排序量较大、耗时较长时能够为用户带来更好的使用体验。
|
||||
【已完成】重构了文件系统的扩展存储区存储机制,使得扩展存储区能够更加合理地分摊文件系统存储压力。现在,用户可以通过添加扩展存储区的方法来避免
|
||||
“因单一存储路径下存储过多的文件块而导致系统读取性能下降”或是“因单一文件夹内存放的文件块数量超过本地文件系统允许的最大值而无法继续存入”的问题了。
|
||||
【已完成】系统允许设置扩展存储区的最大数量提高至255个。
|
||||
【计划中】为普通排序添加了等待效果,从而在排序耗时较长时为用户带来更好的操作体验。
|
||||
【已完成】修正了“移动”操作在日志中操作路径信息记录“NEW PATH”一项记录不正确的问题。
|
||||
【已完成】优化了图片预览机制:解决了体积超过2 MB的gif图片在预览时无法正常播放的问题。
|
||||
【已完成】进一步完善说明文档:1,增加关于更换页面背景图片的介绍;2,增加关于如何修改页面标题的介绍。
|
||||
|
@ -1,5 +1,5 @@
|
||||
#Generated by Maven Integration for Eclipse
|
||||
#Sat Nov 23 12:01:10 CST 2019
|
||||
#Sun Nov 24 11:18:53 CST 2019
|
||||
version=1.0.27-SNAPSHOT
|
||||
groupId=kohgylw
|
||||
m2e.projectName=kiftd
|
||||
|
@ -135,7 +135,8 @@
|
||||
aria-hidden="true" style="float: right"></span></th>
|
||||
<th class="hiddenColumn" onclick="sortbycn()">创建者<span
|
||||
id="sortByCN" aria-hidden="true" style="float: right"></span></th>
|
||||
<th onclick="showOriginFolderView()">操作</th>
|
||||
<th onclick="showOriginFolderView()">操作<span id="sortByOR"
|
||||
aria-hidden="true" style="float: right"></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="foldertable"></tbody>
|
||||
@ -797,10 +798,12 @@
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea id="fileChainTextarea" class="form-control" rows="3" readonly></textarea>
|
||||
<textarea id="fileChainTextarea" class="form-control" rows="3"
|
||||
readonly></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="copyChainBtn" type="button" class="btn btn-info" onclick="copyFileChain()">复制链接</button>
|
||||
<button id="copyChainBtn" type="button" class="btn btn-info"
|
||||
onclick="copyFileChain()">复制链接</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -827,5 +830,5 @@
|
||||
<!-- 音乐播放器 -->
|
||||
<script type="text/javascript" src="js/APlayer.min.js"></script>
|
||||
<!-- 页面操作定义 -->
|
||||
<script type="text/javascript" src="js/home.min.js"></script>
|
||||
<script type="text/javascript" src="js/home.js"></script>
|
||||
</html>
|
@ -2113,20 +2113,26 @@ function sortbyfn(){
|
||||
$("#sortByCN").removeClass();
|
||||
var order=1;
|
||||
if($("#sortByFN").hasClass('glyphicon-triangle-bottom')){
|
||||
$("#sortByFN").removeClass();
|
||||
$("#sortByFN").addClass("glyphicon glyphicon-triangle-top");
|
||||
order=-1;
|
||||
}else{
|
||||
$("#sortByFN").removeClass();
|
||||
$("#sortByFN").addClass("glyphicon glyphicon-triangle-bottom");
|
||||
}
|
||||
folderView.fileList.sort(function(v1,v2){
|
||||
return order * v2.fileName.localeCompare(v1.fileName,"zh");
|
||||
});
|
||||
folderView.folderList.sort(function(v1,v2){
|
||||
return order * v2.folderName.localeCompare(v1.folderName,"zh");
|
||||
});
|
||||
showFolderTable(folderView);
|
||||
$("#sortByFN").removeClass();
|
||||
$("#sortByFN").addClass("glyphicon glyphicon-hourglass");
|
||||
// 另开一个计时器进行排序操作,避免因卡死导致加载动画无法显示
|
||||
setTimeout(function(){
|
||||
folderView.fileList.sort(function(v1,v2){
|
||||
return order * v2.fileName.localeCompare(v1.fileName,"zh");
|
||||
});
|
||||
folderView.folderList.sort(function(v1,v2){
|
||||
return order * v2.folderName.localeCompare(v1.folderName,"zh");
|
||||
});
|
||||
showFolderTable(folderView);
|
||||
$("#sortByFN").removeClass();
|
||||
if(order == -1){
|
||||
$("#sortByFN").addClass("glyphicon glyphicon-triangle-top");
|
||||
}else{
|
||||
$("#sortByFN").addClass("glyphicon glyphicon-triangle-bottom");
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// 按创建日期排序
|
||||
@ -2136,26 +2142,31 @@ function sortbycd(){
|
||||
$("#sortByCN").removeClass();
|
||||
var order=1;
|
||||
if($("#sortByCD").hasClass('glyphicon-triangle-bottom')){
|
||||
$("#sortByCD").removeClass();
|
||||
$("#sortByCD").addClass("glyphicon glyphicon-triangle-top");
|
||||
order=-1;
|
||||
}else{
|
||||
$("#sortByCD").removeClass();
|
||||
$("#sortByCD").addClass("glyphicon glyphicon-triangle-bottom");
|
||||
}
|
||||
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 order * 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 order * res;
|
||||
});
|
||||
showFolderTable(folderView);
|
||||
$("#sortByCD").removeClass();
|
||||
$("#sortByCD").addClass("glyphicon glyphicon-hourglass");
|
||||
setTimeout(function(){
|
||||
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 order * 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 order * res;
|
||||
});
|
||||
showFolderTable(folderView);
|
||||
$("#sortByCD").removeClass();
|
||||
if(order == -1){
|
||||
$("#sortByCD").addClass("glyphicon glyphicon-triangle-top");
|
||||
}else{
|
||||
$("#sortByCD").addClass("glyphicon glyphicon-triangle-bottom");
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// 按文件大小排序
|
||||
@ -2163,21 +2174,24 @@ function sortbyfs(){
|
||||
$("#sortByFN").removeClass();
|
||||
$("#sortByCD").removeClass();
|
||||
$("#sortByCN").removeClass();
|
||||
// 正倒序判断
|
||||
var order=1;
|
||||
if($("#sortByFS").hasClass("glyphicon-triangle-bottom")){
|
||||
$("#sortByFS").removeClass();
|
||||
$("#sortByFS").addClass("glyphicon glyphicon-triangle-top");
|
||||
folderView.fileList.sort(function(v1,v2){
|
||||
return v2.fileSize - v1.fileSize;
|
||||
});
|
||||
}else{
|
||||
$("#sortByFS").removeClass();
|
||||
$("#sortByFS").addClass("glyphicon glyphicon-triangle-bottom");
|
||||
folderView.fileList.sort(function(v1,v2){
|
||||
return v1.fileSize - v2.fileSize;
|
||||
});
|
||||
order=-1;
|
||||
}
|
||||
showFolderTable(folderView);
|
||||
$("#sortByFS").removeClass();
|
||||
$("#sortByFS").addClass("glyphicon glyphicon-hourglass");
|
||||
setTimeout(function(){
|
||||
folderView.fileList.sort(function(v1,v2){
|
||||
return order * (v1.fileSize - v2.fileSize);
|
||||
});
|
||||
showFolderTable(folderView);
|
||||
$("#sortByFS").removeClass();
|
||||
if(order == -1){
|
||||
$("#sortByFS").addClass("glyphicon glyphicon-triangle-top");
|
||||
}else{
|
||||
$("#sortByFS").addClass("glyphicon glyphicon-triangle-bottom");
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// 按创建者排序
|
||||
@ -2187,20 +2201,25 @@ function sortbycn(){
|
||||
$("#sortByFS").removeClass();
|
||||
var order=1;
|
||||
if($("#sortByCN").hasClass('glyphicon-triangle-bottom')){
|
||||
$("#sortByCN").removeClass();
|
||||
$("#sortByCN").addClass("glyphicon glyphicon-triangle-top");
|
||||
order=-1;
|
||||
}else{
|
||||
$("#sortByCN").removeClass();
|
||||
$("#sortByCN").addClass("glyphicon glyphicon-triangle-bottom");
|
||||
}
|
||||
folderView.fileList.sort(function(v1,v2){
|
||||
return order * v2.fileCreator.localeCompare(v1.fileCreator,"zh");
|
||||
});
|
||||
folderView.folderList.sort(function(v1,v2){
|
||||
return order * v2.folderCreator.localeCompare(v1.folderCreator,"zh");
|
||||
});
|
||||
showFolderTable(folderView);
|
||||
$("#sortByCN").removeClass();
|
||||
$("#sortByCN").addClass("glyphicon glyphicon-hourglass");
|
||||
setTimeout(function(){
|
||||
folderView.fileList.sort(function(v1,v2){
|
||||
return order * v2.fileCreator.localeCompare(v1.fileCreator,"zh");
|
||||
});
|
||||
folderView.folderList.sort(function(v1,v2){
|
||||
return order * v2.folderCreator.localeCompare(v1.folderCreator,"zh");
|
||||
});
|
||||
showFolderTable(folderView);
|
||||
$("#sortByCN").removeClass();
|
||||
if(order == -1){
|
||||
$("#sortByCN").addClass("glyphicon glyphicon-triangle-top");
|
||||
}else{
|
||||
$("#sortByCN").addClass("glyphicon glyphicon-triangle-bottom");
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// 显示原始的顺序
|
||||
@ -2209,12 +2228,16 @@ function showOriginFolderView(){
|
||||
$("#sortByCD").removeClass();
|
||||
$("#sortByFS").removeClass();
|
||||
$("#sortByCN").removeClass();
|
||||
if(screenedFoldrView!=null){
|
||||
folderView=$.extend(true, {}, screenedFoldrView);
|
||||
}else{
|
||||
folderView=$.extend(true, {}, originFolderView);
|
||||
}
|
||||
showFolderTable(folderView);
|
||||
$("#sortByOR").addClass("glyphicon glyphicon-hourglass");
|
||||
setTimeout(function(){
|
||||
if(screenedFoldrView!=null){
|
||||
folderView=$.extend(true, {}, screenedFoldrView);
|
||||
}else{
|
||||
folderView=$.extend(true, {}, originFolderView);
|
||||
}
|
||||
showFolderTable(folderView);
|
||||
$("#sortByOR").removeClass();
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// 确认文件移动(剪切-粘贴)操作
|
||||
|
Loading…
Reference in New Issue
Block a user