repush : RV

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

View File

@ -4605,7 +4605,7 @@ function check_Empty_Question()
{ {
// console.log("Check empty if"); // console.log("Check empty if");
if(Id === 'Question_title'){ 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.scrollIntoView({ behavior: "smooth", block: "center" });
elementID.focus(); elementID.focus();
}else{ }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 //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) { function check_Remove_Empty_Question(IdToRemove , DeleteElement=0) {
// console.log('IdToRemove : ', IdToRemove); console.log('IdToRemove : ', IdToRemove);
var attrId; var attrId;
var title_id = localStorage.getItem('JSON_FOR_EMPTY_QUESTION'); var title_id = localStorage.getItem('JSON_FOR_EMPTY_QUESTION');
var attrId= ''; var attrId= '';
@ -4680,7 +4680,7 @@ function check_Remove_Empty_Question(IdToRemove , DeleteElement=0) {
attrId = focus; attrId = focus;
} }
} }
// console.log('attrId : ', attrId); console.log('attrId : ', attrId);
var parsedArray = []; var parsedArray = [];
@ -4689,7 +4689,7 @@ function check_Remove_Empty_Question(IdToRemove , DeleteElement=0) {
parsedArray = JSON.parse(title_id); 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>') { if(attrId === '' || attrId === '<p><br></p>' || attrId === '<p><br></p>') {
@ -4703,7 +4703,6 @@ function check_Remove_Empty_Question(IdToRemove , DeleteElement=0) {
} else{ } else{
// alert('2'); // alert('2');
for (let i = 0; i < parsedArray.length; i++) { for (let i = 0; i < parsedArray.length; i++) {
const Id = parsedArray[i]; const Id = parsedArray[i];
const element = document.getElementById(Id); const element = document.getElementById(Id);
@ -4745,7 +4744,9 @@ function check_Remove_Empty_Question(IdToRemove , DeleteElement=0) {
collect_Empty_Question_Id(newArrayString); 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); // console.log('check empty question : ', attrId);
if (!parsedArray.includes(IdToRemove)) { if (!parsedArray.includes(IdToRemove)) {
var newArray = parsedArray.push(IdToRemove); var newArray = parsedArray.push(IdToRemove);