From 3a5087d1a27f622c783e60424a6bbcbf42cd221a Mon Sep 17 00:00:00 2001 From: aadhavan valli Date: Sat, 10 Feb 2024 11:31:10 +0530 Subject: [PATCH] APPSETTINGISSUE : AADHAVAN --- addform.html | 10 ++++++---- dashboard.html | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/addform.html b/addform.html index b442744..96eb7af 100644 --- a/addform.html +++ b/addform.html @@ -5991,8 +5991,9 @@ setInterval(removeNonExistentIdseveryTime, 1000) mathDisableFunction(); }, 1500); function mathDisableFunction() { - const parentFolder = path.dirname(__filename); - const filePath = path.join(parentFolder, 'mathEnable.json'); + // const parentFolder = path.dirname(__filename); + // const filePath = path.join(parentFolder, 'AppSetting.json'); + const filePath = 'AppSetting.json'; fs.readFile(filePath, 'utf8', (err, data) => { if (err) { console.error('Error reading file:', err); @@ -6000,8 +6001,9 @@ setInterval(removeNonExistentIdseveryTime, 1000) } const jsonObject = JSON.parse(data); - var aa= jsonObject.mathEnable; + var aa= jsonObject.AppSetting; const inputString = aa[0]; + console.log(inputString); const valuesArray = inputString.split(', '); valuesArray.forEach(value => { @@ -6015,7 +6017,7 @@ setInterval(removeNonExistentIdseveryTime, 1000) var subTitles= document.querySelectorAll('label') subTitles.forEach(function (subTitle){ if (subTitle.innerHTML == "Subtitle:") { - subTitle.parentElement.parentElement.style= "display:block"; + subTitle.parentElement.style= "display:block"; } }) }else if(value === 'MathCheckbox'){ diff --git a/dashboard.html b/dashboard.html index a36460e..e02efa8 100644 --- a/dashboard.html +++ b/dashboard.html @@ -972,11 +972,11 @@ function submitValues() { const string = array.join(', '); const jsonString = JSON.stringify(string); console.log(jsonString); - const wrappedJsonString = `{"mathEnable":[${jsonString}]}`; + const wrappedJsonString = `{"AppSetting":[${jsonString}]}`; const newPath = xmlPath.replace(/\\xml\\/i, '\\'); - fs.writeFileSync(`${newPath}mathEnable.json`, wrappedJsonString, 'utf-8'); + fs.writeFileSync(`AppSetting.json`, wrappedJsonString, 'utf-8'); }