Update files.js

pull/675/head
Mr Chen 5 months ago
parent 6286f03432
commit 1360d2d066
  1. 12
      web/static/app/files.js

@ -374,16 +374,15 @@ function getFiles(Path) {
Path = getCookie('open_dir_path'); Path = getCookie('open_dir_path');
} }
var args = {};
args['p'] = p;
var post = {}; var post = {};
post['path'] = Path; post['path'] = Path;
post['p'] = p;
var file_row = $.cookie('file_row'); var file_row = $.cookie('file_row');
if(!file_row) { if(!file_row) {
file_row = '100'; file_row = '100';
} }
args['row'] = file_row; post['row'] = file_row;
var body = ''; var body = '';
var totalSize = 0; var totalSize = 0;
@ -392,13 +391,13 @@ function getFiles(Path) {
var search_file = $("#search_file").val(); var search_file = $("#search_file").val();
if(search_file.length > 0){ if(search_file.length > 0){
args['search'] = search_file; post['search'] = search_file;
} }
var search_all = ''; var search_all = '';
var all = $('#search_all').hasClass('active'); var all = $('#search_all').hasClass('active');
if(all){ if(all){
args['all'] = 'yes'; post['all'] = 'yes';
} }
var file_order = $.cookie('file_order'); var file_order = $.cookie('file_order');
@ -406,10 +405,9 @@ function getFiles(Path) {
post['order'] = file_order.replace('|',' '); post['order'] = file_order.replace('|',' ');
} }
var query_str = toUrlParam(args);
var loadT = layer.load(); var loadT = layer.load();
$.post('/files/get_dir?' + query_str, post, function(rdata) { $.post('/files/get_dir', post, function(rdata) {
layer.close(loadT); layer.close(loadT);
//构建分页 //构建分页

Loading…
Cancel
Save