Add bootstrap-table.js library to support dynamic table functionality in the project
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
|
||||||
<!-- Page Title -->
|
<!-- Page Title -->
|
||||||
<title>Infra Tools IT</title>
|
<title>Web Infra Reports</title>
|
||||||
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
|
<link rel="shortcut icon" type="image/png" href="/include/favicon-32x32.png">
|
||||||
|
|
||||||
<!-- JQuery -->
|
<!-- JQuery -->
|
||||||
@@ -216,28 +216,4 @@
|
|||||||
</body>
|
</body>
|
||||||
<script src="/js/switch.js"></script>
|
<script src="/js/switch.js"></script>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
<script src="/js/tableResize.js"></script>
|
||||||
<SCRIPT>
|
|
||||||
let table = $('#t1');
|
|
||||||
$(document).ready(function() {
|
|
||||||
table.DataTable({
|
|
||||||
scrollY: '50vh',
|
|
||||||
scrollCollapse: true,
|
|
||||||
paging: false,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
let options = table.bootstrapTable('getOptions');
|
|
||||||
options.height= document.getElementById('content').clientHeight-170;
|
|
||||||
table.bootstrapTable('refreshOptions',options);
|
|
||||||
});
|
|
||||||
|
|
||||||
function tableresize() {
|
|
||||||
let options = table.bootstrapTable('getOptions');
|
|
||||||
options.height= document.getElementById('content').clientHeight-170;
|
|
||||||
table.bootstrapTable('refreshOptions',options);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener("resize", tableresize);
|
|
||||||
</SCRIPT>
|
|
||||||
8998
js/bootstrap-table.js
vendored
Normal file
8998
js/bootstrap-table.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
15
js/tableResize.js
Normal file
15
js/tableResize.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
let table = $('#t1');
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
let options = table.bootstrapTable('getOptions');
|
||||||
|
options.height = document.getElementById('content').clientHeight - 170;
|
||||||
|
table.bootstrapTable('refreshOptions', options);
|
||||||
|
});
|
||||||
|
|
||||||
|
function tableresize() {
|
||||||
|
let options = table.bootstrapTable('getOptions');
|
||||||
|
options.height = document.getElementById('content').clientHeight - 170;
|
||||||
|
table.bootstrapTable('refreshOptions', options);
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener("resize", tableresize);
|
||||||
Reference in New Issue
Block a user