优化文件多选的bug

pull/224/head
midoks 3 years ago
parent 103beb62a4
commit e55c40e973
  1. 48
      route/static/app/files.js

@ -329,11 +329,11 @@ function getFiles(Path) {
var cnametext =fmp[0] + fmp[5]; var cnametext =fmp[0] + fmp[5];
fmp[0] = fmp[0].replace(/'/,"\\'"); fmp[0] = fmp[0].replace(/'/,"\\'");
if(cnametext.length>20){ if(cnametext.length>20){
cnametext = cnametext.substring(0,20)+'...' cnametext = cnametext.substring(0,20) + '...';
} }
if(isChineseChar(cnametext)){ if(isChineseChar(cnametext)){
if(cnametext.length>10){ if(cnametext.length>10){
cnametext = cnametext.substring(0,10)+'...' cnametext = cnametext.substring(0,10) + '...';
} }
} }
var timetext ='--'; var timetext ='--';
@ -376,11 +376,11 @@ function getFiles(Path) {
var cnametext =fmp[0] + fmp[5]; var cnametext =fmp[0] + fmp[5];
fmp[0] = fmp[0].replace(/'/,"\\'"); fmp[0] = fmp[0].replace(/'/,"\\'");
if(cnametext.length>48){ if(cnametext.length>48){
cnametext = cnametext.substring(0,48)+'...' cnametext = cnametext.substring(0,48) + '...';
} }
if(isChineseChar(cnametext)){ if(isChineseChar(cnametext)){
if(cnametext.length>16){ if(cnametext.length>16){
cnametext = cnametext.substring(0,16)+'...' cnametext = cnametext.substring(0,16) + '...';
} }
} }
if(displayZip != -1){ if(displayZip != -1){
@ -413,7 +413,8 @@ function getFiles(Path) {
<a class='btlink' href=\"javascript:zip('" + rdata.PATH +"/" +fmp[0] + "');\">压缩</a> | \ <a class='btlink' href=\"javascript:zip('" + rdata.PATH +"/" +fmp[0] + "');\">压缩</a> | \
"+bodyZip+download+"\ "+bodyZip+download+"\
<a class='btlink' href='javascript:;' onclick=\"deleteFile('" + rdata.PATH +"/"+ fmp[0] + "')\">删除</a>\ <a class='btlink' href='javascript:;' onclick=\"deleteFile('" + rdata.PATH +"/"+ fmp[0] + "')\">删除</a>\
</span></td></tr>"; </span></td>\
</tr>";
} }
else{ else{
body += "<div class='file folderBox menufile' data-path='" + rdata.PATH +"/"+ fmp[0] + "' filetype='"+fmp[0]+"' title='文件名:" + fmp[0]+"&#13;大小:" body += "<div class='file folderBox menufile' data-path='" + rdata.PATH +"/"+ fmp[0] + "' filetype='"+fmp[0]+"' title='文件名:" + fmp[0]+"&#13;大小:"
@ -444,8 +445,7 @@ function getFiles(Path) {
</table>'; </table>';
$("#fileCon").removeClass("fileList").html(tablehtml); $("#fileCon").removeClass("fileList").html(tablehtml);
$("#tipTools").width($("#fileCon").width()); $("#tipTools").width($("#fileCon").width());
} } else {
else{
$("#fileCon").addClass("fileList").html(body); $("#fileCon").addClass("fileList").html(body);
$("#tipTools").width($("#fileCon").width()); $("#tipTools").width($("#fileCon").width());
} }
@ -518,25 +518,19 @@ function getFiles(Path) {
}); });
// //禁用右键 //禁用右键
// $("#fileCon").bind("contextmenu",function(e){ $("#fileCon").bind("contextmenu",function(e){
// return false; return false;
// }); });
// bindselect(); bindselect();
// //绑定右键 // //绑定右键
// $("#fileCon").mousedown(function(e){ $("#fileCon").mousedown(function(e){
// var count = totalFile(); var count = totalFile();
// if(e.which == 3) { if(e.which == 3) {
// if(count>1){ if(count>1){rightMenuClickAll(e);} else {return;}
// RClickAll(e); }
// } });
// else{
// return
// }
// }
// });
$(".folderBox,.folderBoxTr").mousedown(function(e){ $(".folderBox,.folderBoxTr").mousedown(function(e){
// console.log(e); // console.log(e);
@ -1233,7 +1227,7 @@ function unZip(fileName,type) {
return return
} }
type = (type == 1) ? 'tar':'zip' type = (type == 1) ? 'tar':'zip';
var umpass = ''; var umpass = '';
if(type == 'zip'){ if(type == 'zip'){
umpass = '<div class="line"><span class="tname">'+lan.files.zip_pass_title+'</span><input type="text" class="bt-input-text" id="unpass" value="" placeholder="'+lan.files.zip_pass_msg+'" style="width:330px" /></div>' umpass = '<div class="line"><span class="tname">'+lan.files.zip_pass_title+'</span><input type="text" class="bt-input-text" id="unpass" value="" placeholder="'+lan.files.zip_pass_msg+'" style="width:330px" /></div>'
@ -1592,10 +1586,10 @@ function pathLeft(){
var SpanPathWidth = $("#PathPlaceBtn").width() - 50; var SpanPathWidth = $("#PathPlaceBtn").width() - 50;
var Ml = UlWidth - SpanPathWidth; var Ml = UlWidth - SpanPathWidth;
if(UlWidth > SpanPathWidth ){ if(UlWidth > SpanPathWidth ){
$("#PathPlaceBtn ul").css("left",-Ml) $("#PathPlaceBtn ul").css("left",-Ml);
} }
else{ else{
$("#PathPlaceBtn ul").css("left",0) $("#PathPlaceBtn ul").css("left",0);
} }
} }
//路径快捷点击 //路径快捷点击

Loading…
Cancel
Save