CONFLICT-SV
This commit is contained in:
commit
3895631fa1
91
addform.html
91
addform.html
@ -605,7 +605,7 @@
|
||||
<div style="margin-bottom: 9px;">Reorder sections</div>
|
||||
<ul id="output" class="">
|
||||
<!-- <div style="margin-bottom: 9px;">Reorder sections</div> -->
|
||||
|
||||
Reorder sections
|
||||
</ul>
|
||||
<div class="popup-save form-button">
|
||||
<button class="closePopupButton">Close</button>
|
||||
@ -1619,7 +1619,14 @@ function groupQuestion(question_id = false, section_id = false , group_question_
|
||||
const text_field_created_time = Date.now();// random number for dynamic ID - using current date time
|
||||
localStorage.setItem('questionsId', text_field_created_time);
|
||||
|
||||
var addChoiceAreaId = "";
|
||||
//set Default value
|
||||
var addChoiceAreaId = false;
|
||||
var marks = ""
|
||||
var UUID = false;
|
||||
|
||||
|
||||
|
||||
|
||||
if(questionRandomNo)
|
||||
{
|
||||
addChoiceAreaId = questionRandomNo;
|
||||
@ -1629,7 +1636,6 @@ function groupQuestion(question_id = false, section_id = false , group_question_
|
||||
|
||||
localStorage.setItem('ChoiceId', addChoiceAreaId);
|
||||
|
||||
var marks = ""
|
||||
if(questionMarks)
|
||||
{
|
||||
marks = questionMarks;
|
||||
@ -1639,7 +1645,6 @@ function groupQuestion(question_id = false, section_id = false , group_question_
|
||||
marks = "";
|
||||
}
|
||||
|
||||
var UUID = "";
|
||||
if(questionUUID)
|
||||
{
|
||||
UUID = questionUUID;
|
||||
@ -2096,10 +2101,12 @@ markCalculation();
|
||||
|
||||
//Function for Create a New Choice Field in a Choice Question
|
||||
function addNewChoice(NewaddChoiceAreaId = false , choiceName = false, questionRandomNo = false, choiceID = false, choice_mathEnabled= false)
|
||||
// function addNewChoice(choiceObj)
|
||||
{
|
||||
const Choice_Group_Dynamic_UUID = uuidv4();
|
||||
|
||||
|
||||
addChoice = "";
|
||||
|
||||
const Choice_Group_Dynamic_UUID = uuidv4();
|
||||
const text_field_created_time = Date.now();
|
||||
var rnd_no = Math.random();
|
||||
|
||||
@ -2119,16 +2126,16 @@ function addNewChoice(NewaddChoiceAreaId = false , choiceName = false, questionR
|
||||
</div>
|
||||
</div>`
|
||||
|
||||
if(questionRandomNo)
|
||||
{
|
||||
var addChoiceAreaId = 'addChoiceArea_'+questionRandomNo;
|
||||
var addChoiceAreaId2 = document.getElementById(addChoiceAreaId);
|
||||
addChoiceAreaId2.insertAdjacentHTML('beforeend', addChoice);
|
||||
}
|
||||
else if(NewaddChoiceAreaId)
|
||||
{
|
||||
NewaddChoiceAreaId.insertAdjacentHTML('beforeend', addChoice);
|
||||
}
|
||||
if(questionRandomNo)
|
||||
{
|
||||
var addChoiceAreaId = 'addChoiceArea_'+questionRandomNo;
|
||||
var addChoiceAreaId2 = document.getElementById(addChoiceAreaId);
|
||||
addChoiceAreaId2.insertAdjacentHTML('beforeend', addChoice);
|
||||
}
|
||||
else if(NewaddChoiceAreaId)
|
||||
{
|
||||
NewaddChoiceAreaId.insertAdjacentHTML('beforeend', addChoice);
|
||||
}
|
||||
|
||||
|
||||
var newChoiceCommentButtonId = document.getElementById('newChoiceCommentButton_'+text_field_created_time+rnd_no);
|
||||
@ -2146,8 +2153,6 @@ $(newChoiceDeleteButtonId).on('click', function() {
|
||||
$(newChoiceCommentFieldDeleteId).remove();
|
||||
})
|
||||
|
||||
|
||||
|
||||
var newChoiceTextField = document.getElementById('newChoiceTextField_'+text_field_created_time+rnd_no);
|
||||
var quill = new Quill(newChoiceTextField, {
|
||||
theme: 'snow',
|
||||
@ -2227,15 +2232,6 @@ $(newChoiceDeleteButtonId).on('click', function() {
|
||||
$(newchoiceTextField_math_Id).hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
json2nav();
|
||||
clearSidebarWrapper();
|
||||
navpane();
|
||||
@ -2277,6 +2273,12 @@ textQuestion +=
|
||||
<i class="fas fa-grip-horizontal"></i>
|
||||
</div>
|
||||
|
||||
<div class="items align-items-center hideondrag" style="display: none;">
|
||||
<i onclick="ReArrangeQuestions(event)" id="forword_${addTextQuestionId}" class="fa fa-chevron-up up-icon" ></i>
|
||||
<i onclick="ReArrangeQuestions(event)" id="backword_${addTextQuestionId}" class="fa fa-chevron-down down-icon"></i>
|
||||
<i class="fa fa-trash-o" onclick="removeClonedTextQuestion(${addTextQuestionId})" style="font-size:20px;"aria-hidden="true"></i>
|
||||
</div>
|
||||
|
||||
<div class="row" style="text-align:right; width: 100%" id="overallAddButtons_${addTextQuestionId}" >
|
||||
<div class="col-lg-10 col-md-12">
|
||||
<div class=" button-group align-items-center">
|
||||
@ -2315,12 +2317,6 @@ textQuestion +=
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="items align-items-center hideondrag" style="display: none;">
|
||||
<i onclick="ReArrangeQuestions(event)" id="forword_${addTextQuestionId}" class="fa fa-chevron-up up-icon" ></i>
|
||||
<i onclick="ReArrangeQuestions(event)" id="backword_${addTextQuestionId}" class="fa fa-chevron-down down-icon"></i>
|
||||
<i class="fa fa-trash-o" onclick="removeClonedTextQuestion(${addTextQuestionId})" style="font-size:20px;"aria-hidden="true"></i>
|
||||
</div>
|
||||
<div class="col-lg-12 col-md-12 ">
|
||||
<input type="hidden" id="Text_Question_UUID_ID_${addTextQuestionId}" value="${QuestionObj.hasOwnProperty('questionUUID') ? QuestionObj.questionUUID : Text_Question_UUID}">
|
||||
<div class="form_box">
|
||||
@ -2582,35 +2578,35 @@ var inputElement = document.getElementById(Textid);
|
||||
function ReArrangeQuestions(e){
|
||||
|
||||
var currentID= e.target.parentElement.parentElement.parentElement.id;
|
||||
console.log(currentID)
|
||||
// console.log(currentID)
|
||||
var currentItemID = document.getElementById(currentID);
|
||||
console.log('currentItemID');
|
||||
console.log(currentItemID);
|
||||
// console.log('currentItemID');
|
||||
// console.log(currentItemID);
|
||||
|
||||
if (e.target.classList.contains('up-icon')) {
|
||||
|
||||
console.log('FORWORD');
|
||||
// console.log('FORWORD');
|
||||
const question_ListItem = e.target.parentElement.parentElement;
|
||||
console.log('question_ListItem');
|
||||
console.log(question_ListItem);
|
||||
// console.log('question_ListItem');
|
||||
// console.log(question_ListItem);
|
||||
|
||||
const question_PrevItem = question_ListItem.previousElementSibling;
|
||||
console.log('question_PrevItem');
|
||||
console.log(question_PrevItem );
|
||||
// console.log('question_PrevItem');
|
||||
// console.log(question_PrevItem );
|
||||
|
||||
if (question_PrevItem !== null) {
|
||||
currentItemID.insertBefore(question_ListItem, question_PrevItem);
|
||||
}
|
||||
} else if (e.target.classList.contains('down-icon')) {
|
||||
|
||||
console.log('BACKWORD');
|
||||
// console.log('BACKWORD');
|
||||
const question_ListItem = e.target.parentElement.parentElement;
|
||||
console.log('question_ListItem');
|
||||
console.log(question_ListItem);
|
||||
// console.log('question_ListItem');
|
||||
// console.log(question_ListItem);
|
||||
|
||||
const question_nextItem = question_ListItem.nextElementSibling;
|
||||
console.log('question_nextItem');
|
||||
console.log(question_nextItem );
|
||||
// console.log('question_nextItem');
|
||||
// console.log(question_nextItem );
|
||||
|
||||
if (question_nextItem) {
|
||||
currentItemID.insertBefore(question_nextItem, question_ListItem);
|
||||
@ -2753,7 +2749,6 @@ function cloneQuestion(e,type)
|
||||
// remove the cloned text type questions function
|
||||
function removeClonedTextQuestion(index)
|
||||
{
|
||||
alert('hi text');
|
||||
var element = document.getElementById('removeAndCloneTextQuestion_'+ index);
|
||||
if (element) {
|
||||
element.remove();
|
||||
@ -2763,8 +2758,6 @@ function removeClonedTextQuestion(index)
|
||||
// remove the cloned choice or group type questions function
|
||||
function removeClonedQroupQuestion(index)
|
||||
{
|
||||
alert('hi choice');
|
||||
|
||||
var element = document.getElementById('removeAndCloneQroupQuestion_'+ index);
|
||||
if (element) {
|
||||
element.remove();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user