1. Fix(CSS): Styles improved across all pages. \n 2. Fix(SQL): User authentication correction for demo account with user role.

This commit is contained in:
2025-07-12 18:28:30 +01:00
parent 62cafa8bed
commit 4954c63d84
121 changed files with 562 additions and 3917 deletions

View File

@@ -829,7 +829,7 @@ var OverlayConfirm = /*#__PURE__*/function () {
key: "show",
value: function show() {
var overlay = document.querySelector(idOverlayConfirm);
overlay.classList.remove(flagCollapsed);
overlay.classList.remove(flagIsCollapsed);
overlay.style.visibility = 'visible';
}
}]);
@@ -906,12 +906,12 @@ var BasePage = /*#__PURE__*/function () {
value: function hookupNavigation() {
this.hookupEventHandler("click", idButtonHamburger, function (event, element) {
var overlayHamburger = document.querySelector(idOverlayHamburger);
if (overlayHamburger.classList.contains(flagCollapsed)) {
overlayHamburger.classList.remove(flagCollapsed);
if (overlayHamburger.classList.contains(flagIsCollapsed)) {
overlayHamburger.classList.remove(flagIsCollapsed);
overlayHamburger.classList.add(flagExpanded);
} else {
overlayHamburger.classList.remove(flagExpanded);
overlayHamburger.classList.add(flagCollapsed);
overlayHamburger.classList.add(flagIsCollapsed);
}
});
this.hookupButtonsNavHome();
@@ -1032,6 +1032,8 @@ var BasePage = /*#__PURE__*/function () {
Events.initialiseEventHandler('form.' + flagFilter + ' button.' + flagSave, flagInitialised, function (button) {
button.addEventListener("click", function (event) {
event.stopPropagation();
button = event.target;
if (button.classList.contains(flagIsCollapsed)) return;
utils_Utils.consoleLogIfNotProductionEnvironment('saving page: ', _this4.title);
OverlayConfirm.show();
});
@@ -1062,12 +1064,12 @@ var BasePage = /*#__PURE__*/function () {
var buttonSave = document.querySelector('form.' + flagFilter + ' button.' + flagSave);
var buttonCancel = document.querySelector('form.' + flagFilter + ' button.' + flagCancel);
if (show) {
buttonCancel.classList.remove(flagCollapsed);
buttonSave.classList.remove(flagCollapsed);
buttonCancel.classList.remove(flagIsCollapsed);
buttonSave.classList.remove(flagIsCollapsed);
utils_Utils.consoleLogIfNotProductionEnvironment('showing buttons');
} else {
buttonCancel.classList.add(flagCollapsed);
buttonSave.classList.add(flagCollapsed);
buttonCancel.classList.add(flagIsCollapsed);
buttonSave.classList.add(flagIsCollapsed);
utils_Utils.consoleLogIfNotProductionEnvironment('hiding buttons');
}
}
@@ -1609,9 +1611,11 @@ var TableBasePage = /*#__PURE__*/function (_BasePage) {
Events.initialiseEventHandler(idFormFilters + ' button.' + flagCancel, flagInitialised, function (button) {
button.addEventListener("click", function (event) {
event.stopPropagation();
button = event.target;
if (button.classList.contains(flagIsCollapsed)) return;
_this8.callFilterTableContent();
});
button.classList.add(flagCollapsed);
button.classList.add(flagIsCollapsed);
});
}
}, {
@@ -1620,6 +1624,7 @@ var TableBasePage = /*#__PURE__*/function (_BasePage) {
event.stopPropagation();
_rowBlank.setAttribute(this.constructor.attrIdRowObject, -1 - _rowBlank.getAttribute(this.constructor.attrIdRowObject));
var tbody = document.querySelector(idTableMain + ' tbody');
if (tbody.classList.contains(flagIsCollapsed)) return;
var row = _rowBlank.cloneNode(true);
row.classList.remove(flagInitialised);
row.querySelectorAll('.' + flagInitialised).forEach(function (element) {
@@ -1628,7 +1633,8 @@ var TableBasePage = /*#__PURE__*/function (_BasePage) {
var countRows = document.querySelectorAll(idTableMain + ' > tbody > tr').length;
row.setAttribute(this.constructor.attrIdRowObject, -1 - countRows);
this.initialiseRowNew(tbody, row);
tbody.appendChild(row);
tbody.prepend(row);
tbody.scrollTop = 0;
this.hookupTableMain();
this.postInitialiseRowNewCallback(tbody);
}
@@ -1832,7 +1838,7 @@ var TableBasePage = /*#__PURE__*/function (_BasePage) {
value: function hookupChangeHandlerTableCellsWhenNotCollapsed(inputSelector) {
var _this11 = this;
var handler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (event, element) {
if (!element.classList.contains(flagCollapsed)) _this11.handleChangeNestedElementCellTable(event, element);
if (!element.classList.contains(flagIsCollapsed)) _this11.handleChangeNestedElementCellTable(event, element);
};
this.hookupEventHandler("change", inputSelector, handler);
}
@@ -2030,12 +2036,12 @@ var TableBasePage = /*#__PURE__*/function (_BasePage) {
}, {
key: "toggleColumnCollapsed",
value: function toggleColumnCollapsed(flagColumn, isCollapsed) {
this.toggleColumnHasClassnameFlag(flagColumn, isCollapsed, flagCollapsed);
this.toggleColumnHasClassnameFlag(flagColumn, isCollapsed, flagIsCollapsed);
}
}, {
key: "toggleColumnHeaderCollapsed",
value: function toggleColumnHeaderCollapsed(flagColumn, isCollapsed) {
this.toggleColumnHasClassnameFlag(flagColumn, isCollapsed, flagCollapsed);
this.toggleColumnHasClassnameFlag(flagColumn, isCollapsed, flagIsCollapsed);
}
}, {
key: "hookupFieldsCommandCategory",
@@ -2241,12 +2247,26 @@ var TableBasePage = /*#__PURE__*/function (_BasePage) {
key: "isDirtyFilter",
value: function isDirtyFilter(filter) {
var isDirty = DOM.updateAndCheckIsElementDirty(filter);
var tbody = document.querySelector(idTableMain + ' tbody');
var rows = tbody.querySelectorAll(':scope > tr');
var cancelButton = document.querySelector(idFormFilters + ' ' + idButtonCancel);
var saveButton = document.querySelector(idFormFilters + ' ' + idButtonSave);
rows.forEach(function (row) {
if (isDirty && !row.classList.contains(flagIsCollapsed)) row.classList.add(flagIsCollapsed);
if (!isDirty && row.classList.contains(flagIsCollapsed)) row.classList.remove(flagIsCollapsed);
});
if (isDirty) {
var tbody = document.querySelector(idTableMain + ' tbody');
tbody.querySelectorAll('tr').forEach(function (tr) {
tr.remove();
});
tbody.innerHTML = '<div>Press "Apply Filters" to refresh the table.</div>';
// tbody.querySelectorAll('tr').forEach((tr) => { tr.remove(); });
tbody.innerHTML = '<div>Press "Apply Filters" to refresh the table.</div>' + tbody.innerHTML;
if (!tbody.classList.contains(flagIsCollapsed)) tbody.classList.add(flagIsCollapsed);
if (!cancelButton.classList.contains(flagIsCollapsed)) cancelButton.classList.add(flagIsCollapsed);
if (!saveButton.classList.contains(flagIsCollapsed)) saveButton.classList.add(flagIsCollapsed);
} else {
if (tbody.classList.contains(flagIsCollapsed)) tbody.classList.remove(flagIsCollapsed);
if (cancelButton.classList.contains(flagIsCollapsed)) cancelButton.classList.remove(flagIsCollapsed);
if (saveButton.classList.contains(flagIsCollapsed)) saveButton.classList.remove(flagIsCollapsed);
var isDirtyLabel = tbody.querySelector(":scope > div");
if (isDirtyLabel != null) isDirtyLabel.remove();
}
return isDirty;
}