Tracker_Issue_Fix : RV

This commit is contained in:
VENKATESHWARAN 2024-01-24 14:22:57 +05:30
parent 40aa6fe055
commit cc9f3650fe
5 changed files with 101 additions and 54 deletions

View File

@ -353,7 +353,7 @@ function QuestionPaperPreview(jsonData){
// choisealgin =26 // choisealgin =26
choisealgin =52 choisealgin =52
} else if (currentSno_length1 == 2) { } else if (currentSno_length1 == 2) {
choisealgin =25 choisealgin = 52
}else if(currentSno_length1 == 3){ }else if(currentSno_length1 == 3){
choisealgin =33 choisealgin =33
}else if(currentSno_length1 == 4) { }else if(currentSno_length1 == 4) {

View File

@ -75,6 +75,7 @@
.question_Text img{ .question_Text img{
margin-top: 30px; margin-top: 30px;
margin-bottom: 15px;
} }
@ -318,6 +319,8 @@
margin-top: 20px; margin-top: 20px;
margin-left: 45px; margin-left: 45px;
inline-size: 790px; inline-size: 790px;
position: relative;
bottom: 50px;
} /* Change there aadhavan 10px*/ } /* Change there aadhavan 10px*/
.text-option-align2 p{ .text-option-align2 p{
margin:0; margin:0;
@ -356,12 +359,13 @@
.section-Description{ .section-Description{
inline-size: 680px; inline-size: 680px;
/* overflow-wrap: break-word; /* overflow-wrap: break-word;
hyphens: manual; */ hyphens: manual; */
text-wrap: wrap; text-wrap: wrap;
/* display: inline-flex; */ /* display: inline-flex; */
/* margin-right: 10px; */ /* margin-right: 10px; */
margin-bottom: -40px; /* margin-bottom: -40px; */
margin-bottom: 10px;
} }
.question-Description{ .question-Description{
inline-size: 660px; inline-size: 660px;
@ -510,7 +514,8 @@ math {
</div> </div>
<!-- jquery js --> <!-- jquery js -->
<script src="./node_modules/jquery/dist/jquery.min.js" onload="window.$ = window.jQuery = module.exports;"></script> <script src="assets/js/vendor/jquery-3.2.1.min.js" onload="window.$ = window.jQuery = module.exports;"></script>
<!-- <script src="./node_modules/jquery/dist/jquery.min.js" onload="window.$ = window.jQuery = module.exports;"></script> -->
<!-- mathjax --> <!-- mathjax -->
<script src="./node_modules/mathjax/es5/tex-chtml-full.js"></script> <script src="./node_modules/mathjax/es5/tex-chtml-full.js"></script>
<!-- bootstrap js --> <!-- bootstrap js -->
@ -534,7 +539,7 @@ math {
<!-- venobox min js --> <!-- venobox min js -->
<script src="venobox/venobox.min.js"></script> <script src="venobox/venobox.min.js"></script>
<!-- isotope js --> <!-- isotope js -->
<script src="assets/js/isotope.pkgd.min.js"></script> <!-- <script src="assets/js/isotope.pkgd.min.js"></script> -->
<!-- jquery nivo slider pack js --> <!-- jquery nivo slider pack js -->
<script src="assets/js/jquery.nivo.slider.pack.js"></script> <script src="assets/js/jquery.nivo.slider.pack.js"></script>
<!-- jquery meanmenu js --> <!-- jquery meanmenu js -->

View File

@ -1303,7 +1303,6 @@ async function convertToLatex(text, mathstatus) {
$(document).ready(function(){ $(document).ready(function(){
var toolbar = "bold,italic,underline,strikethrough,|,superscript,subscript,|,table,align,"; var toolbar = "bold,italic,underline,strikethrough,|,superscript,subscript,|,table,align,";
var toolbar2 = "bold,italic,underline,strikethrough,|,superscript,subscript,|,align,"; var toolbar2 = "bold,italic,underline,strikethrough,|,superscript,subscript,|,align,";
const editor = Jodit.make("#Question_title", { const editor = Jodit.make("#Question_title", {
@ -1314,6 +1313,17 @@ const editor = Jodit.make("#Question_title", {
toolbarAdaptive:false, toolbarAdaptive:false,
saveHeightInStorage: true, saveHeightInStorage: true,
minHeight: 40, minHeight: 40,
extraButtons: [
{
name: 'info',
iconURL: 'assets/images/image-solid.svg', // Replace with the actual icon URL
exec: function (editor) {
const fileInput = document.getElementById("Question_title_fileInput");
fileInput.click();
},
},
],
}); });
var chat_Div = $('#Question_title'); var chat_Div = $('#Question_title');
@ -1344,6 +1354,17 @@ const editor2 = Jodit.make("#Question_description", {
toolbarAdaptive:false, toolbarAdaptive:false,
saveHeightInStorage: true, saveHeightInStorage: true,
minHeight: 40, minHeight: 40,
extraButtons: [
{
name: 'info',
iconURL: 'assets/images/image-solid.svg', // Replace with the actual icon URL
exec: function (editor2) {
const fileInput2 = document.getElementById("Question_description_fileInput");
fileInput2.click();
},
},
],
}); });
@ -1673,6 +1694,7 @@ document.addEventListener('DOMContentLoaded', function () {
function editPreview() { function editPreview() {
var title_id = localStorage.getItem('JSON_FOR_EMPTY_QUESTION'); var title_id = localStorage.getItem('JSON_FOR_EMPTY_QUESTION');
console.log(title_id)
var count = "";//XmlPath get from .env var count = "";//XmlPath get from .env
// const decode = require('./decode'); // const decode = require('./decode');
if(title_id !== '' && title_id !== null){ if(title_id !== '' && title_id !== null){
@ -1687,7 +1709,7 @@ document.addEventListener('DOMContentLoaded', function () {
const saveButton = document.getElementById('SaveButton'); const saveButton = document.getElementById('SaveButton');
if (saveButton) { if (saveButton) {
saveFile() saveFile()
saveButton.click(); // saveButton.click();
if (count == 0) { if (count == 0) {
setTimeout(function() { setTimeout(function() {
var popupInput = document.getElementById("swal2-input"); var popupInput = document.getElementById("swal2-input");
@ -1718,7 +1740,7 @@ document.addEventListener('DOMContentLoaded', function () {
const saveButton = document.getElementById('SaveButton'); const saveButton = document.getElementById('SaveButton');
if (saveButton) { if (saveButton) {
saveFile() saveFile()
saveButton.click(); // saveButton.click();
setTimeout(function() { setTimeout(function() {
var popupInput = document.getElementById("swal2-input"); var popupInput = document.getElementById("swal2-input");
var submitButton = document.querySelector(".swal2-confirm.swal2-styled"); var submitButton = document.querySelector(".swal2-confirm.swal2-styled");
@ -1828,9 +1850,10 @@ function loadXML(xmlFileName) {
// Function for Save the XML File // Function for Save the XML File
function saveFile(flag=0) { function saveFile(flag=0) {
console.log("SaveFile");
// console.log("SaveFile");
var title_id = localStorage.getItem('JSON_FOR_EMPTY_QUESTION'); var title_id = localStorage.getItem('JSON_FOR_EMPTY_QUESTION');
console.log('JSON_FOR_EMPTY_QUESTION', title_id); // console.log('JSON_FOR_EMPTY_QUESTION', title_id);
var count = ""; var count = "";
if(title_id !== '' && title_id !== null) if(title_id !== '' && title_id !== null)
{ {
@ -3061,6 +3084,7 @@ function groupQuestion(question_id = false, section_id = false , group_question_
newArray.push(idToAdd); newArray.push(idToAdd);
localStorage.setItem('JSON_FOR_EMPTY_QUESTION', JSON.stringify(newArray)); localStorage.setItem('JSON_FOR_EMPTY_QUESTION', JSON.stringify(newArray));
check_Remove_Empty_Question(idToAdd);
console.log('Modified Array:', newArray); console.log('Modified Array:', newArray);
console.log('Updated local storage:', localStorage.getItem('JSON_FOR_EMPTY_QUESTION')); console.log('Updated local storage:', localStorage.getItem('JSON_FOR_EMPTY_QUESTION'));
@ -3085,6 +3109,7 @@ function groupQuestion(question_id = false, section_id = false , group_question_
newArray2.push(idToAdd2); newArray2.push(idToAdd2);
localStorage.setItem('JSON_FOR_EMPTY_QUESTION', JSON.stringify(newArray2)); localStorage.setItem('JSON_FOR_EMPTY_QUESTION', JSON.stringify(newArray2));
check_Remove_Empty_Question(idToAdd2);
console.log('Modified Array 2 :', newArray2); console.log('Modified Array 2 :', newArray2);
console.log('Updated local storage 2 :', localStorage.getItem('JSON_FOR_EMPTY_QUESTION')); console.log('Updated local storage 2 :', localStorage.getItem('JSON_FOR_EMPTY_QUESTION'));
} }
@ -3650,12 +3675,7 @@ function addNewChoice(NewaddChoiceAreaId = false, focusval = false, choiceName =
NewaddChoiceAreaId.insertAdjacentHTML('beforeend', addChoice); NewaddChoiceAreaId.insertAdjacentHTML('beforeend', addChoice);
} }
var newChoiceId = document.getElementById('newChoiceTextField_'+text_field_created_time+rnd_no);
newChoiceId.style.setProperty('display', 'none', 'important');
if(focusval !== false)
{
newChoiceId.focus(); //these lines are create a new choice field to focus that field
}
var newChoiceCommentButtonId = document.getElementById('newChoiceCommentButton_'+text_field_created_time+rnd_no); var newChoiceCommentButtonId = document.getElementById('newChoiceCommentButton_'+text_field_created_time+rnd_no);
var newChoiceCommentFieldId = document.getElementById('newChoiceCommentField_'+text_field_created_time+rnd_no); var newChoiceCommentFieldId = document.getElementById('newChoiceCommentField_'+text_field_created_time+rnd_no);
@ -3698,7 +3718,7 @@ $(newChoiceDeleteButtonId).on('click', function() {
var chat_Div = $(newChoiceTextField); var chat_Div = $(newChoiceTextField);
var chat_previousDiv = chat_Div.prev(); var chat_previousDiv = chat_Div.prev();
console.log() console.log()
var addChoiceValueId = 'addChoiceValue'+text_field_created_time+rnd_no var addChoiceValueId = 'addChoiceValue_'+text_field_created_time+rnd_no
chat_previousDiv.attr("id", addChoiceValueId); chat_previousDiv.attr("id", addChoiceValueId);
var fileInputId = 'fileInput_'+text_field_created_time+rnd_no; var fileInputId = 'fileInput_'+text_field_created_time+rnd_no;
@ -3736,12 +3756,16 @@ $(newChoiceDeleteButtonId).on('click', function() {
}); });
// var newchoiceFieldId = 'newChoiceTextField_'+text_field_created_time+rnd_no; var newChoiceId = document.getElementById('newChoiceTextField_'+text_field_created_time+rnd_no);
// var newchoiceTextField_Div = document.getElementById(newchoiceFieldId);
// var newchoiceTextField_previousDiv = $(newchoiceTextField_Div).prev();
// var newChoiceTextNewRTEId = "newChoiceTextField_rtc_"+text_field_created_time+rnd_no;
// newchoiceTextField_previousDiv.attr("id", newChoiceTextNewRTEId);
var choicePreviousDiv = document.getElementById(addChoiceValueId);
console.log(choicePreviousDiv)
choiceWorkField = choicePreviousDiv.querySelector('.jodit-workplace').querySelector('.jodit-wysiwyg');
newChoiceId.style.setProperty('display', 'none', 'important');
if(focusval !== false)
{
newChoiceId.focus();
}
Choice_description_workarea[0].addEventListener('focus', function() { Choice_description_workarea[0].addEventListener('focus', function() {
@ -4033,6 +4057,7 @@ array_of_Id.push('textQuestionName_' + addTextQuestionId);
newArray.push(idToAdd); newArray.push(idToAdd);
localStorage.setItem('JSON_FOR_EMPTY_QUESTION', JSON.stringify(newArray)); localStorage.setItem('JSON_FOR_EMPTY_QUESTION', JSON.stringify(newArray));
check_Remove_Empty_Question(idToAdd);
console.log('Modified Array:', newArray); console.log('Modified Array:', newArray);
console.log('Updated local storage:', localStorage.getItem('JSON_FOR_EMPTY_QUESTION')); console.log('Updated local storage:', localStorage.getItem('JSON_FOR_EMPTY_QUESTION'));
@ -4051,6 +4076,7 @@ array_of_Id.push('textQuestionName_' + addTextQuestionId);
newArray2.push(idToAdd2); newArray2.push(idToAdd2);
localStorage.setItem('JSON_FOR_EMPTY_QUESTION', JSON.stringify(newArray2)); localStorage.setItem('JSON_FOR_EMPTY_QUESTION', JSON.stringify(newArray2));
check_Remove_Empty_Question(idToAdd2);
console.log('Modified Array 2 :', newArray2); console.log('Modified Array 2 :', newArray2);
console.log('Updated local storage 2 :', localStorage.getItem('JSON_FOR_EMPTY_QUESTION')); console.log('Updated local storage 2 :', localStorage.getItem('JSON_FOR_EMPTY_QUESTION'));
@ -4552,7 +4578,7 @@ function check_Empty_Question()
parsedArray.forEach(function(Id, index,array) { parsedArray.forEach(function(Id, index,array) {
var getMathFiled = Id.replace(/\d/g, ''); var getMathFiled = Id.replace(/\d/g, '');
console.log('getMathFiled : ', getMathFiled) // console.log('getMathFiled : ', getMathFiled)
if (index === array.length - 1) { if (index === array.length - 1) {
var idclass= document.getElementById(Id); var idclass= document.getElementById(Id);
@ -4574,7 +4600,6 @@ function check_Empty_Question()
}else{ }else{
const previousElement = elementid.previousElementSibling; const previousElement = elementid.previousElementSibling;
console.log(previousElement);
if (previousElement == null) { if (previousElement == null) {
attrId =elementid; attrId =elementid;
} else { } else {
@ -4600,10 +4625,10 @@ function check_Empty_Question()
document.getElementById(Id).focus(); document.getElementById(Id).focus();
}else if(attrId == '1'){ }else if(attrId == '1'){
var anchorElement = document.getElementById("editPreview"); var anchorElement = document.getElementById("editPreview");
if (anchorElement) { if (anchorElement) {
anchorElement.click(); anchorElement.click();
// saveButton.click(); // saveButton.click();
} }
} }
else{ else{
// console.log("Check empty Last else"); // console.log("Check empty Last else");
@ -4690,7 +4715,7 @@ function check_Remove_Empty_Question(IdToRemove , DeleteElement=0) {
i--; i--;
} }
}else if(Id === IdToRemove){ }else if(Id === IdToRemove){
console.log('Id === IdToRemove'); // console.log('Id === IdToRemove');
parsedArray.splice(i, 1); parsedArray.splice(i, 1);
i--; i--;
} }
@ -4840,10 +4865,10 @@ function ReArrangeQuestionsGroup(e){
function scrollElement(elementId){ function scrollElement(elementId){
console.log('auto redirect '); // console.log('auto redirect ');
console.log(elementId); // console.log(elementId);
const element = document.getElementById(elementId); const element = document.getElementById(elementId);
console.log(element); // console.log(element);
element.scrollIntoView({ behavior: "smooth", block: "center" }); element.scrollIntoView({ behavior: "smooth", block: "center" });
} }
@ -4987,16 +5012,17 @@ function removeClonedTextQuestion(index)
var element = document.getElementById('removeAndCloneTextQuestion_'+ index); var element = document.getElementById('removeAndCloneTextQuestion_'+ index);
if (element) { if (element) {
var textQuestionTitle = 'textQuestionName_'+index; // var textQuestionTitle = 'textQuestionName_'+index;
check_Remove_Empty_Question(textQuestionTitle,1); // check_Remove_Empty_Question(textQuestionTitle,1);
var textQuestionSerialNo = 'QuestionTextIdSet_'+index; // var textQuestionSerialNo = 'QuestionTextIdSet_'+index;
check_Remove_Empty_Question(textQuestionSerialNo,1); // check_Remove_Empty_Question(textQuestionSerialNo,1);
var myArray = localStorage.getItem('JSON_FOR_EMPTY_QUESTION'); var myArray = localStorage.getItem('JSON_FOR_EMPTY_QUESTION');
if(myArray !== null && myArray !== undefined){ if(myArray !== null && myArray !== undefined){
var idOfArray = removeNonExistentIds(myArray) var idOfArray = removeNonExistentIds(myArray)
console.log(idOfArray); // console.log(idOfArray);
localStorage.setItem('JSON_FOR_EMPTY_QUESTION', JSON.stringify(idOfArray)); localStorage.setItem('JSON_FOR_EMPTY_QUESTION', JSON.stringify(idOfArray));
// console.log(localStorage.getItem('JSON_FOR_EMPTY_QUESTION'));
} }
element.remove(); element.remove();
@ -5026,8 +5052,8 @@ function removeClonedQroupQuestion(index)
} }
element.remove(); element.remove();
json2nav(); json2nav();
clearSidebarWrapper(); clearSidebarWrapper();
navpane(); navpane();
} }
} }

View File

@ -111,15 +111,20 @@ var draggedItem = null;
if (dragStartElement && dragDropElement && dragStartElement !== dragDropElement) { if (dragStartElement && dragDropElement && dragStartElement !== dragDropElement) {
// var list = document.getElementById(dragDropElement.id); // var list = document.getElementById(dragDropElement.id);
//Check Drop Element is Group Question //Check Drop Element is Group Question
// console.log('First If');
if (dragDropElement.id.replace(/\d+/g, '') == "nav_draggedGroup_") { if (dragDropElement.id.replace(/\d+/g, '') == "nav_draggedGroup_") {
// console.log('Second If');
if (dragStartElement.id.replace(/\d+/g, '') == "nav_draggedGroup_") { if (dragStartElement.id.replace(/\d+/g, '') == "nav_draggedGroup_") {
// console.log('third If');
var dragDropElementChild = dragDropElement.nextElementSibling.dragStartElementChild; var dragDropElementChild = dragDropElement.nextElementSibling.dragStartElementChild;
var dragStartElementChild = dragStartElement.nextElementSibling; var dragStartElementChild = dragStartElement.nextElementSibling;
if (dragDropElementChild) { if (dragDropElementChild) {
// console.log('Fourth If');
dragDropElementChild.parentNode.insertBefore(dragStartElement , dragDropElementChild) dragDropElementChild.parentNode.insertBefore(dragStartElement , dragDropElementChild)
dragDropElementChild.parentNode.insertBefore(dragStartElementChild, dragDropElementChild) dragDropElementChild.parentNode.insertBefore(dragStartElementChild, dragDropElementChild)
insertElement(dragStartElement,dragDropElement,"after") insertElement(dragStartElement,dragDropElement,"after");
} else { } else {
// console.log('Fourth If else');
dragDropElementChild = dragDropElement.nextElementSibling; dragDropElementChild = dragDropElement.nextElementSibling;
dragDropElementChild.appendChild(dragStartElement) dragDropElementChild.appendChild(dragStartElement)
dragDropElementChild.appendChild(dragStartElementChild) dragDropElementChild.appendChild(dragStartElementChild)
@ -140,6 +145,7 @@ var draggedItem = null;
} }
//Check Drop Element is Section //Check Drop Element is Section
else if(dragDropElement.id.replace(/\d+/g, '') == "nav_section_title_"){ else if(dragDropElement.id.replace(/\d+/g, '') == "nav_section_title_"){
// console.log('Second else If');
var dragDropElementChild = dragDropElement.nextElementSibling.firstChild; var dragDropElementChild = dragDropElement.nextElementSibling.firstChild;
if (dragDropElementChild) { if (dragDropElementChild) {
dragDropElementChild.parentNode.insertBefore(dragStartElement , dragDropElementChild); dragDropElementChild.parentNode.insertBefore(dragStartElement , dragDropElementChild);
@ -159,17 +165,22 @@ var draggedItem = null;
} }
//THis Entered in Text and Choice Question //THis Entered in Text and Choice Question
else { else {
// console.log('Second If else');
//Check the Start Element is Group Question //Check the Start Element is Group Question
if (dragStartElement.id.replace(/\d+/g, '') == "nav_draggedGroup_") { if (dragStartElement.id.replace(/\d+/g, '') == "nav_draggedGroup_") {
// console.log('Second if else if')
var parent = dragDropElement.parentNode; var parent = dragDropElement.parentNode;
// console.log('parent : ', parent)
var lastChild = parent.lastChild; var lastChild = parent.lastChild;
// console.log('lastChild : ', lastChild);
var dragStartElementChild = dragStartElement.nextElementSibling; var dragStartElementChild = dragStartElement.nextElementSibling;
parent.insertBefore(dragStartElement, lastChild.nextElementSibling) parent.insertBefore(dragStartElement, lastChild.nextElementSibling);
parent.insertBefore(dragStartElementChild , dragStartElement.nextElementSibling) parent.insertBefore(dragStartElementChild , dragStartElement.nextElementSibling);
insertElement(dragStartElement , dragDropElement , "after") insertElement(dragStartElement , dragDropElement , "after");
} }
// this Entered Text and Choice Question // this Entered Text and Choice Question
else { else {
// console.log('Second if else else')
dragDropElement.parentNode.insertBefore( dragStartElement, dragDropElement.nextElementSibling); dragDropElement.parentNode.insertBefore( dragStartElement, dragDropElement.nextElementSibling);
insertElement(dragStartElement,dragDropElement,"after"); insertElement(dragStartElement,dragDropElement,"after");
// dragStartElement = null; // dragStartElement = null;
@ -210,7 +221,6 @@ var draggedItem = null;
Section.appendChild(QuestionStartElement) Section.appendChild(QuestionStartElement)
} }
} }
}else{ }else{
//Check All is true this for //Check All is true this for
@ -239,17 +249,21 @@ var draggedItem = null;
var maindragStartElement = mainpaneSection.querySelector(`#${dragStartElement.id.replace(/^nav_/, '')}`); var maindragStartElement = mainpaneSection.querySelector(`#${dragStartElement.id.replace(/^nav_/, '')}`);
var maindragDropElement = mainpaneSection.querySelector(`#${dragDropElement.id.replace(/^nav_/, '')}`); var maindragDropElement = mainpaneSection.querySelector(`#${dragDropElement.id.replace(/^nav_/, '')}`);
// console.log('maindragDropElement : ', maindragDropElement);
// End Element is Section // End Element is Section
if (maindragDropElement.id.replace(/\d+/g, '') == "section_title_") { if (maindragDropElement.id.replace(/\d+/g, '') == "section_title_") {
//Check First Element is Group //Check First Element is Group
if (maindragStartElement.id.replace(/\d+/g, '') == "draggedGroup_") { if (maindragStartElement.id.replace(/\d+/g, '') == "draggedGroup_") {
var groupQuestionAddSection = maindragDropElement.nextElementSibling.querySelector('.section-question-area') var groupQuestionAddSection = maindragDropElement.nextElementSibling.querySelector('.section-question-area')
// console.log('groupQuestionAddSection : ', groupQuestionAddSection);
if (maindragStartElement && maindragDropElement && maindragStartElement !== maindragDropElement) { if (maindragStartElement && maindragDropElement && maindragStartElement !== maindragDropElement) {
groupQuestionAddSection.appendChild(maindragStartElement) groupQuestionAddSection.appendChild(maindragStartElement)
// test.parentNode.insertBefore(maindragStartElement, test) // test.parentNode.insertBefore(maindragStartElement, test)
} }
} else { } else {
var textAndChoiceAddSection = maindragDropElement.nextElementSibling.querySelector('.section-question-area'); var textAndChoiceAddSection = maindragDropElement.nextElementSibling.querySelector('.section-question-area');
// console.log('textAndChoiceAddSection : ', textAndChoiceAddSection);
if (maindragStartElement && maindragDropElement && maindragStartElement !== maindragDropElement) { if (maindragStartElement && maindragDropElement && maindragStartElement !== maindragDropElement) {
textAndChoiceAddSection.parentNode.insertBefore(maindragStartElement, textAndChoiceAddSection) textAndChoiceAddSection.parentNode.insertBefore(maindragStartElement, textAndChoiceAddSection)
} }
@ -271,15 +285,17 @@ var draggedItem = null;
groupQuestionAddTextChoice.parentNode.insertBefore(maindragStartElement , groupQuestionAddTextChoice) groupQuestionAddTextChoice.parentNode.insertBefore(maindragStartElement , groupQuestionAddTextChoice)
} else { } else {
var groupQuestionAdd = maindragDropElement.querySelector('.nested-sortable') var groupQuestionAdd = maindragDropElement.querySelector('.nested-sortable')
console.log(groupQuestionAdd); // console.log(groupQuestionAdd);
groupQuestionAdd.appendChild(maindragStartElement) groupQuestionAdd.appendChild(maindragStartElement)
console.log(groupQuestionAdd); // console.log(groupQuestionAdd);
// alert("111") // alert("111")
// test.parentNode.insertBefore(maindragStartElement , test) // test.parentNode.insertBefore(maindragStartElement , test)
} }
} }
}else{ }else{
maindragDropElement.parentNode.insertBefore(maindragStartElement , maindragDropElement) // console.log('parentNode : ', maindragDropElement.parentNode);
// console.log('maindragStartElement : ', maindragStartElement);
maindragDropElement.parentNode.insertBefore(maindragStartElement , maindragDropElement.nextSibling)
} }
} }
} }

View File

@ -89,6 +89,8 @@ files.forEach((file) => {
if(reorder){ if(reorder){
window.location.reload(); window.location.reload();
}else{ }else{
console.log('addform.html?filename=' + xmlfilename);
window.location.href = 'addform.html?filename=' + xmlfilename; window.location.href = 'addform.html?filename=' + xmlfilename;
// window.location.reload(); // window.location.reload();
@ -98,12 +100,10 @@ files.forEach((file) => {
function savexml(UserFilename,reorder=false) { function savexml(UserFilename,reorder=false) {
console.log("reorder",reorder); // console.log("reorder",reorder);
// Get the XML string from localStorage // Get the XML string from localStorage
var xmlString = localStorage.getItem("xml"); var xmlString = localStorage.getItem("xml");
var jsonString = localStorage.getItem("Correct_Answer_Json"); var jsonString = localStorage.getItem("Correct_Answer_Json");
console.log('save json : ', jsonString);
console.log('save xml : ', xmlString);
//check Encrypted or not //check Encrypted or not
var enc = ""; var enc = "";