⚙ settings saving improvements - Inline editing bug 🐛

This commit is contained in:
jokob-sk
2024-05-29 17:34:51 +10:00
parent b0c47e824d
commit 3853b8a4ec
3 changed files with 12 additions and 8 deletions

View File

@@ -218,6 +218,7 @@ function removeOptionItem(option) {
function updateOptionItem(option, value) { function updateOptionItem(option, value) {
settingsChanged(); settingsChanged();
option.html(value); option.html(value);
option.val(value);
} }
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@@ -247,8 +248,6 @@ function initListInteractionOptions(selectorId) {
$options.on('click', function() { $options.on('click', function() {
const $option = $(this); const $option = $(this);
console.log('aaa');
// Increment click counter // Increment click counter
clickCounter++; clickCounter++;

View File

@@ -656,8 +656,8 @@
"settings_expand_all": "Expand all", "settings_expand_all": "Expand all",
"settings_imported": "Last time settings were imported from the app.conf file", "settings_imported": "Last time settings were imported from the app.conf file",
"settings_imported_label": "Settings imported", "settings_imported_label": "Settings imported",
"settings_missing": "Not all settings loaded, refresh the page! This is probably caused by a high load on the database or app startup sequence.", "settings_missing": "Not all settings loaded! High load on the database or app startup sequence. Click the 🔄 reload button in the top.",
"settings_missing_block": "You can not save your settings without specifying all setting keys. Refresh the page. This is probably caused by a high load on the database.", "settings_missing_block": "Not all settings were loaded correctly. This is probably caused by a high load on the database. Click the 🔄 reload button in the top.",
"settings_old": "Importing settings and re-initializing...", "settings_old": "Importing settings and re-initializing...",
"settings_other_scanners": "Other, non-device scanner plugins that are currently enabled.", "settings_other_scanners": "Other, non-device scanner plugins that are currently enabled.",
"settings_other_scanners_icon": "fa-solid fa-recycle", "settings_other_scanners_icon": "fa-solid fa-recycle",

View File

@@ -724,7 +724,12 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
{ {
console.log(`Error settingsNumberJSON != settingsNumberDB: ${settingsNumberJSON} != ${settingsNumberDB}`); console.log(`Error settingsNumberJSON != settingsNumberDB: ${settingsNumberJSON} != ${settingsNumberDB}`);
showModalOk('WARNING', "<?= lang("settings_missing_block")?>"); showModalOk('WARNING', "<?= lang("settings_missing_block")?>");
setTimeout(() => {
clearCache()
}, 1500);
} else } else
{ {
var settingsArray = []; var settingsArray = [];
@@ -773,7 +778,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
} }
}); });
// console.log(settingsArray); console.log(settingsArray);
// sanity check to make sure settings were loaded & collected correctly // sanity check to make sure settings were loaded & collected correctly
sanityCheck_notOK = true sanityCheck_notOK = true
@@ -810,12 +815,12 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
console.log(missingCodeNamesOnPage); console.log(missingCodeNamesOnPage);
console.log(missingCodeNamesInDB); console.log(missingCodeNamesInDB);
showModalOk('WARNING', "<?= lang("settings_missing_block")?>"); showModalOk('WARNING', "<?= lang("settings_missing_block")?>");
} }
} }
if(sanityCheck_notOK == false ) if(sanityCheck_notOK == false && false)
{ {
// trigger a save settings event in the backend // trigger a save settings event in the backend
$.ajax({ $.ajax({