|
@@ -114,9 +114,13 @@ function getAllList(currPageNum = 1) {
|
|
|
const currPageAttData = attData.slice((currPageNum-1)*pageCount, currPageNum*pageCount);
|
|
|
let html = '';
|
|
|
for(const att of currPageAttData) {
|
|
|
- html += '<tr><td><a href="javascript:void(0)" file-id="'+ att.id +'">'+ att.filename + att.fileext +'</a></td><td>'+ att.username +'</td></tr>';
|
|
|
+ html += '<tr ><td><a href="javascript:void(0)" file-id="'+ att.id +'">'+ att.filename + att.fileext +'</a></td><td>'+ att.username +'</td></tr>';
|
|
|
}
|
|
|
$('#alllist-table').html(html);
|
|
|
+ $('#alllist-table').on('click', 'tr', function() {
|
|
|
+ $('#alllist-table tr').removeClass('bg-light')
|
|
|
+ $(this).addClass('bg-light')
|
|
|
+ })
|
|
|
}
|
|
|
// 生成当前节点列表
|
|
|
function getNodeList(node) {
|
|
@@ -124,10 +128,13 @@ function getNodeList(node) {
|
|
|
for(const att of attData) {
|
|
|
if (node === att.lid) {
|
|
|
html += '<tr><td><a href="javascript:void(0)" file-id="'+ att.id +'">'+ att.filename + att.fileext +'</a></td><td>'+ att.username +'</td></tr>';
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
$('#nodelist-table').html(html);
|
|
|
+ $('#nodelist-table').on('click', 'tr', function() {
|
|
|
+ $('#nodelist-table tr').removeClass('bg-light')
|
|
|
+ $(this).addClass('bg-light')
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
$(document).ready(() => {
|