Fix #1129 display total size when selecting files for deletion

This commit is contained in:
Kijin Sung 2019-07-30 21:21:05 +09:00
parent a23323335b
commit 188c4aa34a
2 changed files with 8 additions and 4 deletions

View file

@ -10,10 +10,9 @@ function getFileList() {
});
var params = new Array();
var response_tags = ['error','message', 'file_list'];
params["file_srls"] = cartList.join(",");
exec_xml('file','procFileGetList',params, completeGetFileList, response_tags);
exec_json('file.procFileGetList', params, completeGetFileList);
}
function completeGetFileList(ret_obj, response_tags)
@ -27,7 +26,7 @@ function completeGetFileList(ret_obj, response_tags)
}
else
{
var file_list = ret_obj['file_list']['item'];
var file_list = ret_obj['file_list']['item'] ? ret_obj['file_list']['item'] : ret_obj['file_list'];
if(!jQuery.isArray(file_list)) file_list = [file_list];
for(var x in file_list)
{
@ -39,7 +38,7 @@ function completeGetFileList(ret_obj, response_tags)
'</tr>' +
'<input type="hidden" name="cart[]" value="'+objFile.file_srl+'" />';
}
jQuery('#selectedFileCount').html(file_list.length);
jQuery('#selectedFileCount').html(file_list.length + ' (' + ret_obj['file_size_total_human'] + ')');
}
jQuery('#fileManageListTable>tbody').html(htmlListBuffer);
}