LEFTNAVCSS : AADHAVAN
This commit is contained in:
parent
84e5110f78
commit
92aa201002
402
addform.html
402
addform.html
@ -395,6 +395,7 @@
|
||||
|
||||
.content.visible {
|
||||
display: block;
|
||||
width: 230px;
|
||||
}
|
||||
.nested {
|
||||
border-left: 2px dotted #000;
|
||||
@ -440,7 +441,8 @@
|
||||
max-height: 750px;
|
||||
padding:0 10px 20px;
|
||||
/* width: 314px; */
|
||||
width: 285px;
|
||||
/* width: 285px; */
|
||||
width: 295px;
|
||||
height: -webkit-fill-available;
|
||||
}
|
||||
|
||||
@ -472,7 +474,7 @@
|
||||
@media (min-width: 100px) {
|
||||
#sidebar-wrapper {
|
||||
/* margin-left: 0; */
|
||||
margin-left: -124px;
|
||||
margin-left: -125px;
|
||||
}
|
||||
#page-content-wrapper {
|
||||
min-width: 0;
|
||||
@ -480,7 +482,7 @@
|
||||
}
|
||||
body.sb-sidenav-toggled #wrapper #sidebar-wrapper {
|
||||
/* margin-left: -19rem; */
|
||||
margin-left: -26rem;
|
||||
margin-left: -27rem;
|
||||
}
|
||||
body.sb-sidenav-toggled #wrapper #sidebar-wrapper .sidebar-fixed{
|
||||
left:-19rem;
|
||||
@ -1091,12 +1093,12 @@ async function convertToLatex(text, mathstatus) {
|
||||
<!-- The contentEditable div for Quill -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="richText worksection" id="workarea" contentEditable="true" placeholder="Type your message and press Enter..." style="position: relative; top: 4px;"></div>
|
||||
<div class="richText worksection" id="workarea" contentEditable="true" tabindex="0" placeholder="Type your message and press Enter..." style="position: relative; top: 4px;"></div>
|
||||
<input type="file" id="workarea_fileInput" style="display: none;">
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div>
|
||||
<math-field id="workarea_math" style="width: 100%; " contenteditable="true"></math-field>
|
||||
<math-field id="workarea_math" style="width: 100%; " contenteditable="true" tabindex="0"></math-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 items2" style="display: flex; align-items: center; position: relative; right: 40px;">
|
||||
@ -1129,14 +1131,14 @@ async function convertToLatex(text, mathstatus) {
|
||||
<div class="col-lg-12 col-md-12" style="padding: 0;">
|
||||
<div class="form_box" id="RTEID">
|
||||
<label class="titleSpace">Title:</label>
|
||||
<div class="richText" id="Question_title" contenteditable="true" style=" border: 2px solid #EEECFE; margin-top: 4px; color: black;"></div>
|
||||
<div class="richText" id="Question_title" contenteditable="true" tabindex="0" style=" border: 2px solid #EEECFE; margin-top: 4px; color: black;"></div>
|
||||
<input type="file" id="Question_title_fileInput" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12 col-md-12" style="padding: 0;">
|
||||
<div class="form_box">
|
||||
<label class="titleSpace">Description:</label>
|
||||
<div class="richText" id="Question_description" contenteditable="true" style=" border: 2px solid #EEECFE; margin-top: 4px; color: black;"></div>
|
||||
<div class="richText" id="Question_description" contenteditable="true" tabindex="0" style=" border: 2px solid #EEECFE; margin-top: 4px; color: black;"></div>
|
||||
<input type="file" id="Question_description_fileInput" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
@ -2034,16 +2036,16 @@ function addSection(title = false, description = false, random_no = false, secti
|
||||
|
||||
<div class="form_box">
|
||||
<label class="titleSpace">Section: </label>
|
||||
<div class="richText" id="section_title_text_${random_no == false ? text_field_created_time : random_no}" contenteditable="true" style="border: 2px solid #EEECFE; margin-top: 4px;">${title ? title : ''}</div>
|
||||
<div class="richText" id="section_title_text_${random_no == false ? text_field_created_time : random_no}" contenteditable="true" tabindex="0" style="border: 2px solid #EEECFE; margin-top: 4px;">${title ? title : ''}</div>
|
||||
<input type="file" id="fileInput_${sectionRandomID}" style="display: none;"> </div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
<div class="form_box">
|
||||
<label class="titleSpace">Description:</label>
|
||||
<div class="richText" id="section_description_text_${random_no == false ? text_field_created_time : random_no}" contenteditable="true" style="border: 2px solid #EEECFE; margin-top: 4px;">${description ? description : ''}</div>
|
||||
<div class="richText" id="section_description_text_${random_no == false ? text_field_created_time : random_no}" contenteditable="true" tabindex="0" style="border: 2px solid #EEECFE; margin-top: 4px;">${description ? description : ''}</div>
|
||||
<input type="file" id="fileInput2_${sectionRandomID}" style="display: none;"> </div>
|
||||
</div>
|
||||
</div>tabindex="0"
|
||||
|
||||
<div class="col-lg-5 col-md-5 mt-2">
|
||||
<span>Display Marks</span>
|
||||
@ -2463,7 +2465,7 @@ function addQuestionGroup(idObj)
|
||||
</div>
|
||||
<div class="col-lg-12 col-md-12">
|
||||
<div class="form_box">
|
||||
<label class="titleSpace">Questions Group Title:<span id='partOf_${QuestionGroup_ID}'></span> <input contenteditable="true" style="border: 2px solid #EEECFE;height:34px;width: 200px !important;;margin-left:4px;" class="QuestionsGroupIdset SerialNo" id="Questions_Group_id_${QuestionGroup_ID}" value="${group_question_id}" placeholder="SNo..."> </label>
|
||||
<label class="titleSpace">Questions Group Title:<span id='partOf_${QuestionGroup_ID}'></span> <input contenteditable="true" tabindex="0" style="border: 2px solid #EEECFE;height:34px;width: 200px !important;;margin-left:4px;" class="QuestionsGroupIdset SerialNo" id="Questions_Group_id_${QuestionGroup_ID}" value="${group_question_id}" placeholder="SNo..."> </label>
|
||||
<div class="richText" id="subSection_title_text_${QuestionGroup_ID}" contenteditable="true" style=" border: 2px solid #EEECFE; margin-top: 4px;">${idObj.hasOwnProperty('question_group_obj') ? idObj.question_group_obj.group_title : ""}</div>
|
||||
<input type="file" id="fileInput_${QuestionGroup_ID}" style="display: none;">
|
||||
</div>
|
||||
@ -2472,7 +2474,7 @@ function addQuestionGroup(idObj)
|
||||
<div class="col-lg-12 col-md-12 hideondrag">
|
||||
<div class="form_box">
|
||||
<label class="titleSpace">Questions Group Description:</label>
|
||||
<div class="richText" id="subSection_description_text_${QuestionGroup_ID}" contenteditable="true" style=" border: 2px solid #EEECFE; margin-top: 4px;">${idObj.hasOwnProperty('question_group_obj') ? idObj.question_group_obj.group_description : ""}</div>
|
||||
<div class="richText" id="subSection_description_text_${QuestionGroup_ID}" contenteditable="true" tabindex="0" style=" border: 2px solid #EEECFE; margin-top: 4px;">${idObj.hasOwnProperty('question_group_obj') ? idObj.question_group_obj.group_description : ""}</div>
|
||||
<input type="file" id="fileInput2_${QuestionGroup_ID}" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
@ -2982,9 +2984,9 @@ function groupQuestion(question_id = false, section_id = false , group_question_
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-12" style="margin-top: -20px">
|
||||
<div class="form_box">
|
||||
<label class="titleSpace">Question:<span id='partOf_${addChoiceAreaId}'> <input style=" width: 200px !important;border: 2px solid #EEECFE;height: 37px; margin-left: 4px; margin-top: -29px;" id="QuestionChoiceId_${addChoiceAreaId}" class="QuestionChoiceId SerialNo" contenteditable="true" value="${questionIdS}" placeholder="SNo...."></label>
|
||||
<div class="richText" id="textQuestionName_${addChoiceAreaId}" contenteditable="true" style=" border: 2px solid #EEECFE; margin-top: 4px;">${questionTitle ? questionTitle : ''}</div>
|
||||
<math-field id="textQuestiontitleMath_${addChoiceAreaId}" contenteditable="true">${titleMath == 'Math' ? questionTitle : ''}</math-field>
|
||||
<label class="titleSpace">Question:<span id='partOf_${addChoiceAreaId}'> <input style=" width: 200px !important;border: 2px solid #EEECFE;height: 37px; margin-left: 4px; margin-top: -29px;" id="QuestionChoiceId_${addChoiceAreaId}" class="QuestionChoiceId SerialNo" tabindex="0" contenteditable="true" value="${questionIdS}" placeholder="SNo...."></label>
|
||||
<div class="richText" id="textQuestionName_${addChoiceAreaId}" contenteditable="true" tabindex="0" style=" border: 2px solid #EEECFE; margin-top: 4px;">${questionTitle ? questionTitle : ''}</div>
|
||||
<math-field id="textQuestiontitleMath_${addChoiceAreaId}" contenteditable="true" tabindex="0">${titleMath == 'Math' ? questionTitle : ''}</math-field>
|
||||
<span class="mathQuestions">Math</span> <input class="checkbox" style="width:14px; height:14px" type="checkbox" id="titlemath_${addChoiceAreaId}">
|
||||
<input type="file" id="fileInput_${addChoiceAreaId}" style="display: none;">
|
||||
</div>
|
||||
@ -2993,8 +2995,8 @@ function groupQuestion(question_id = false, section_id = false , group_question_
|
||||
<div class="col-lg-12 col-md-12 hideondrag" style="margin-bottom: 5px">
|
||||
<div class="form_box">
|
||||
<label class="titleSpace">Subtitle:</label>
|
||||
<div class="richText" id="textQuestionSubtitle_${addChoiceAreaId}" contenteditable="true" style=" border: 2px solid #EEECFE; margin-top: 4px;">${questionDescription ? questionDescription : ''}</div>
|
||||
<math-field id="textQuestionSubtitle_math_${addChoiceAreaId}" contenteditable="true">${mathEnabled == 'Math' ? questionDescription : ''}</math-field>
|
||||
<div class="richText" id="textQuestionSubtitle_${addChoiceAreaId}" contenteditable="true" tabindex="0" style=" border: 2px solid #EEECFE; margin-top: 4px;">${questionDescription ? questionDescription : ''}</div>
|
||||
<math-field id="textQuestionSubtitle_math_${addChoiceAreaId}" contenteditable="true" tabindex="0">${mathEnabled == 'Math' ? questionDescription : ''}</math-field>
|
||||
<span class="mathQuestions">Math</span> <input class="checkbox" style="width:14px; height:14px" type="checkbox" id="math_${addChoiceAreaId}">
|
||||
<input type="file" id="fileInput2_${addChoiceAreaId}" style="display: none;">
|
||||
</div>
|
||||
@ -3005,7 +3007,7 @@ function groupQuestion(question_id = false, section_id = false , group_question_
|
||||
<div class="choice row align-items-center" id="deleteChoice_${addChoiceAreaId}">
|
||||
<div class="col-lg-0"><input type="radio" id="radioButton_${addChoiceAreaId}" checked></div>
|
||||
<div class="col-lg-6" style="margin-bottom: 10px">
|
||||
<div class="richText" id="choiceTextField_${addChoiceAreaId}" contenteditable="true" style=" border: 2px solid #EEECFE; width: 100%; margin-top: 10px;">${Choice ? Choice[0].choice_name : ""}</div>
|
||||
<div class="richText" id="choiceTextField_${addChoiceAreaId}" contenteditable="true" tabindex="0" style=" border: 2px solid #EEECFE; width: 100%; margin-top: 10px;">${Choice ? Choice[0].choice_name : ""}</div>
|
||||
<math-field id="choiceTextField_math_${addChoiceAreaId}" style="width: 100%;" contenteditable="true">${Choice ? Choice[0].choice_name : ""}</math-field>
|
||||
<input type="file" id="fileInput3_${addChoiceAreaId}" style="display: none;">
|
||||
</div>
|
||||
@ -3672,7 +3674,7 @@ function addNewChoice(NewaddChoiceAreaId = false, focusval = false, choiceName =
|
||||
<div class="choice row align-items-center" id="newDeleteChoice_`+text_field_created_time+rnd_no+`">
|
||||
<div class="col-lg-0"><input type="radio" id="newChoiceRadioButton_`+text_field_created_time+rnd_no+`" checked ></div>
|
||||
<div class="col-lg-6" style="margin-bottom: 10px">
|
||||
<div class="richText" id="newChoiceTextField_`+text_field_created_time+rnd_no+`" contenteditable="true" style=" border: 2px solid #EEECFE; width: 100%; margin-top: 6px; display:none!important;">${choiceName ? choiceName : ""}</div>
|
||||
<div class="richText" id="newChoiceTextField_`+text_field_created_time+rnd_no+`" contenteditable="true" tabindex="0" style=" border: 2px solid #EEECFE; width: 100%; margin-top: 6px; display:none!important;">${choiceName ? choiceName : ""}</div>
|
||||
<math-field id="newchoiceTextField_math_`+text_field_created_time+rnd_no+`" style="width: 100%;" contenteditable="true">${choiceName ? choiceName : ""}</math-field>
|
||||
<input type="file" id="fileInput_`+text_field_created_time+rnd_no+`" style="display: none;">
|
||||
</div>
|
||||
@ -3986,9 +3988,9 @@ textQuestion +=
|
||||
<div class="col-lg-12 col-md-12" style="margin-top: -20px">
|
||||
<input type="hidden" id="Text_Question_UUID_ID_${addTextQuestionId}" value="${QuestionObj.hasOwnProperty('questionUUID') ? QuestionObj.questionUUID : Text_Question_UUID}">
|
||||
<div class="form_box">
|
||||
<label class="titleSpace">Question:<span id='partOf_${addTextQuestionId}'> <input type='text'style="border: 2px solid #EEECFE; height:34px;width: 200px !important;margin-left: 4px;" id='QuestionTextIdSet_${addTextQuestionId}' class='QuestionTextIdSet SerialNo' contenteditable="true" value="${ssa}" placeholder="SNo...."></label>
|
||||
<label class="titleSpace">Question:<span id='partOf_${addTextQuestionId}'> <input type='text'style="border: 2px solid #EEECFE; height:34px;width: 200px !important;margin-left: 4px;" id='QuestionTextIdSet_${addTextQuestionId}' class='QuestionTextIdSet SerialNo' tabindex="0" contenteditable="true" value="${ssa}" placeholder="SNo...."></label>
|
||||
<div type="text" class="richText" id="textQuestionName_${addTextQuestionId}" contenteditable="true" style=" border: 2px solid #EEECFE; margin-top: 4px;">${QuestionObj.hasOwnProperty('questionTitle') ? QuestionObj.questionTitle : ''}</div>
|
||||
<math-field id="textQuestiontitleMath_${addTextQuestionId}" contenteditable="true">${QuestionObj.titleMath == 'Math' ? QuestionObj.questionTitle : ''}</math-field>
|
||||
<math-field id="textQuestiontitleMath_${addTextQuestionId}" contenteditable="true" tabindex="0">${QuestionObj.titleMath == 'Math' ? QuestionObj.questionTitle : ''}</math-field>
|
||||
<span class="mathQuestions">Math</span> <input class="checkbox" style="width:14px; height:14px" type="checkbox" id="titlemath_${addTextQuestionId}">
|
||||
<input type="file" id="fileInput_${addTextQuestionId}" style="display: none;">
|
||||
</div>
|
||||
@ -5948,20 +5950,14 @@ setInterval(removeNonExistentIdseveryTime, 1000)
|
||||
}else{
|
||||
var checkITag =classname.querySelector('i')
|
||||
|
||||
if (checkITag) {
|
||||
|
||||
} else {
|
||||
if (!checkITag) {
|
||||
const gripIcon = document.createElement('i');
|
||||
gripIcon.className = 'fas fa-grip-horizontal';
|
||||
gripIcon.style.position = 'fixed';
|
||||
gripIcon.style.right = '1260px';
|
||||
// gripIcon.setAttribute('draggable', 'true');
|
||||
|
||||
classname.appendChild(gripIcon);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -5971,104 +5967,88 @@ setInterval(removeNonExistentIdseveryTime, 1000)
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function reduceSapceInMathLiveABC(params) {
|
||||
var elementName= document.querySelector('.ML__keyboard')
|
||||
if(elementName){
|
||||
if (elementName.style.cssText == "--_keyboard-height: calc(382px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0));") {
|
||||
elementName.style.cssText = '--_keyboard-height: calc(314px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0));'
|
||||
}
|
||||
<script>
|
||||
function reduceSapceInMathLiveABC(params) {
|
||||
var elementName= document.querySelector('.ML__keyboard')
|
||||
if(elementName){
|
||||
if (elementName.style.cssText == "--_keyboard-height: calc(382px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0));") {
|
||||
elementName.style.cssText = '--_keyboard-height: calc(314px + var(--_padding-top) + var(--_padding-bottom) + env(safe-area-inset-bottom, 0));'
|
||||
}
|
||||
}
|
||||
setInterval(reduceSapceInMathLiveABC, 500)
|
||||
</script>
|
||||
}
|
||||
setInterval(reduceSapceInMathLiveABC, 500)
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!-- Start this for Show the Items is Exists in App Setting.JSON -->
|
||||
<script>
|
||||
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
mathDisableFunction();
|
||||
}, 1500);
|
||||
function mathDisableFunction() {
|
||||
// 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);
|
||||
return;
|
||||
}
|
||||
const jsonObject = JSON.parse(data);
|
||||
setTimeout(function() {
|
||||
appSettingShow();
|
||||
}, 1500);
|
||||
|
||||
var aa= jsonObject.AppSetting;
|
||||
const inputString = aa[0];
|
||||
console.log(inputString);
|
||||
function appSettingShow() {
|
||||
|
||||
const valuesArray = inputString.split(', ');
|
||||
valuesArray.forEach(value => {
|
||||
|
||||
if(value === 'WorkArea'){
|
||||
var workArea = document.getElementById('sidebarToggle2');
|
||||
if (workArea) {
|
||||
workArea.style.display = 'block';
|
||||
}
|
||||
}else if( value === 'SubTitle'){
|
||||
var subTitles= document.querySelectorAll('label')
|
||||
subTitles.forEach(function (subTitle){
|
||||
if (subTitle.innerHTML == "Subtitle:") {
|
||||
subTitle.parentElement.style= "display:block";
|
||||
}
|
||||
})
|
||||
}else if(value === 'MathCheckbox'){
|
||||
|
||||
const mathNameValues =document.querySelectorAll('.mathQuestions');
|
||||
|
||||
mathNameValues.forEach(function (mathNameValue){
|
||||
mathNameValue.style="display:block";
|
||||
mathNameValue.nextSibling.nextSibling.style = "display:block;width:14px; height:14px";
|
||||
|
||||
})
|
||||
|
||||
const mathNameValuesChoices =document.querySelectorAll('.math');
|
||||
|
||||
mathNameValuesChoices.forEach(function (mathNameValuesChoice){
|
||||
mathNameValuesChoice.style="display:block;";
|
||||
mathNameValuesChoice.parentElement.style="display:flex";
|
||||
mathNameValuesChoice.previousSibling.previousSibling.style = "display:block;width:14px; height:14px";
|
||||
|
||||
})
|
||||
|
||||
}else if(value === 'TextQuestionButton'){
|
||||
var elements = document.querySelectorAll('[title="TextQuestion"]');
|
||||
elements.forEach(function(element) {
|
||||
// Do something with each element, for example, log its inner text
|
||||
var parentElement = element.parentElement;
|
||||
parentElement.style.display= 'block';
|
||||
});
|
||||
|
||||
}else if(value === 'MCQQuestionButton'){
|
||||
var elements = document.querySelectorAll('[title="ChoiceQuestion"]');
|
||||
|
||||
elements.forEach(function(element) {
|
||||
// Do something with each element, for example, log its inner text
|
||||
var parentElement = element.parentElement;
|
||||
|
||||
parentElement.style.display= 'block';
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
const filePath = path.join(__dirname, `./assets/appSetting/AppSetting.json`);
|
||||
fs.readFile(filePath, 'utf8', (err, data) => {
|
||||
if (err) {
|
||||
console.error('Error reading file:', err);
|
||||
return;
|
||||
}
|
||||
document.addEventListener('click', mathDisableFunction);
|
||||
const jsonObject = JSON.parse(data);
|
||||
var aa= jsonObject.AppSetting;
|
||||
const inputString = aa[0];
|
||||
const valuesArray = inputString.split(', ');
|
||||
valuesArray.forEach(value => {
|
||||
if(value === 'WorkArea'){
|
||||
var workArea = document.getElementById('sidebarToggle2');
|
||||
if (workArea) {
|
||||
workArea.style.display = 'block';
|
||||
}
|
||||
}else if( value === 'SubTitle'){
|
||||
var subTitles= document.querySelectorAll('label')
|
||||
subTitles.forEach(function (subTitle){
|
||||
if (subTitle.innerHTML == "Subtitle:") {
|
||||
subTitle.parentElement.style= "display:block";
|
||||
}
|
||||
})
|
||||
}else if(value === 'MathCheckbox'){
|
||||
const mathNameValues =document.querySelectorAll('.mathQuestions');
|
||||
mathNameValues.forEach(function (mathNameValue){
|
||||
mathNameValue.style="display:block";
|
||||
mathNameValue.nextSibling.nextSibling.style = "display:block;width:14px; height:14px";
|
||||
})
|
||||
const mathNameValuesChoices =document.querySelectorAll('.math');
|
||||
mathNameValuesChoices.forEach(function (mathNameValuesChoice){
|
||||
mathNameValuesChoice.style="display:block;";
|
||||
mathNameValuesChoice.parentElement.style="display:flex";
|
||||
mathNameValuesChoice.previousSibling.previousSibling.style = "display:block;width:14px; height:14px";
|
||||
})
|
||||
}else if(value === 'TextQuestionButton'){
|
||||
var elements = document.querySelectorAll('[title="TextQuestion"]');
|
||||
elements.forEach(function(element) {
|
||||
var parentElement = element.parentElement;
|
||||
parentElement.style.display= 'block';
|
||||
});
|
||||
}else if(value === 'MCQQuestionButton'){
|
||||
var elements = document.querySelectorAll('[title="ChoiceQuestion"]');
|
||||
elements.forEach(function(element) {
|
||||
var parentElement = element.parentElement;
|
||||
parentElement.style.display= 'block';
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
document.addEventListener('click', appSettingShow);
|
||||
</script>
|
||||
<!-- End this for Show the Items is Exists in App Setting.JSON -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- //Start this for Fcous where drag and drop using Arrow -->
|
||||
<!-- Start this for Focus where drag and drop using Arrow -->
|
||||
<script>
|
||||
document.addEventListener('click', handleClick);
|
||||
|
||||
@ -6082,7 +6062,7 @@ setInterval(removeNonExistentIdseveryTime, 1000)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<!-- //End this for Focus where drag and drop using Arrow -->
|
||||
<!-- End this for Focus where drag and drop using Arrow -->
|
||||
|
||||
|
||||
<!-- Start this for Highlight the All Div when its focus -->
|
||||
@ -6096,67 +6076,155 @@ setInterval(removeNonExistentIdseveryTime, 1000)
|
||||
event.target.classList.remove('focused');
|
||||
}, true);
|
||||
</script>
|
||||
<!-- //End this for Highlight the All Div when its focus -->
|
||||
<!-- End this for Highlight the All Div when its focus -->
|
||||
|
||||
|
||||
|
||||
<!-- Start This For Hide Items the WorkArea, SubTitle, Text And Choice Question, MathBox -->
|
||||
<script>
|
||||
setTimeout(function() {
|
||||
appSettingHide();
|
||||
}, 2000);
|
||||
|
||||
|
||||
function appSettingHide(){
|
||||
|
||||
const filePath = path.join(__dirname, `./assets/appSetting/AppSettingUnchecked.json`);
|
||||
fs.readFile(filePath, 'utf8', (err, data) => {
|
||||
if (err) {
|
||||
console.error('Error reading file:', err);
|
||||
return;
|
||||
}
|
||||
const jsonObject = JSON.parse(data);
|
||||
var aa= jsonObject.AppSetting;
|
||||
const inputString = aa[0];
|
||||
const valuesArray = inputString.split(',');
|
||||
console.log(valuesArray);
|
||||
|
||||
valuesArray.forEach(value => {
|
||||
console.log(value);
|
||||
if(value === 'WorkArea'){
|
||||
const mathNameValuesChoices =document.querySelectorAll('.math');
|
||||
mathNameValuesChoices.forEach(function (mathNameValuesChoice){
|
||||
mathNameValuesChoice.style="display:none;";
|
||||
mathNameValuesChoice.previousSibling.previousSibling.style = "display:none;";
|
||||
})
|
||||
}else if( value === 'SubTitle'){
|
||||
|
||||
var workArea = document.getElementById('sidebarToggle2');
|
||||
workArea.style.display = 'none';
|
||||
var subTitles= document.querySelectorAll('label')
|
||||
subTitles.forEach(function (subTitle){
|
||||
if (subTitle.innerHTML == "Subtitle:") {
|
||||
subTitle.parentElement.style= "display:none";
|
||||
}
|
||||
})
|
||||
}else if(value === 'MathCheckbox'){
|
||||
|
||||
const mathNameValues =document.querySelectorAll('.mathQuestions');
|
||||
mathNameValues.forEach(function (mathNameValue){
|
||||
mathNameValue.style="display:none;";
|
||||
mathNameValue.nextSibling.nextSibling.style = "display:none;width:14px; height:14px";
|
||||
})
|
||||
|
||||
}else if(value === 'TextQuestionButton'){
|
||||
|
||||
|
||||
var elements = document.querySelectorAll('[title="TextQuestion"]');
|
||||
elements.forEach(function(element) {
|
||||
var parentElement = element.parentElement;
|
||||
parentElement.style.display= 'none';
|
||||
});
|
||||
}else if(value === 'MCQQuestionButton'){
|
||||
var elements = document.querySelectorAll('[title="ChoiceQuestion"]');
|
||||
elements.forEach(function(element) {
|
||||
var parentElement = element.parentElement;
|
||||
parentElement.style.display= 'none';
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
document.addEventListener('click', appSettingHide);
|
||||
</script>
|
||||
<!-- End This For Hide Items the WorkArea, SubTitle, Text And Choice Question, MathBox -->
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
// Find all div elements with contenteditable attribute set to true
|
||||
const editableDivs = document.querySelectorAll('div[contenteditable="true"]');
|
||||
console.log(editableDivs);
|
||||
|
||||
// Add event listener to each editable div
|
||||
editableDivs.forEach(function(div) {
|
||||
div.addEventListener("keydown", function(event) {
|
||||
var isContentEditable = this.getAttribute("contenteditable") === "true";
|
||||
if (isContentEditable && event.key === "Tab") {
|
||||
// Custom tab behavior here
|
||||
event.preventDefault(); // Prevent default tab behavior
|
||||
// Implement your custom tab behavior
|
||||
// For example, you can insert a tab character or focus on the next editable element
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
setTimeout(function() {
|
||||
hidethefunction();
|
||||
}, 1500);
|
||||
function hidethefunction() {
|
||||
setTimeout(nagvigationAlgimnetDragandDrop, 2000);
|
||||
|
||||
var workArea = document.getElementById('sidebarToggle2');
|
||||
workArea.style.display = 'none';
|
||||
function nagvigationAlgimnetDragandDrop() {
|
||||
var element =document.getElementById('questionPaper')
|
||||
const contentVisibleElement = element.querySelector('.content.visible');
|
||||
|
||||
if (contentVisibleElement) {
|
||||
const children = contentVisibleElement.children;
|
||||
|
||||
var subTitles= document.querySelectorAll('label')
|
||||
subTitles.forEach(function (subTitle){
|
||||
if (subTitle.innerHTML == "Subtitle:") {
|
||||
subTitle.parentElement.style= "display:none";
|
||||
}
|
||||
})
|
||||
Array.from(children).forEach(childElement => {
|
||||
if (childElement.classList.contains('content')) {
|
||||
childElement.style.width ='249px'
|
||||
console.log(childElement);
|
||||
const children2s = childElement.children;
|
||||
Array.from(children2s).forEach(childElement2 => {
|
||||
if (childElement2.classList.contains('content') ){
|
||||
childElement2.style.width ='241px'
|
||||
const children3s = childElement2.children;
|
||||
Array.from(children3s).forEach(childElement3 => {
|
||||
if (childElement3.classList.contains('content') ){
|
||||
childElement3.style.width ='232px'
|
||||
const children4s = childElement3.children;
|
||||
Array.from(children4s).forEach(childElement4 => {
|
||||
if (childElement4.classList.contains('content') ){
|
||||
childElement4.style.width ='222px'
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
childElement.style.width ='261px'
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log("No element with class 'content visible' found");
|
||||
}
|
||||
}
|
||||
|
||||
const mathNameValues =document.querySelectorAll('.mathQuestions');
|
||||
|
||||
mathNameValues.forEach(function (mathNameValue){
|
||||
mathNameValue.style="display:none;";
|
||||
mathNameValue.nextSibling.nextSibling.style = "display:none;width:14px; height:14px";
|
||||
|
||||
})
|
||||
|
||||
|
||||
const mathNameValuesChoices =document.querySelectorAll('.math');
|
||||
|
||||
mathNameValuesChoices.forEach(function (mathNameValuesChoice){
|
||||
mathNameValuesChoice.style="display:none;";
|
||||
mathNameValuesChoice.previousSibling.previousSibling.style = "display:none;";
|
||||
|
||||
})
|
||||
|
||||
|
||||
var elements = document.querySelectorAll('[title="TextQuestion"]');
|
||||
elements.forEach(function(element) {
|
||||
// Do something with each element, for example, log its inner text
|
||||
var parentElement = element.parentElement;
|
||||
parentElement.style.display= 'none';
|
||||
});
|
||||
|
||||
|
||||
|
||||
var elements = document.querySelectorAll('[title="ChoiceQuestion"]');
|
||||
|
||||
elements.forEach(function(element) {
|
||||
// Do something with each element, for example, log its inner text
|
||||
var parentElement = element.parentElement;
|
||||
|
||||
parentElement.style.display= 'none';
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
document.addEventListener('click', hidethefunction);
|
||||
document.addEventListener('click', nagvigationAlgimnetDragandDrop);
|
||||
|
||||
|
||||
|
||||
|
||||
1
assets/appSetting/AppSetting.json
Normal file
1
assets/appSetting/AppSetting.json
Normal file
@ -0,0 +1 @@
|
||||
{"AppSetting":["WorkArea,SubTitle,MathCheckbox,TextQuestionButton,MCQQuestionButton"]}
|
||||
@ -195,6 +195,7 @@ var draggedItem = null;
|
||||
//THis function is Replicate the Nav Pane Change
|
||||
function insertElement(dragStartElement, dragDropElement, position){
|
||||
|
||||
|
||||
var mainpaneSection = document.getElementById('addNewSection')
|
||||
var matches = dragDropElement.id.match(/([a-zA-Z_]+)([0-9]+)/);
|
||||
|
||||
@ -311,5 +312,17 @@ var draggedItem = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const strippedId = dragStartElement.id.replace('nav_', '');
|
||||
console.log(strippedId);
|
||||
|
||||
const element = document.getElementById(`${strippedId}`);
|
||||
console.log(element);
|
||||
if (element) {
|
||||
|
||||
element.focus();
|
||||
element.scrollIntoView({ behavior: "smooth", block: "center" });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -721,8 +721,8 @@ function duplicateFile(oldfilename) {
|
||||
|
||||
|
||||
const newXmlFileNameParts = entervalue;
|
||||
const newXmlBaseName = newXmlFileNameParts[0];
|
||||
const newJsonFileName = `${newXmlBaseName}_answer.json`;
|
||||
// const newXmlBaseName = newXmlFileNameParts[0];
|
||||
const newJsonFileName = `${newXmlFileNameParts}_answer.json`;
|
||||
|
||||
var fileList = findFile(jsonFilePath);
|
||||
|
||||
@ -965,18 +965,36 @@ function closePopup() {
|
||||
|
||||
// Function to submit selected values to server
|
||||
function submitValues() {
|
||||
const selectedValues = Array.from(document.querySelectorAll('input[class=option]:checked')).map(input => input.value);
|
||||
// const selectedValues = Array.from(document.querySelectorAll('input[class=option]:checked')).map(input => input.value);
|
||||
|
||||
const allOptions = Array.from(document.querySelectorAll('input[class=option]'));
|
||||
|
||||
const uncheckedValues = allOptions.filter(input => !input.checked).map(input => input.value);
|
||||
|
||||
const checkedValues = allOptions.filter(input => input.checked).map(input => input.value);
|
||||
|
||||
|
||||
const array = selectedValues;
|
||||
const string = array.join(', ');
|
||||
|
||||
const array = checkedValues;
|
||||
const string = array.join(',');
|
||||
const jsonString = JSON.stringify(string);
|
||||
console.log(jsonString);
|
||||
const wrappedJsonString = `{"AppSetting":[${jsonString}]}`;
|
||||
|
||||
|
||||
//ForUnchecked
|
||||
const string2 = uncheckedValues.join(',')
|
||||
const jsonString2 = JSON.stringify(string2);
|
||||
const wrappedJsonString2 = `{"AppSetting":[${jsonString2}]}`;
|
||||
|
||||
|
||||
const newPath = xmlPath.replace(/\\xml\\/i, '\\');
|
||||
|
||||
fs.writeFileSync(`AppSetting.json`, wrappedJsonString, 'utf-8');
|
||||
const savexmlpath = path.join(__dirname, `./assets/appSetting/AppSetting.json`);
|
||||
const savexmlpath2 = path.join(__dirname, `./assets/appSetting/AppSettingUnchecked.json`);
|
||||
|
||||
|
||||
fs.writeFileSync(savexmlpath, wrappedJsonString, 'utf-8');
|
||||
fs.writeFileSync(savexmlpath2, wrappedJsonString2, 'utf-8');
|
||||
|
||||
|
||||
}
|
||||
@ -986,9 +1004,7 @@ function submitValues() {
|
||||
|
||||
<script>
|
||||
function popupCheck() {
|
||||
// const parentFolder = path.dirname(__filename);
|
||||
// const filePath = path.join(parentFolder, 'mathEnable.json');
|
||||
const filePath = `AppSetting.json`;
|
||||
const filePath = path.join(__dirname, `./assets/appSetting/AppSetting.json`);
|
||||
fs.readFile(filePath, 'utf8', (err, data) => {
|
||||
if (err) {
|
||||
console.error('Error reading file:', err);
|
||||
@ -998,11 +1014,9 @@ function submitValues() {
|
||||
|
||||
var aa= jsonObject.AppSetting;
|
||||
const inputString = aa[0];
|
||||
console.log(inputString);
|
||||
|
||||
const valuesArray = inputString.split(', ');
|
||||
const valuesArray = inputString.split(',');
|
||||
valuesArray.forEach(value => {
|
||||
console.log(value);
|
||||
|
||||
if(value === 'WorkArea'){
|
||||
var elements = document.querySelector('[name="WorkArea"]');
|
||||
|
||||
10
package.json
10
package.json
@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"test": "start",
|
||||
"start": "electron .",
|
||||
"build": "cross-env NODE_ENV=production electron-packager . ProjectB --platform=win32 --arch=x64",
|
||||
"build": "cross-env NODE_ENV=production electron-packager . NexaAuthor --platform=win32 --arch=x64",
|
||||
"convertEnvBase64": "node envConvertBasetoString.js"
|
||||
},
|
||||
"author": "VenbaInfoTech",
|
||||
@ -44,14 +44,6 @@
|
||||
"mathjax-node": "^2.1.1",
|
||||
"mathlive": "^0.95.5",
|
||||
"os": "^0.1.2",
|
||||
"quill": "^1.3.7",
|
||||
"quill-better-table": "^1.1.0",
|
||||
"quill-better-table-picker": "^1.0.2",
|
||||
"quill-image-resize": "^3.0.9",
|
||||
"quill-image-resize-module": "^3.0.0",
|
||||
"quill-resize-module": "^1.2.4",
|
||||
"quill-table": "^1.0.0",
|
||||
"quill1-table": "^1.7.2",
|
||||
"sweetalert": "^2.1.2",
|
||||
"sweetalert2": "^11.6.13",
|
||||
"tippy.js": "^6.3.7",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user