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();
|
mathDisableFunction();
|
||||||
}, 1500);
|
}, 1500);
|
||||||
function mathDisableFunction() {
|
function mathDisableFunction() {
|
||||||
const parentFolder = path.dirname(__filename);
|
// const parentFolder = path.dirname(__filename);
|
||||||
const filePath = path.join(parentFolder, 'mathEnable.json');
|
// const filePath = path.join(parentFolder, 'AppSetting.json');
|
||||||
|
const filePath = 'AppSetting.json';
|
||||||
fs.readFile(filePath, 'utf8', (err, data) => {
|
fs.readFile(filePath, 'utf8', (err, data) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error('Error reading file:', err);
|
console.error('Error reading file:', err);
|
||||||
@ -6000,8 +6001,9 @@ setInterval(removeNonExistentIdseveryTime, 1000)
|
|||||||
}
|
}
|
||||||
const jsonObject = JSON.parse(data);
|
const jsonObject = JSON.parse(data);
|
||||||
|
|
||||||
var aa= jsonObject.mathEnable;
|
var aa= jsonObject.AppSetting;
|
||||||
const inputString = aa[0];
|
const inputString = aa[0];
|
||||||
|
console.log(inputString);
|
||||||
|
|
||||||
const valuesArray = inputString.split(', ');
|
const valuesArray = inputString.split(', ');
|
||||||
valuesArray.forEach(value => {
|
valuesArray.forEach(value => {
|
||||||
@ -6015,7 +6017,7 @@ setInterval(removeNonExistentIdseveryTime, 1000)
|
|||||||
var subTitles= document.querySelectorAll('label')
|
var subTitles= document.querySelectorAll('label')
|
||||||
subTitles.forEach(function (subTitle){
|
subTitles.forEach(function (subTitle){
|
||||||
if (subTitle.innerHTML == "Subtitle:") {
|
if (subTitle.innerHTML == "Subtitle:") {
|
||||||
subTitle.parentElement.parentElement.style= "display:block";
|
subTitle.parentElement.style= "display:block";
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else if(value === 'MathCheckbox'){
|
}else if(value === 'MathCheckbox'){
|
||||||
|
|||||||
@ -972,11 +972,11 @@ function submitValues() {
|
|||||||
const string = array.join(', ');
|
const string = array.join(', ');
|
||||||
const jsonString = JSON.stringify(string);
|
const jsonString = JSON.stringify(string);
|
||||||
console.log(jsonString);
|
console.log(jsonString);
|
||||||
const wrappedJsonString = `{"mathEnable":[${jsonString}]}`;
|
const wrappedJsonString = `{"AppSetting":[${jsonString}]}`;
|
||||||
|
|
||||||
const newPath = xmlPath.replace(/\\xml\\/i, '\\');
|
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