Complete system for getting + saving Product Categories with new database, server, and client architecture.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user