1. Module bundling added to reduce server calls as each file was taking ~440 ms to load on public server.\n2. JavaScript lib files refactored with OOP for use with module bundling.

This commit is contained in:
2024-09-10 19:43:02 +01:00
parent aac01e687f
commit 0c88f161c3
7678 changed files with 778712 additions and 1254 deletions

View File

@@ -1,18 +1,21 @@
import Validation from "./lib/validation";
// Data tables
function getDataTableCellByNode(table, elRow, indexColumn) {
// normal jQuery selector won't pick up hidden columns
return document.querySelectorAll(table.DataTable().cells(elRow, indexColumn, null).nodes());
}
function outputTableElementDateInput(table, elRow, indexColumn, value) {
let currentCell = getDataTableCellByNode(table, elRow, indexColumn);
let dateTxt = '';
if (!isEmpty(value)) {
if (typeof value === 'string') value = convertJSONDateString2Date(value);
export default class Table {
getDataTableCellByNode(table, elRow, indexColumn) {
// normal jQuery selector won't pick up hidden columns
return document.querySelectorAll(table.DataTable().cells(elRow, indexColumn, null).nodes());
}
outputTableElementDateInput(table, elRow, indexColumn, value) {
let currentCell = getDataTableCellByNode(table, elRow, indexColumn);
let dateTxt = '';
if (!Validation.isEmpty(value)) {
if (typeof value === 'string') value = convertJSONDateString2Date(value);
}
}
}