23 lines
583 B
JavaScript
23 lines
583 B
JavaScript
function setupCheckpointTable(isHistoryPage = false) {
|
|
const table = initializeCheckpointTable(isHistoryPage);
|
|
|
|
table.on('draw', function () {
|
|
const body = $(table.table().body());
|
|
body.unhighlight();
|
|
body.highlight(table.search());
|
|
});
|
|
|
|
window.checkpointTable = table;
|
|
|
|
window.clearCheckpointTable = function () {
|
|
table.clear().draw();
|
|
};
|
|
|
|
window.addToCheckpointTable = function (records) {
|
|
if (!Array.isArray(records)) {
|
|
records = [records];
|
|
}
|
|
table.rows.add(records).draw();
|
|
};
|
|
}
|