tabulator5 function changes

This commit is contained in:
SimonGschnell
2024-04-24 10:00:12 +02:00
parent 96b79c8740
commit 7dfe2f1932
13 changed files with 11 additions and 50 deletions
+6
View File
@@ -39,6 +39,12 @@
z-index: 999999;
}
/* classes for rows that are not selectable in the tabulator */
.tabulator-row.tabulator-unselectable{
color:var(--bs-gray-500);
}
/* using bootstrap background classes to style the background color of tabulator rows */
/* bg-warning */
/* odd-rows */
+1
View File
@@ -1,3 +1,4 @@
.btn-w200
{
width: 200px;
@@ -184,28 +184,7 @@ var format_ectsSumBisherUndNeu = function (cell, formatterParams, onRendered) {
);
};
// Formats the rows
function func_rowFormatter(row) {
let status_kurzbz = row.getData().status_kurzbz;
// If status is anything else then 'Bearbeitet von STGL-Leitung'
if (status_kurzbz != ANRECHNUNGSTATUS_PROGRESSED_BY_STGL) {
// Disable new selection of updated rows
row.getElement().style["pointerEvents"] = "none";
// ...but leave url links selectable
row.getCell("dokument_bezeichnung").getElement().firstChild.style[
"pointerEvents"
] = "auto";
if (row.getCell("details")) {
row.getCell("details").getElement().firstChild.style["pointerEvents"] =
"auto";
}
// Color background grey
row.getElement().style["background-color"] = COLOR_LIGHTGREY; // default
}
}
// Formats row selectable/unselectable
function func_selectableCheck(row) {
@@ -88,20 +88,7 @@ function func_tableBuilt(table) {
table.tabulator("redraw", true);
}
// Formats the rows
function func_rowFormatter(row) {
let status_kurzbz = row.getData().status_kurzbz;
let empfehlungsberechtigt = row.getData().empfehlungsberechtigt;
row.getCells().forEach(function (cell) {
if (
status_kurzbz != ANRECHNUNGSTATUS_PROGRESSED_BY_LEKTOR ||
empfehlungsberechtigt == "false"
) {
row.getElement().style["background-color"] = COLOR_LIGHTGREY; // default
}
});
}
// Formats row selectable/unselectable
function func_selectableCheck(row) {
@@ -149,8 +149,6 @@ function func_rowFormatter(row) {
return; // bestellte + erteilte
} else if (bestellt != null && erteilt != null && akzeptiert != null) {
cell.getElement().classList.add("bg-success"); // akzeptierte
} else {
row.getElement().style["background-color"] = COLOR_LIGHTGREY; // default
}
});
}
@@ -207,9 +207,6 @@ function func_rowFormatter(row) {
} else if (bestellt != null && erteilt != null && akzeptiert != null) {
cell.getElement().classList.add("bg-success"); // akzeptiert
}
// default color is already set in the Tabulator5.css file that gets loaded the Header flag tabulator5
// row.getElement().style["background-color"] = COLOR_LIGHTGREY; // default
});
}