Complete system for getting + saving Product Categories with new database, server, and client architecture.

This commit is contained in:
2024-09-01 21:57:46 +01:00
parent ba50aec9c9
commit b3e801e1ec
303 changed files with 4358 additions and 2885 deletions

View File

@@ -1,29 +1,4 @@
function getElementCurrentValue(element) {
let returnVal = '';
if (!isEmpty(element)) {
if (element.type === "checkbox") {
returnVal = element.checked;
}
/*
else if (element.classList.contains(flagIsDatePicker)) {
returnVal = getDatePickerDate(element, adjust4DayLightSavings);
}
*/
else if (element.tagName === 'INPUT' || element.tagName === 'textarea' || element.tagName === 'select') {
returnVal = element.value;
}
else {
returnVal = element.textContent;
}
}
if (isEmpty(returnVal)) returnVal = '';
return returnVal;
}
function parseCSSPropertyToFloat(element, propertyName) {
var propertyText = element.css(propertyName);

View File

@@ -1,9 +1,8 @@
function initialiseEventHandler(selectorElement, classInitialised, eventHandler) {
document.querySelectorAll(selectorElement).forEach(function(element) {
if (!element.classList.contains(classInitialised)) {
element.classList.add(classInitialised);
eventHandler(element);
}
if (element.classList.contains(classInitialised)) return;
element.classList.add(classInitialised);
eventHandler(element);
});
}