APPSETTINGISSUE : AADHAVAN
This commit is contained in:
parent
f8bf6bf965
commit
3a5087d1a2
10
addform.html
10
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'){
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user