diff --git a/route/static/app/files.js b/route/static/app/files.js index dafd78f1e..29c0339cf 100755 --- a/route/static/app/files.js +++ b/route/static/app/files.js @@ -512,23 +512,23 @@ function getFiles(Path) { $("input[name=id]").dblclick(function(e){ e.stopPropagation(); }); - //禁用右键 - $("#fileCon").bind("contextmenu",function(e){ - return false; - }); - bindselect(); - //绑定右键 - $("#fileCon").mousedown(function(e){ - var count = totalFile(); - if(e.which == 3) { - if(count>1){ - RClickAll(e); - } - else{ - return - } - } - }); + // //禁用右键 + // $("#fileCon").bind("contextmenu",function(e){ + // return false; + // }); + // bindselect(); + // //绑定右键 + // $("#fileCon").mousedown(function(e){ + // var count = totalFile(); + // if(e.which == 3) { + // if(count>1){ + // RClickAll(e); + // } + // else{ + // return + // } + // } + // }); $(".folderBox,.folderBoxTr").mousedown(function(e){ var count = totalFile(); if(e.which == 3) { @@ -601,18 +601,17 @@ function bindselect(){ //选择操作 function showSeclect(){ var count = totalFile(); - var BatchTools = ''; + var batchTools = ''; if(count > 1){ - BatchTools = '\ + batchTools = '\ \ \ \ - ' - $("#Batch").html(BatchTools); + '; }else{ - $("#Batch").html(BatchTools); //setCookie('BatchSelected', null); } + $("#Batch").html(batchTools); } //滚动条事件 @@ -760,12 +759,6 @@ function ShowEditMenu(){ }) } -// //取文件名 -// function GetFileName(fileNameFull) { -// var pName = fileNameFull.split('/'); -// return pName[pName.length - 1]; -// } - //取磁盘 function getDisk() { var LBody = ''; @@ -836,11 +829,14 @@ function createFile(type, path) { \ \ \ - ' - }); - $("#newFileName").focus().keyup(function(e){ - if(e.keyCode == 13) $("#createFileBtn").click(); + ', + success:function(){ + $("#newFileName").focus().keyup(function(e){ + if(e.keyCode == 13) $("#createFileBtn").click(); + }); + } }); + } //新建目录 function createDir(type, path) { @@ -873,11 +869,14 @@ function createDir(type, path) { \ \ \ - ' - }); - $("#newDirName").focus().keyup(function(e){ - if(e.keyCode == 13) $("#createDirBtn").click(); + ', + success:function(){ + $("#newDirName").focus().keyup(function(e){ + if(e.keyCode == 13) $("#createDirBtn").click(); + }); + } }); + } //删除文件 @@ -934,10 +933,18 @@ function downloadFile(action){ if(action == 1){ var fUrl = $("#mUrl").val(); fUrl = encodeURIComponent(fUrl); - fpath = $("#dpath").val(); + + var fpath = $("#dpath").val(); fname = encodeURIComponent($("#dfilename").val()); + + if (fUrl == "" ){ + layer.msg("URL地址不能为空!",{icon:2}); + return; + } + layer.closeAll(); layer.msg(lan.files.down_task,{time:0,icon:16,shade: [0.3, '#000']}); + $.post('/files/download_file','path='+fpath+'&url='+fUrl+'&filename='+fname,function(rdata){ layer.closeAll(); getFiles(fpath); @@ -946,14 +953,16 @@ function downloadFile(action){ },'json'); return; } + var path = $("#DirPathPlace input").val(); layer.open({ type: 1, shift: 5, closeBtn: 2, area: '500px', + btn:["确定","关闭"], title: lan.files.down_title, - content: '
\ + content: '\
\ URL地址:\
\ @@ -963,21 +972,20 @@ function downloadFile(action){
\ 文件名:\
\ -
\ - \ - \ -
\ -
' - }); - $("#mUrl").keyup(function(){ - durl = $(this).val(); - tmp = durl.split('/'); - $("#dfilename").val(tmp[tmp.length-1]); + ', + success:function(){ + $("#mUrl").keyup(function(){ + durl = $(this).val(); + tmp = durl.split('/'); + $("#dfilename").val(tmp[tmp.length-1]); + }); + }, + yes:function(){ + downloadFile(1); + } }); } - - //重命名 function reName(type, fileName) { if (type == 1) { diff --git a/route/templates/default/files.html b/route/templates/default/files.html index c48a13ec2..71b0513ae 100755 --- a/route/templates/default/files.html +++ b/route/templates/default/files.html @@ -25,7 +25,7 @@
- +