repush : RV

This commit is contained in:
VENKATESHWARAN 2024-01-25 16:07:26 +05:30
parent 702e74496b
commit 567694928a

View File

@ -1947,7 +1947,7 @@ array_of_Id.push('Max_Marks');
array_of_Id.push('Question_title')
const arrayString = JSON.stringify(array_of_Id);
collect_Empty_Question_Id(arrayString);
})
})
@ -4605,7 +4605,7 @@ function check_Empty_Question()
{
// console.log("Check empty if");
if(Id === 'Question_title'){
var elementID = document.getElementById('Question_title_workarea')
var elementID = document.querySelector('.jodit-workplace').querySelector('.jodit-wysiwyg')
elementID.scrollIntoView({ behavior: "smooth", block: "center" });
elementID.focus();
}else{
@ -4647,7 +4647,7 @@ function check_Empty_Question()
//if the Question has not empty then remove the id from the array if empty than again push id to array
function check_Remove_Empty_Question(IdToRemove , DeleteElement=0) {
// console.log('IdToRemove : ', IdToRemove);
console.log('IdToRemove : ', IdToRemove);
var attrId;
var title_id = localStorage.getItem('JSON_FOR_EMPTY_QUESTION');
var attrId= '';
@ -4680,7 +4680,7 @@ function check_Remove_Empty_Question(IdToRemove , DeleteElement=0) {
attrId = focus;
}
}
// console.log('attrId : ', attrId);
console.log('attrId : ', attrId);
var parsedArray = [];
@ -4689,7 +4689,7 @@ function check_Remove_Empty_Question(IdToRemove , DeleteElement=0) {
parsedArray = JSON.parse(title_id);
// console.log('attrId 2 : ', attrId);
console.log('attrId 2 : ', attrId);
if(attrId === '' || attrId === '<p><br></p>' || attrId === '<p><br></p>') {
@ -4702,8 +4702,7 @@ function check_Remove_Empty_Question(IdToRemove , DeleteElement=0) {
} else{
// alert('2');
// alert('2');
for (let i = 0; i < parsedArray.length; i++) {
const Id = parsedArray[i];
const element = document.getElementById(Id);
@ -4745,7 +4744,9 @@ function check_Remove_Empty_Question(IdToRemove , DeleteElement=0) {
collect_Empty_Question_Id(newArrayString);
}
}
else if(attrId === '' || attrId == '<p><br></p>') {
else if(attrId === '' || attrId == '<p><br></p>' || attrId === '<p><br></p>') {
// alert('3')
// console.log('check empty question : ', attrId);
if (!parsedArray.includes(IdToRemove)) {
var newArray = parsedArray.push(IdToRemove);