merge conflict : RV

This commit is contained in:
venkateswaran ubuntu 2023-11-24 12:37:17 +05:30
commit 595c0b8e85
11 changed files with 14495 additions and 123 deletions

View File

@ -85,8 +85,20 @@ function QuestionPaperPreview(jsonData){
const sectionTitle = section.section_title;
const modifiedSectionTitle = sectionTitle.replaceAll('<p>', '<p id="sectionTitle">');//add the id for Section Title
var sectionAttempt = `<p id="sectionAttempt">Attempt Any : ${section.section_attempt_any}</p>`;
var sectionMark = `<p id="sectionMark">Marks: ${section.section_marks}</p>`;
// console.log(section.section_attempt_any);
if (section.section_attempt_any) {
var sectionAttempt = `<p id="sectionAttempt">Attempt Any : ${section.section_attempt_any}</p>`;
} else {
var sectionAttempt = `<p id="sectionAttempt"> </p>`;
}
if (section.section_marks == 0 || section.section_marks == '') {
var sectionMark = `<p id="sectionMark"> </p>`;
} else {
var sectionMark = `<p id="sectionMark">Marks: ${section.section_marks}</p>`;
}
const sectionDescriptio = section.section_description;
const sectionDescription = sectionDescriptio.replaceAll('<p>', '<p class="section-Description">');
// const questions = section.questions;
@ -133,8 +145,19 @@ function QuestionPaperPreview(jsonData){
if (question.group_title) {
const questionGroupSetP = `${question.group_title}`;
const questionGroupmodify =questionGroupSetP.replaceAll('<p>', `<p id="question-Group-Id" style="padding-left:${description_align}px">`)
var questionGroupAttempt = `<p id="group_attempt_any" class="GroupAttempAny">Attempt Any : ${question.group_attempt_any} </p>`
var questionGroupMark = `<p id="group_marks">Marks : ${question.group_marks} </p>`
if (question.group_attempt_any) {
var questionGroupAttempt = `<p id="group_attempt_any" class="GroupAttempAny">Attempt Any : ${question.group_attempt_any} </p>`
}else{
var questionGroupAttempt = `<p id="group_attempt_any" class="GroupAttempAny"> </p>`
}
if (question.group_marks === 0 || question.group_marks === '') {
var questionGroupMark = `<p id="group_marks"> </p>`
}else{
var questionGroupMark = `<p id="group_marks">Marks : ${question.group_marks} </p>`
}
const questionGroupDescriptio = question.group_description;
const questionGroupDescription = questionGroupDescriptio.replaceAll('<p>', '<p class="question-Group-Description">')
@ -160,7 +183,13 @@ function QuestionPaperPreview(jsonData){
const questionDescriptio = question.question_description;
const questionDescription = questionDescriptio.replaceAll('<p>', '<p class="question-Description">')
const mathstatus = question.is_math_enabled;
var questionMark = `<p id="question-mark">Marks :${question.marks}</p>`;
if (question.marks == 0 || question.marks == '') {
var questionMark = `<p id="question-mark"> </p>`;
} else {
var questionMark = `<p id="question-mark">Marks :${question.marks}</p>`;
}
// console.log(questionMark);
const multipleAnswer =question.question_sub_type;
if (question.marks == '') {

View File

@ -50,7 +50,26 @@
<style>
/* strong{
margin-left: -51px !important;
} */
s{
margin-left: 3px !important;
}
em{
margin-left: 2px !important;
}
sub{
margin-left: -5px !important;
}
sup{
margin-left: 1px !important;
}
u{
margin-left: 0px !important;
}
.question_Text{
inline-size: 700px;
/* overflow-wrap: break-word;
@ -159,7 +178,7 @@
}
.text-qus-align :not(p:first-child){
display:flex;
margin-left: 54px;
/* margin-left: 54px; */
}
/* .text-qus-align p:first-child{
margin-left: -23px;
@ -172,7 +191,7 @@
.text-qus-align p{ margin:0; }
.text-des{ margin-left: 20px;margin-top: 0px;} /* Change there aadhavan top-6px*/
.text-option-align{display:flex;margin-top: 0%;margin-left: 45px;} /* Change there aadhavan 10px*/
.text-option-align p{ margin:0; }
.text-option-align p{ margin:0; text-wrap: balance;}
/* #sectionTitle {border-top: 2px solid gray
; width:99%;} */
/* #sectionTitle:first-of-type {border:none;} */
@ -437,7 +456,7 @@ $(document).ready(function() {
setTimeout(() => {
var parentDiv = $('.text-qus-align');
var firstParagraph = parentDiv.find('.question_Text:first-child');
console.log(parentDiv);
// console.log(parentDiv);
// Remove the style attribute from the first <p> tag
if (firstParagraph.length > 0) {
@ -447,6 +466,7 @@ setTimeout(() => {
});
</script>
</body>

View File

@ -2,6 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Project-B</title>
@ -45,8 +46,34 @@
<script defer src="./node_modules/mathlive/dist/mathlive.min.js"></script>
<!-- modernizr js -->
<script src="assets/js/vendor/modernizr-3.5.0.min.js"></script>
<script src="assets/js/quill.js"></script>
<script src="assets/css/quill.snow.css"></script>
<script src="./node_modules/quill-image-resize-module/image-resize.min.js"></script>
<script src="./node_modules/quill-resize-module/dist/resize.js"></script>
<link rel="stylesheet" href="./node_modules/quill-resize-module/dist/resize.css">
<script src="https://html2canvas.hertzen.com/dist/html2canvas.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<style>
/* body { */
/* Ensure the body takes the full height of the viewport */
/* height: 100vh; */
/* Apply smooth transition for the zoom effect */
/* transition: transform 0.3s ease-in-out; */
/* Set transform origin to the top left corner to prevent content shifting */
/* transform-origin: top left; */
/* } */
.ql-align.ql-picker.ql-icon-picker{
margin-top: -10px;
}
#editPreview{
color: #7018d4;
@ -110,7 +137,8 @@
/* Show the icon when hovering over the parent element with .hidedrag */
.element:hover .drag-handle {
color: blueviolet;
/* color: blueviolet; */
color: #BF303B;
}
body {
@ -141,6 +169,7 @@
transition: height 0.5s ease;
}
math-field{
border-radius: 6px;
font-size:18px;
@ -155,17 +184,19 @@
float: right;
text-align: -webkit-right;
}
</style>
<style>
.arrow-down::before {
content: '\25BC';
/* content: '\25BC'; */
content: '⮟';
margin-right: 5px;
}
.arrow-right::before {
content: '\25B6';
/* content: '\25B6'; */
content: '⮞';
margin-right: 10px;
}
@ -191,7 +222,7 @@
/* Style for the collapsible content */
.content {
display: none;
/* display: none; */
margin-left: 9px;
}
@ -211,7 +242,7 @@
#sidebar-wrapper {
min-height: 100vh;
flex-basis:20%;
flex-basis:21%;
width:300px;
margin-left: -15rem;
transition: margin 0.25s ease-out;
@ -240,9 +271,23 @@
overflow-x: clip;
max-height: 532px;
padding:0 10px 20px;
width: 235px;
width: 285px;
height: -webkit-fill-available;
}
#questionPaper strong em{
font-weight: 100;
font-style: normal;
}
#questionPaper u{
text-decoration: none;
}
#questionPaper s{
text-decoration: none;
}
#questionPaper strong{
font-weight: 100;
}
#page-content-wrapper {
min-width: 100%;
}
@ -314,6 +359,37 @@
color: #bf303b;
/* background: #bf303b; */
}
.work-area{
background-color: transparent;
position: fixed;
top:81px;
right: 10px;
border: none;
border-radius: 15%; /* Make the button round */
width: 40px; /* Set the width and height of the button */
height: 40px;
transition: box-shadow 0.3s, background-color 0.3s;
color: #bf303b;
}
.work-area1{
background-color: transparent;
position: absolute;
top:-8px;
left:-18px;
border-width:0;
transform:rotate(58deg);
transition: box-shadow 0.3s, background-color 0.3s;
color: #bf303b;
}
.work-area1::before{
content: '\2BC7';
font-size: 24px;
}
.work-area::before{
content:'\2630';
}
.menu-symbol {
position:absolute;
right:0;
@ -326,6 +402,7 @@
/* border: 2px solid #a09c9c; */
/* background: #BF303B; */
transition: box-shadow 0.3s, background-color 0.3s; /* Add a smooth transition to the shadow and background-color */
margin-right: -75px;
}
/* .menu-symbol {
position:absolute;
@ -347,8 +424,6 @@
</style>
</style>
<style>
/* Styles for the overlay background */
.overlay {
@ -363,6 +438,13 @@
z-index: 1;
}
li.popupbox{
color: black !important;
}
li.popupbox span{
color: #BF303B !important;
}
/* Styles for the popup container */
.popup {
display: none;
@ -375,6 +457,9 @@
padding: 20px;
z-index: 2;
font-size: larger;
/* color: rgba(255, 0, 0) !important; */
color: darkred !important;
/* color: black !important; */
}
.popupbox {
display: flex;
@ -484,15 +569,133 @@ h1.title{
font-weight: 400;
color: #1d3557;
padding-bottom: 10px;
}
}
</style>
<style>
body {
margin: 0;
font-family: 'Arial', sans-serif;
}
.sidebar {
height: 100%;
width: 0;
position: fixed;
top: 0;
right: 0;
background-color: #ffffff;
overflow-x: hidden;
transition: 0.5s;
padding-top: 60px;
z-index: 2;
border-left: 1px solid;
}
.chat-box {
padding: 20px;
color: white;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
position: relative;
z-index: 100;
}
#messages {
max-height: calc(100% - 60px);
overflow-y: auto;
margin-bottom: 10px;
}
#messageForm {
margin-top: auto;
}
textarea {
height: 40px;
}
input {
flex: 1;
padding: 10px;
}
.message{
position: relative;
right: 85px;
}
button {
padding: 10px;
cursor: pointer;
}
#sidebarToggle2 {
position: fixed;
top: 60px;
right: -7px;
font-size: 20px;
cursor: pointer;
}
.content {
margin-right: 0;
transition: margin-right 0.5s;
}
.sidebar-open .content {
margin-right: 250px;
}
.sidebar::before {
content: '\2BC7'; /* Unicode character for the close arrow (adjust as needed) */
position: absolute;
top: 10px;
left: 10px;
font-size: 24px;
cursor: pointer;
}
.work-area::before {
content: '\2BC7'; /* Unicode character for the open arrow (adjust as needed) */
font-size: 24px;
}
.worksection.ql-snow {
height: 100px;
overflow-y: scroll;
border-top: 1px solid #ccc !important;
}
mjx-container[jax="CHTML"][display="true"] {
text-align: left !important;
color: black;
}
.sendMessageButton{
display: inline-block;
color: #fff;
font-weight: 400;
padding: 2px 0px;
text-transform: capitalize;
transition: 0.5s;
font-size: 15px;
position: relative;
z-index: 1;
border-radius: 5px;
overflow: hidden;
/* margin-top: 5px; */
/* background: linear-gradient(to right,#533dfd,#730fd5); */
background: linear-gradient(to right,darkred, #BF303B);
border: none;
/* margin-right: 15px; */
width: 85px;
}
</style>
</head>
<body>
<!-- loder -->
<div class="loader-wrapper">
<div class="loader"></div>
@ -516,6 +719,7 @@ h1.title{
<li><a href="dashboard.html"><img class="addPageMenu" src="assets/images/home.svg" alt="">Home</a></li>
<li><a href="#" class="myBtn" onclick="saveFile()" id="SaveButton"><img class="addPageMenu" src="assets/images/save.svg" alt="">Save</a></li>
<li><a href="#" id="editPreview" ><img class="addPageMenu" src="assets/images/preview.svg" alt="">Preview</a></li>
</ul>
</div>
</div>
@ -525,6 +729,7 @@ h1.title{
</div>
<button class="menu-symbol1" id="sidebarToggle1"></button>
<button class="work-area"id="sidebarToggle2"></button>
<!-- QuestionPapper Container start -->
<div class="d-flex" id="wrapper">
<!-- Sidebar-->
@ -535,7 +740,209 @@ h1.title{
</div>
</div>
<!-- sidebar end -->
<script>
document.addEventListener('DOMContentLoaded', function () {
// Initialize Quill with your specific configuration
var quill = new Quill('#workarea', {
theme: 'snow',
modules: {
toolbar: {
container: toolbarOptions,
clipboard: {
matchVisual: true,
},
ImageResize: {
displaySize: true,
modules: ['Resize', 'DisplaySize', 'Toolbar']
}
},
}
});
var chat_Div = $("#workarea");
var chat_previousDiv = chat_Div.prev();
chat_previousDiv.attr("id", "messageInput_rtc");
var chatRtc = 'messageInput_rtc';
$('#workarea').focus(function () {
rtc_hide_and_show(chatRtc);
});
document.getElementById('sidebarToggle2').addEventListener('click', function () {
var sidebar = document.getElementById('rightSidebar');
document.body.classList.toggle('sidebar-open');
if (sidebar.style.width === '250px') {
sidebar.style.width = '0';
} else {
sidebar.style.width = '250px';
}
});
document.getElementById('sidebarToggle3').addEventListener('click', function () {
var sidebar = document.getElementById('rightSidebar');
document.body.classList.toggle('sidebar-open');
if (sidebar.style.width === '250px') {
sidebar.style.width = '0';
} else {
sidebar.style.width = '250px';
}
});
document.getElementById('sendMessageButton').addEventListener('click', function () {
sendMessage(quill);
});
document.getElementById('workarea').addEventListener('keydown', function (event) {
if (event.key === 'Enter') {
event.preventDefault();
sendMessage(quill);
}
});
// Add Math functionality
var mathCheckbox = document.getElementById('Choicemath_messageInput');
var mathField = document.getElementById('workarea_math');
var richText = document.getElementById('workarea');
// Ensure MathQuill field is initially hidden
$(mathField).hide();
// $(richText1).show();
mathCheckbox.addEventListener('change', function () {
if (mathCheckbox.checked) {
$(mathField).show();
$(richText).hide();
rtc_hide_and_show(chatRtc);
} else {
$(mathField).hide();
$(richText).show();
rtc_hide_and_show(chatRtc);
}
});
// Initialize Math Field
var mathFieldId = 'workarea_math';
var mathFieldDiv = document.getElementById(mathFieldId);
var mathFieldPreviousDiv = $(mathFieldDiv).prev();
var mathRTEId = "workarea_math_rtc";
mathFieldPreviousDiv.attr("id", mathRTEId);
mathFieldDiv.addEventListener('click', function () {
var id = localStorage.getItem('rtc');
var hideid = document.getElementById(id);
$(hideid).hide();
$(mathFieldPreviousDiv).show();
localStorage.setItem('rtc', mathRTEId);
});
$(mathFieldPreviousDiv).hide();
});
async function sendMessage(quill) {
var workarea = document.getElementById('workarea');
var mathField = document.getElementById('workarea_math');
var messagesContainer = document.getElementById('messages');
console.log("workarea",workarea);
console.log("mathField",mathField);
console.log("messagesContainer",messagesContainer);
var content = '';
// Check if the checkbox is checked
if ($('#Choicemath_messageInput').prop('checked')) {
// Use MathQuill API to get the math field content
var mathFieldContent = mathField.getValue();
content = await convertToLatex(mathFieldContent);
} else {
content = quill.root.innerHTML.trim();
}
// Log the content to the console
console.log("Message Content: ", content);
if (content !== '') {
// var messageElement = document.createElement('div');
// messageElement.className = 'message';
messagesContainer.innerHTML += content;
// Append the div to the messagesContainer
// messagesContainer.appendChild(messageElement);
MathJax.typeset([messagesContainer]);
if ($('#Choicemath_messageInput').prop('checked')) {
// Clear the math field content
// mathField.latex('');
} else {
quill.setText('');
}
messagesContainer.scrollTop = messagesContainer.scrollHeight;
}
}
async function convertToLatex(text, mathstatus) {
// Parse mathstatus into a boolean
const mathStatusBoolean = true
// Check if the text contains <p> tags
console.log("ff")
return new Promise(async(resolve, reject) => {
if (!/<p>|<\/p>/i.test(text)) {
console.log('text:' , text)
if (mathStatusBoolean) {
console.log('text1:' , text)
// Use MathJax to convert the text to LaTeX
const cov = await MathJax.tex2chtml(text).outerHTML;
console.log('cov:' , cov);
resolve(cov);
//return cov;
} else {
// Return the text as-is
resolve(text);
//return text;
}
} else {
console.log("pq")
const cov = await MathJax.tex2chtml(text).outerHTML;
console.log('cov:' , cov)
resolve(cov);
//return cov;
}
});
}
</script>
<div class="sidebar" id="rightSidebar">
<div class="chat-box">
<button class="work-area1" id="sidebarToggle3"></button>
<h2>Work Area</h2>
<div id="messages" class="chat-history" ></div>
<form id="messageForm" action="#" method="post" onsubmit="sendMessage(); return false;">
<fieldset>
<!-- 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..."></div>
</div>
<div class="col-12">
<div>
<math-field id="workarea_math" style="width: 100%; " contenteditable="true"></math-field>
</div>
</div>
<div class="col-6 items2" style="display: flex; align-items: center;">
<input style="width:14px; height:14px; margin-right: 5px;" type="checkbox" id="Choicemath_messageInput"/>
<span class="math">Math</span>
</div>
<div class="col-6" style="display: flex; align-items: center;">
<button id="sendMessageButton" class="sendMessageButton" type="button">Send</button>
</div>
</div>
</fieldset>
</form>
</div>
</div>
<div class="container">
@ -546,7 +953,7 @@ h1.title{
<!-- QuestionPapper Title Start-->
<div class="question-papper-title element">
<h1 class="title">Questionnaire Details</h1>
<h1 class="title">QuestionPaper Details</h1>
<input type="hidden" id="QuestionPaper_UUID_ID">
<div class="col-lg-12 col-md-12">
<div class="row">
@ -727,6 +1134,7 @@ h1.title{
<!-- RTC Hide and Show Script -->
<script src="rtc_hide_and_show.js"></script>
<!-- <script src="QuestionPaperPreview.js"></script> -->
<!-- decrypt -->
<script src="decode.js"></script>
@ -799,7 +1207,6 @@ $(document).ready(function() {
// console.log(isEncrypted);
$('.ql-toolbar').hide(); // Hide the Quill Text Editor if PAge load
if(FileName == "" || FileName == null ) {
var random_no = Date.now();
addSection(false, false, random_no, false, false, false, false, 1); //Call the Default section on the QUestion paper
@ -811,15 +1218,15 @@ $(document).ready(function() {
})
$(document).on("click", function (event) {
// $(document).on("click", function (event) {
var questionPaperDiv = $(".QuestionPaperClass");
if (!questionPaperDiv.is(event.target) && questionPaperDiv.has(event.target).length === 0) {
$('.ql-toolbar').hide();
}
// var questionPaperDiv = $(".QuestionPaperClass");
// if (!questionPaperDiv.is(event.target) && questionPaperDiv.has(event.target).length === 0) {
// $('.ql-toolbar').hide();
// }
});
// });
document.addEventListener('DOMContentLoaded', function () {
@ -833,7 +1240,7 @@ document.addEventListener('DOMContentLoaded', function () {
// Add a click event listener to the button
scrollToTopBtn.addEventListener('click', keepCursorAtPosition);
scrollToTopBtn2.addEventListener('click', keepCursorAtPosition);
// scrollToTopBtn2.addEventListener('click', keepCursorAtPosition);
});
@ -1024,6 +1431,9 @@ function saveFile(flag=0) {
const { v4: uuidv4 } = require('uuid');
const Quill = require('quill');
const ImageResize =require('quill-image-resize-module');
Quill.register('modules/imageResize', ImageResize);
const Question_Paper_UUID = uuidv4();
var QuestionPaper_UUID = document.getElementById('QuestionPaper_UUID_ID')
QuestionPaper_UUID.value = Question_Paper_UUID;
@ -1033,7 +1443,8 @@ var toolbarOptions = [
['bold', 'italic', 'underline', 'strike'],
[{ 'script': 'sub'}, { 'script': 'super' }],
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
['image'],
['image'],
[{ 'align': ['justify', 'center', 'right', ] }]
];
var toolbarOptions2 = [
@ -1045,20 +1456,63 @@ var toolbarOptions2 = [
var quill = new Quill('#Question_title', {
theme: 'snow',
modules: {
toolbar: toolbarOptions
},
toolbar: toolbarOptions,
}
});
var quill = new Quill('#Question_description', {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
toolbar:{
container:toolbarOptions,
clipboard: {
matchVisual: true,
},
ImageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
}
},
}
});
// var quill = new Quill('#workarea', {
// theme: 'snow',
// modules: {
// toolbar:{
// container:toolbarOptions,
// clipboard: {
// matchVisual: true,
// },
// ImageResize:{
// displaySize:true,
// modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
// }
// },
// }
// });
var quill = new Quill('#ql-editor',{
theme:'snow',
module:{
ImageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
}
}
})
// function imageHandler() {
// var range = this.quill.getSelection();
// var value = prompt('hello');
// console.log(value);
// this.quill.insertEmbed(range.index, 'image', value, Quill.sources.USER);
// }
var Question_title_Div = $("#Question_title");
var Question_title_previousDiv = Question_title_Div.prev();
Question_title_previousDiv.attr("id", "Question_title_rtc");
@ -1070,7 +1524,9 @@ rtc_hide_and_show(setitem);
});
var Question_description_Div = $("#Question_description");
console.log("Question_description_Div",Question_description_Div);
var Question_description_previousDiv = Question_description_Div.prev();
console.log("Question_description_previousDiv",Question_description_previousDiv);
Question_description_previousDiv.attr("id", "Question_description_rtc");
var questionDescriptionRtc = 'Question_description_rtc';
$('#Question_description').focus(function() {
@ -1079,6 +1535,13 @@ rtc_hide_and_show(questionDescriptionRtc);
});
// var chat_Div = $("#workarea");
// var chat_previousDiv = chat_Div.prev();
// chat_previousDiv.attr("id", "messageInput_rtc");
// var chatRtc = 'messageInput_rtc';
// $('#workarea').focus(function() {
// rtc_hide_and_show(chatRtc);
// });
var checkboxElement = document.createElement('input');
checkboxElement.type = 'checkbox';
@ -1093,7 +1556,7 @@ var labelElement = document.createElement('label');
labelElement.htmlFor = 'myCheckbox';
labelElement.textContent = 'Math';
console.log(parentElement);
// console.log(parentElement);
parentElement.appendChild(checkboxElement);
parentElement.appendChild(labelElement);
@ -1116,6 +1579,7 @@ html2json();
function showButtons(container) {
const buttons = container.querySelector('.buttons');
const onhover = container.querySelector('.onhover');
// console.log(onhover);
if(buttons && onhover)
{
onhover.style.display = 'block';
@ -1362,13 +1826,24 @@ function addSection(title = false, description = false, random_no = false, secti
$(this).removeClass('fa-angle-up').addClass('fa-angle-down');
}
});
// Select input field by class name
const inputFields = document.querySelectorAll('.richText');
// console.log(inputFields);
inputFields.forEach(inputField => {
inputField.addEventListener('paste', (event) => {
const text = event.clipboardData.getData('text/plain');
inputField.value = text;
});
});
});
var sectionText = (random_no == false) ? 'section_title_text_' + text_field_created_time : 'section_title_text_' + random_no;
console.log(sectionText);
var quill = new Quill('#'+sectionText, {
theme: 'snow',
modules: {
toolbar: toolbarOptions
toolbar: toolbarOptions,
},
});
@ -3238,6 +3713,9 @@ function removeClonedTextQuestion(index)
var element = document.getElementById('removeAndCloneTextQuestion_'+ index);
if (element) {
element.remove();
json2nav();
clearSidebarWrapper();
navpane();
}
}
@ -3247,6 +3725,9 @@ function removeClonedQroupQuestion(index)
var element = document.getElementById('removeAndCloneQroupQuestion_'+ index);
if (element) {
element.remove();
json2nav();
clearSidebarWrapper();
navpane();
}
}
@ -3309,9 +3790,15 @@ function removeQuestionGroup(index) {
if (result.isConfirmed) {
if (element) {
element.remove();
console.log("pjm;lkm");
json2nav();
clearSidebarWrapper();
navpane();
}
}
})
// console.log('o;ijkom');
}
function removeHtmlTags(inputString) {
@ -3630,6 +4117,49 @@ return text;
// }
</script>
<script>
function clearClipboardAttributes() {
const apaste = document.getElementsByClassName('ql-clipboard')
for (var i = 0; i < apaste.length; i++) {
apaste[i].attributes[2].value='';
}
}
setInterval(clearClipboardAttributes, 2000);
</script>
<script>
function removeQlBlank(){
$('.ql-blank').removeClass('ql-blank');
}
setInterval(removeQlBlank,2000)
</script>
<!--
<script>
quill.on('editor-change', function(eventName, ...args) {
if (eventName === 'text-change' && args[1].ops) {
args[1].ops.forEach(function(op) {
if (op.insert && op.insert.image) {
// Handle image insertion
var imageUrl = op.insert.image;
console.log('Image inserted:', imageUrl);
}
});
}
});
</script> -->
<!-- <script>
function removebold(){
var removebold = document.getElementsByClassName('section main-heading')
console.log(removebold[0].innerHTML);
// removebold[0].innerHTML=removebold[0].innerHTML.replace('<strong>','').replace('</strong>','')
// console.log(removebold[0].innerHTML.replace('<strong>','').replace('</strong>',''));
}
setInterval(removebold, 1000)
</script> -->
</body>
</html>

945
assets/css/quill.snow.css Normal file
View File

@ -0,0 +1,945 @@
/*!
* Quill Editor v1.3.6
* https://quilljs.com/
* Copyright (c) 2014, Jason Chen
* Copyright (c) 2013, salesforce.com
*/
.ql-container {
box-sizing: border-box;
font-family: Helvetica, Arial, sans-serif;
font-size: 13px;
height: 100%;
margin: 0px;
position: relative;
}
.ql-container.ql-disabled .ql-tooltip {
visibility: hidden;
}
.ql-container.ql-disabled .ql-editor ul[data-checked] > li::before {
pointer-events: none;
}
.ql-clipboard {
left: -100000px;
height: 1px;
overflow-y: hidden;
position: absolute;
top: 50%;
}
.ql-clipboard p {
margin: 0;
padding: 0;
}
.ql-editor {
box-sizing: border-box;
line-height: 1.42;
height: 100%;
outline: none;
overflow-y: auto;
padding: 12px 15px;
tab-size: 4;
-moz-tab-size: 4;
text-align: left;
white-space: pre-wrap;
word-wrap: break-word;
}
.ql-editor > * {
cursor: text;
}
.ql-editor p,
.ql-editor ol,
.ql-editor ul,
.ql-editor pre,
.ql-editor blockquote,
.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
margin: 0;
padding: 0;
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol,
.ql-editor ul {
padding-left: 1.5em;
}
.ql-editor ol > li,
.ql-editor ul > li {
list-style-type: none;
}
.ql-editor ul > li::before {
content: '\2022';
}
.ql-editor ul[data-checked=true],
.ql-editor ul[data-checked=false] {
pointer-events: none;
}
.ql-editor ul[data-checked=true] > li *,
.ql-editor ul[data-checked=false] > li * {
pointer-events: all;
}
.ql-editor ul[data-checked=true] > li::before,
.ql-editor ul[data-checked=false] > li::before {
color: #777;
cursor: pointer;
pointer-events: all;
}
.ql-editor ul[data-checked=true] > li::before {
content: '\2611';
}
.ql-editor ul[data-checked=false] > li::before {
content: '\2610';
}
.ql-editor li::before {
display: inline-block;
white-space: nowrap;
width: 1.2em;
}
.ql-editor li:not(.ql-direction-rtl)::before {
margin-left: -1.5em;
margin-right: 0.3em;
text-align: right;
}
.ql-editor li.ql-direction-rtl::before {
margin-left: 0.3em;
margin-right: -1.5em;
}
.ql-editor ol li:not(.ql-direction-rtl),
.ql-editor ul li:not(.ql-direction-rtl) {
padding-left: 1.5em;
}
.ql-editor ol li.ql-direction-rtl,
.ql-editor ul li.ql-direction-rtl {
padding-right: 1.5em;
}
.ql-editor ol li {
counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
counter-increment: list-0;
}
.ql-editor ol li:before {
content: counter(list-0, decimal) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-increment: list-1;
}
.ql-editor ol li.ql-indent-1:before {
content: counter(list-1, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-1 {
counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-2 {
counter-increment: list-2;
}
.ql-editor ol li.ql-indent-2:before {
content: counter(list-2, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-2 {
counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-3 {
counter-increment: list-3;
}
.ql-editor ol li.ql-indent-3:before {
content: counter(list-3, decimal) '. ';
}
.ql-editor ol li.ql-indent-3 {
counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-4 {
counter-increment: list-4;
}
.ql-editor ol li.ql-indent-4:before {
content: counter(list-4, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-4 {
counter-reset: list-5 list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-5 {
counter-increment: list-5;
}
.ql-editor ol li.ql-indent-5:before {
content: counter(list-5, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-5 {
counter-reset: list-6 list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-6 {
counter-increment: list-6;
}
.ql-editor ol li.ql-indent-6:before {
content: counter(list-6, decimal) '. ';
}
.ql-editor ol li.ql-indent-6 {
counter-reset: list-7 list-8 list-9;
}
.ql-editor ol li.ql-indent-7 {
counter-increment: list-7;
}
.ql-editor ol li.ql-indent-7:before {
content: counter(list-7, lower-alpha) '. ';
}
.ql-editor ol li.ql-indent-7 {
counter-reset: list-8 list-9;
}
.ql-editor ol li.ql-indent-8 {
counter-increment: list-8;
}
.ql-editor ol li.ql-indent-8:before {
content: counter(list-8, lower-roman) '. ';
}
.ql-editor ol li.ql-indent-8 {
counter-reset: list-9;
}
.ql-editor ol li.ql-indent-9 {
counter-increment: list-9;
}
.ql-editor ol li.ql-indent-9:before {
content: counter(list-9, decimal) '. ';
}
.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
padding-left: 3em;
}
.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {
padding-left: 4.5em;
}
.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 3em;
}
.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {
padding-right: 4.5em;
}
.ql-editor .ql-indent-2:not(.ql-direction-rtl) {
padding-left: 6em;
}
.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {
padding-left: 7.5em;
}
.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 6em;
}
.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {
padding-right: 7.5em;
}
.ql-editor .ql-indent-3:not(.ql-direction-rtl) {
padding-left: 9em;
}
.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {
padding-left: 10.5em;
}
.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 9em;
}
.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {
padding-right: 10.5em;
}
.ql-editor .ql-indent-4:not(.ql-direction-rtl) {
padding-left: 12em;
}
.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {
padding-left: 13.5em;
}
.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 12em;
}
.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {
padding-right: 13.5em;
}
.ql-editor .ql-indent-5:not(.ql-direction-rtl) {
padding-left: 15em;
}
.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {
padding-left: 16.5em;
}
.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 15em;
}
.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {
padding-right: 16.5em;
}
.ql-editor .ql-indent-6:not(.ql-direction-rtl) {
padding-left: 18em;
}
.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {
padding-left: 19.5em;
}
.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 18em;
}
.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {
padding-right: 19.5em;
}
.ql-editor .ql-indent-7:not(.ql-direction-rtl) {
padding-left: 21em;
}
.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {
padding-left: 22.5em;
}
.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 21em;
}
.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {
padding-right: 22.5em;
}
.ql-editor .ql-indent-8:not(.ql-direction-rtl) {
padding-left: 24em;
}
.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {
padding-left: 25.5em;
}
.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 24em;
}
.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {
padding-right: 25.5em;
}
.ql-editor .ql-indent-9:not(.ql-direction-rtl) {
padding-left: 27em;
}
.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {
padding-left: 28.5em;
}
.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 27em;
}
.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {
padding-right: 28.5em;
}
.ql-editor .ql-video {
display: block;
max-width: 100%;
}
.ql-editor .ql-video.ql-align-center {
margin: 0 auto;
}
.ql-editor .ql-video.ql-align-right {
margin: 0 0 0 auto;
}
.ql-editor .ql-bg-black {
background-color: #000;
}
.ql-editor .ql-bg-red {
background-color: #e60000;
}
.ql-editor .ql-bg-orange {
background-color: #f90;
}
.ql-editor .ql-bg-yellow {
background-color: #ff0;
}
.ql-editor .ql-bg-green {
background-color: #008a00;
}
.ql-editor .ql-bg-blue {
background-color: #06c;
}
.ql-editor .ql-bg-purple {
background-color: #93f;
}
.ql-editor .ql-color-white {
color: #fff;
}
.ql-editor .ql-color-red {
color: #e60000;
}
.ql-editor .ql-color-orange {
color: #f90;
}
.ql-editor .ql-color-yellow {
color: #ff0;
}
.ql-editor .ql-color-green {
color: #008a00;
}
.ql-editor .ql-color-blue {
color: #06c;
}
.ql-editor .ql-color-purple {
color: #93f;
}
.ql-editor .ql-font-serif {
font-family: Georgia, Times New Roman, serif;
}
.ql-editor .ql-font-monospace {
font-family: Monaco, Courier New, monospace;
}
.ql-editor .ql-size-small {
font-size: 0.75em;
}
.ql-editor .ql-size-large {
font-size: 1.5em;
}
.ql-editor .ql-size-huge {
font-size: 2.5em;
}
.ql-editor .ql-direction-rtl {
direction: rtl;
text-align: inherit;
}
.ql-editor .ql-align-center {
text-align: center;
}
.ql-editor .ql-align-justify {
text-align: justify;
}
.ql-editor .ql-align-right {
text-align: right;
}
.ql-editor.ql-blank::before {
color: rgba(0,0,0,0.6);
content: attr(data-placeholder);
font-style: italic;
left: 15px;
pointer-events: none;
position: absolute;
right: 15px;
}
.ql-snow.ql-toolbar:after,
.ql-snow .ql-toolbar:after {
clear: both;
content: '';
display: table;
}
.ql-snow.ql-toolbar button,
.ql-snow .ql-toolbar button {
background: none;
border: none;
cursor: pointer;
display: inline-block;
float: left;
height: 24px;
padding: 3px 5px;
width: 28px;
}
.ql-snow.ql-toolbar button svg,
.ql-snow .ql-toolbar button svg {
float: left;
height: 100%;
}
.ql-snow.ql-toolbar button:active:hover,
.ql-snow .ql-toolbar button:active:hover {
outline: none;
}
.ql-snow.ql-toolbar input.ql-image[type=file],
.ql-snow .ql-toolbar input.ql-image[type=file] {
display: none;
}
.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover,
.ql-snow.ql-toolbar button:focus,
.ql-snow .ql-toolbar button:focus,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow .ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label:hover,
.ql-snow .ql-toolbar .ql-picker-label:hover,
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
.ql-snow .ql-toolbar .ql-picker-label.ql-active,
.ql-snow.ql-toolbar .ql-picker-item:hover,
.ql-snow .ql-toolbar .ql-picker-item:hover,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected {
color: #06c;
}
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow .ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button:focus .ql-fill,
.ql-snow .ql-toolbar button:focus .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,
.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {
fill: #06c;
}
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button:focus .ql-stroke,
.ql-snow .ql-toolbar button:focus .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,
.ql-snow.ql-toolbar button:hover .ql-stroke-miter,
.ql-snow .ql-toolbar button:hover .ql-stroke-miter,
.ql-snow.ql-toolbar button:focus .ql-stroke-miter,
.ql-snow .ql-toolbar button:focus .ql-stroke-miter,
.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,
.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {
stroke: #06c;
}
@media (pointer: coarse) {
.ql-snow.ql-toolbar button:hover:not(.ql-active),
.ql-snow .ql-toolbar button:hover:not(.ql-active) {
color: #444;
}
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {
fill: #444;
}
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,
.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,
.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {
stroke: #444;
}
}
.ql-snow {
box-sizing: border-box;
}
.ql-snow * {
box-sizing: border-box;
}
.ql-snow .ql-hidden {
display: none;
}
.ql-snow .ql-out-bottom,
.ql-snow .ql-out-top {
visibility: hidden;
}
.ql-snow .ql-tooltip {
position: absolute;
transform: translateY(10px);
}
.ql-snow .ql-tooltip a {
cursor: pointer;
text-decoration: none;
}
.ql-snow .ql-tooltip.ql-flip {
transform: translateY(-10px);
}
.ql-snow .ql-formats {
display: inline-block;
vertical-align: middle;
}
.ql-snow .ql-formats:after {
clear: both;
content: '';
display: table;
}
.ql-snow .ql-stroke {
fill: none;
stroke: #444;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 2;
}
.ql-snow .ql-stroke-miter {
fill: none;
stroke: #444;
stroke-miterlimit: 10;
stroke-width: 2;
}
.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
fill: #444;
}
.ql-snow .ql-empty {
fill: none;
}
.ql-snow .ql-even {
fill-rule: evenodd;
}
.ql-snow .ql-thin,
.ql-snow .ql-stroke.ql-thin {
stroke-width: 1;
}
.ql-snow .ql-transparent {
opacity: 0.4;
}
.ql-snow .ql-direction svg:last-child {
display: none;
}
.ql-snow .ql-direction.ql-active svg:last-child {
display: inline;
}
.ql-snow .ql-direction.ql-active svg:first-child {
display: none;
}
.ql-snow .ql-editor h1 {
font-size: 2em;
}
.ql-snow .ql-editor h2 {
font-size: 1.5em;
}
.ql-snow .ql-editor h3 {
font-size: 1.17em;
}
.ql-snow .ql-editor h4 {
font-size: 1em;
}
.ql-snow .ql-editor h5 {
font-size: 0.83em;
}
.ql-snow .ql-editor h6 {
font-size: 0.67em;
}
.ql-snow .ql-editor a {
text-decoration: underline;
}
.ql-snow .ql-editor blockquote {
border-left: 4px solid #ccc;
margin-bottom: 5px;
margin-top: 5px;
padding-left: 16px;
}
.ql-snow .ql-editor code,
.ql-snow .ql-editor pre {
background-color: #f0f0f0;
border-radius: 3px;
}
.ql-snow .ql-editor pre {
white-space: pre-wrap;
margin-bottom: 5px;
margin-top: 5px;
padding: 5px 10px;
}
.ql-snow .ql-editor code {
font-size: 85%;
padding: 2px 4px;
}
.ql-snow .ql-editor pre.ql-syntax {
background-color: #23241f;
color: #f8f8f2;
overflow: visible;
}
.ql-snow .ql-editor img {
max-width: 100%;
}
.ql-snow .ql-picker {
color: #444;
display: inline-block;
float: left;
font-size: 14px;
font-weight: 500;
height: 24px;
position: relative;
vertical-align: middle;
}
.ql-snow .ql-picker-label {
cursor: pointer;
display: inline-block;
height: 100%;
padding-left: 8px;
padding-right: 2px;
position: relative;
width: 100%;
}
.ql-snow .ql-picker-label::before {
display: inline-block;
line-height: 22px;
}
.ql-snow .ql-picker-options {
background-color: #fff;
display: none;
min-width: 100%;
padding: 4px 8px;
position: absolute;
white-space: nowrap;
}
.ql-snow .ql-picker-options .ql-picker-item {
cursor: pointer;
display: block;
padding-bottom: 5px;
padding-top: 5px;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label {
color: #ccc;
z-index: 2;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {
fill: #ccc;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {
stroke: #ccc;
}
.ql-snow .ql-picker.ql-expanded .ql-picker-options {
display: block;
margin-top: -1px;
top: 100%;
z-index: 1;
}
.ql-snow .ql-color-picker,
.ql-snow .ql-icon-picker {
width: 28px;
}
.ql-snow .ql-color-picker .ql-picker-label,
.ql-snow .ql-icon-picker .ql-picker-label {
padding: 2px 4px;
}
.ql-snow .ql-color-picker .ql-picker-label svg,
.ql-snow .ql-icon-picker .ql-picker-label svg {
right: 4px;
}
.ql-snow .ql-icon-picker .ql-picker-options {
padding: 4px 0px;
}
.ql-snow .ql-icon-picker .ql-picker-item {
height: 24px;
width: 24px;
padding: 2px 4px;
}
.ql-snow .ql-color-picker .ql-picker-options {
padding: 3px 5px;
width: 152px;
}
.ql-snow .ql-color-picker .ql-picker-item {
border: 1px solid transparent;
float: left;
height: 16px;
margin: 2px;
padding: 0px;
width: 16px;
}
.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
position: absolute;
margin-top: -9px;
right: 0;
top: 50%;
width: 18px;
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before {
content: attr(data-label);
}
.ql-snow .ql-picker.ql-header {
width: 98px;
}
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before {
content: 'Normal';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
content: 'Heading 1';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
content: 'Heading 2';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
content: 'Heading 3';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
content: 'Heading 4';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
content: 'Heading 5';
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
content: 'Heading 6';
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
font-size: 2em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
font-size: 1.5em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
font-size: 1.17em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
font-size: 1em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
font-size: 0.83em;
}
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
font-size: 0.67em;
}
.ql-snow .ql-picker.ql-font {
width: 108px;
}
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
content: 'Sans Serif';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
content: 'Serif';
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
content: 'Monospace';
}
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {
font-family: Georgia, Times New Roman, serif;
}
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {
font-family: Monaco, Courier New, monospace;
}
.ql-snow .ql-picker.ql-size {
width: 98px;
}
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
content: 'Normal';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
content: 'Small';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
content: 'Large';
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
content: 'Huge';
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {
font-size: 10px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {
font-size: 18px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {
font-size: 32px;
}
.ql-snow .ql-color-picker.ql-background .ql-picker-item {
background-color: #fff;
}
.ql-snow .ql-color-picker.ql-color .ql-picker-item {
background-color: #000;
}
.ql-toolbar.ql-snow {
border: 1px solid #ccc;
box-sizing: border-box;
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
padding: 8px;
}
.ql-toolbar.ql-snow .ql-formats {
margin-right: 15px;
}
.ql-toolbar.ql-snow .ql-picker-label {
border: 1px solid transparent;
}
.ql-toolbar.ql-snow .ql-picker-options {
border: 1px solid transparent;
box-shadow: rgba(0,0,0,0.2) 0 2px 8px;
}
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {
border-color: #ccc;
}
.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
border-color: #ccc;
}
.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,
.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {
border-color: #000;
}
.ql-toolbar.ql-snow + .ql-container.ql-snow {
border-top: 0px;
}
.ql-snow .ql-tooltip {
background-color: #fff;
border: 1px solid #ccc;
box-shadow: 0px 0px 5px #ddd;
color: #444;
padding: 5px 12px;
white-space: nowrap;
}
.ql-snow .ql-tooltip::before {
content: "Visit URL:";
line-height: 26px;
margin-right: 8px;
}
.ql-snow .ql-tooltip input[type=text] {
display: none;
border: 1px solid #ccc;
font-size: 13px;
height: 26px;
margin: 0px;
padding: 3px 5px;
width: 170px;
}
.ql-snow .ql-tooltip a.ql-preview {
display: inline-block;
max-width: 200px;
overflow-x: hidden;
text-overflow: ellipsis;
vertical-align: top;
}
.ql-snow .ql-tooltip a.ql-action::after {
border-right: 1px solid #ccc;
content: 'Edit';
margin-left: 16px;
padding-right: 8px;
}
.ql-snow .ql-tooltip a.ql-remove::before {
content: 'Remove';
margin-left: 8px;
}
.ql-snow .ql-tooltip a {
line-height: 26px;
}
.ql-snow .ql-tooltip.ql-editing a.ql-preview,
.ql-snow .ql-tooltip.ql-editing a.ql-remove {
display: none;
}
.ql-snow .ql-tooltip.ql-editing input[type=text] {
display: inline-block;
}
.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
border-right: 0px;
content: 'Save';
padding-right: 0px;
}
.ql-snow .ql-tooltip[data-mode=link]::before {
content: "Enter link:";
}
.ql-snow .ql-tooltip[data-mode=formula]::before {
content: "Enter formula:";
}
.ql-snow .ql-tooltip[data-mode=video]::before {
content: "Enter video:";
}
.ql-snow a {
color: #06c;
}
.ql-container.ql-snow {
border: 1px solid #ccc;
}

11489
assets/js/quill.js Normal file

File diff suppressed because it is too large Load Diff

65
main.js
View File

@ -8,12 +8,14 @@ let onlineStatus = true;
const { dialog } = require('electron');
const saveFile = require('./savexml')
require('dotenv').config({ path: path.join(__dirname, '.env') });
// const Quill = require('quill');
let mainWindow;
const auto_close= process.env.DISABLE_AUTO_CLOSE;
const auto_close_time = parseInt(process.env.AUTO_CLOSE_TIME) * 1000;
// console.assert(condition, message);
async function createWindow() {
@ -23,13 +25,22 @@ async function createWindow() {
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true, //this added for paste content
clipboard: true ////this added for paste content
},
});
// mainWindow.webContents.on('will-navigate', (event) => {
// mainWindow.webContents.setVisualZoomLevelLimits(5, 3);
// event.preventDefault();
// });
// mainWindow.removeMenu()
mainWindow.loadFile('dashboard.html'); // Create an HTML file for your interface
if(process.env.ENABLE_DEV_TOOLS === 'TRUE')
{
if (mainWindow) {
@ -49,6 +60,19 @@ async function createWindow() {
});
setInterval(checkInternetConnection, 5000);
// const divIds = ['richText', 'editor-container-2', 'editor-container-3'];
// const editors = {};
// divIds.forEach(divId => {
// const editor = new Quill(`.${divId}`, {
// theme: 'snow',
// // Mention and other configurations can be added here if needed
// });
// // Store the editors in an object or an array if you need to access them later
// editors[divId] = editor;
// });
}
@ -68,13 +92,25 @@ function buildCustomMenu() {
label: 'Edit',
submenu: [
{
role: 'copy',
label: 'Copy',
accelerator: 'CmdOrCtrl+C',
click: () => {
mainWindow.webContents.copy();
},
},
{
role: 'cut',
label: 'Cut',
accelerator: 'CmdOrCtrl+X',
click: () => {
mainWindow.webContents.cut();
},
},
{
role: 'paste',
label: 'Paste',
accelerator: 'CmdOrCtrl+V',
click: () => {
mainWindow.webContents.paste();
},
},
{
role: 'undo',
@ -82,7 +118,7 @@ function buildCustomMenu() {
{
role: 'redo',
},
].filter(Boolean),
].filter(Boolean),
},
{
label: 'View',
@ -110,7 +146,7 @@ function buildCustomMenu() {
{
role: 'togglefullscreen',
},
].filter(Boolean),
].filter(Boolean),
},
{
label: 'Window',
@ -123,6 +159,25 @@ function buildCustomMenu() {
},
].filter(Boolean),
},
{
label: 'Developer',
submenu: [
{
label: 'Toggle Developer Tools',
accelerator: 'CmdOrCtrl+Shift+I',
click: () => {
mainWindow.webContents.toggleDevTools();
},
},
{
label: 'Reload',
accelerator: 'CmdOrCtrl+R',
click: () => {
mainWindow.reload();
},
},
],
},
];
return Menu.buildFromTemplate(template);

View File

@ -1,6 +1,9 @@
const { css } = require("jquery");
// Initialize an array to store the expanded section data-ids
const expandedSections = [];
function navpane() {
// Sample JSON data
let isHighlighted = false;
let currentlyHighlightedElement = null; // Track the currently highlighted element
@ -31,11 +34,14 @@ function navpane() {
function createTree(data, container) {
data.sections.forEach(section => {
const sectionDiv = document.createElement('div');
var sectionDiv = document.createElement('div');
const sectionId = section.section_id;;
sectionDiv.setAttribute('data-id', sectionId);
sectionDiv.className = 'section main-heading';
// console.log(section);
// console.log(typeof sectionDiv);
var a= sectionDiv.outerHTML
var splitedSectionId = sectionId.split("_")[3];
var SectionBox_RawID = 'SectionBox_'+splitedSectionId;
var SectionBoxID = document.getElementById(SectionBox_RawID)
@ -50,7 +56,7 @@ function navpane() {
sectionDiv.classList.add('collapsed');
}
if(editPage == 1)
if(editPage == 1 || editPage == null)
{
sectionDiv.classList.add('collapsed');
}
@ -92,7 +98,7 @@ function navpane() {
}
});
if(editPage == 1)
if(editPage == 1 || editPage == null)
{
sectionDiv.classList.add('collapsed');
@ -115,11 +121,22 @@ function navpane() {
}
// s {
// text-decoration: none !important;
// color: inherit;
// cursor: auto;
// }
const sectionLink = document.createElement('a');
var sectionLink = document.createElement('a');
sectionLink.href = '#' + section.section_id;
// Attach the scroll function to the hyperlinks
sectionLink.style.textOverflow ='ellipsis';
sectionLink.style.whiteSpace= 'nowrap';
sectionLink.style.overflow ='hidden';
sectionLink.style.display ='-webkit-inline-box';
sectionLink.style.maxWidth = '190px';
sectionLink.style.fontWeight = '100';
// Attach the scroll function to the hyperlinks
sectionLink.addEventListener('click', function(e) {
e.preventDefault(); // Prevent the default behavior of the link
const targetId = this.getAttribute('href').substring(1); // Get the target element's ID
@ -128,34 +145,86 @@ function navpane() {
sectionLink.style.color = '#000000';
//click event listener to toggle highlighting and boldness if click the Section
sectionLink.addEventListener('click', function () {
// sectionLink.addEventListener('click', function () {
// if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== sectionLink) {
// currentlyHighlightedElement.style.fontWeight = 'normal';
// }
// if (currentlyHighlightedElement === sectionLink) {
// sectionLink.style.fontWeight = sectionLink.style.fontWeight === '400' ? 'normal' : '400';
// } else {
// sectionLink.style.fontWeight = '400';
// currentlyHighlightedElement = sectionLink;
// }
// });
sectionLink.addEventListener('mouseover', function () {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== sectionLink) {
currentlyHighlightedElement.style.fontWeight = 'normal';
currentlyHighlightedElement.style.fontWeight = '100';
}
if (currentlyHighlightedElement === sectionLink) {
sectionLink.style.fontWeight = sectionLink.style.fontWeight === 'bold' ? 'normal' : 'bold';
} else {
sectionLink.style.fontWeight = 'bold';
currentlyHighlightedElement = sectionLink;
}
sectionDiv.style.backgroundColor ='#fcdddd';
sectionDiv.style.border = '5px solid #fcdddd';
sectionDiv.style.color ='black';
sectionDiv.style.marginLeft ='-67px';
sectionDiv.style.paddingLeft='67px';
sectionDiv.style.marginRight= '-75px'
currentlyHighlightedElement = sectionLink;
});
SectionBoxID.addEventListener('click', function() {
sectionLink.addEventListener('mouseout', function () {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== sectionLink) {
currentlyHighlightedElement.style.fontWeight = 'normal';
}
if (currentlyHighlightedElement === sectionLink) {
sectionLink.style.fontWeight = sectionLink.style.fontWeight === 'bold' ? 'normal' : 'bold';
} else {
sectionLink.style.fontWeight = 'bold';
currentlyHighlightedElement = sectionLink;
currentlyHighlightedElement.style.fontWeight = '100';
}
sectionDiv.style.backgroundColor='white'
sectionDiv.style.border='white'
sectionLink.style.fontWeight = '100';
});
// SectionBoxID.addEventListener('click', function() {
// if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== sectionLink) {
// currentlyHighlightedElement.style.fontWeight = 'normal';
// }
// if (currentlyHighlightedElement === sectionLink) {
// sectionLink.style.fontWeight = sectionLink.style.fontWeight === '400' ? 'normal' : '400';
// } else {
// sectionLink.style.fontWeight = '400';
// currentlyHighlightedElement = sectionLink;
// }
// });
SectionBoxID.addEventListener('mouseover', function() {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== sectionLink) {
currentlyHighlightedElement.style.fontWeight = '100';
}
sectionDiv.style.backgroundColor ='#fcdddd';
sectionDiv.style.border = '5px solid #fcdddd';
sectionDiv.style.borderRadius = '5px';
sectionDiv.style.color ='black';
sectionDiv.style.marginLeft ='-67px';
sectionDiv.style.paddingLeft='67px';
sectionDiv.style.marginRight= '-75px'
sectionLink.style.fontWeight = '100';
currentlyHighlightedElement = sectionLink;
});
SectionBoxID.addEventListener('mouseout', function() {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== sectionLink) {
currentlyHighlightedElement.style.fontWeight = '100';
}
sectionDiv.style.backgroundColor='white'
sectionDiv.style.border='white'
sectionLink.style.fontWeight = '100';
});
if (section.section_title == null || typeof section.section_title === 'undefined') {
section.section_title = "sampletitle";
}
@ -175,7 +244,6 @@ function navpane() {
const nodeDiv = document.createElement('div');
nodeDiv.className = "navContain";
// nodeDiv.id = nodeData.textQuestion_Id || nodeData.choice_question_id;
const nodeDataId = nodeData.question_Id
const nodeDataType = nodeData.question_type
@ -225,7 +293,8 @@ function navpane() {
const questionLink = document.createElement('a');
questionLink.href = '#' + nodeDataId;
// const questionlinkDiv =document.querySelectorAll('.navContain')
// console.log(questionlinkDiv);
// Attach the scroll function to the hyperlinks
questionLink.addEventListener('click', function(e) {
e.preventDefault(); // Prevent the default behavior of the link
@ -243,32 +312,113 @@ function navpane() {
}
QuestionID.addEventListener('click', function () {
// QuestionID.addEventListener('click', function () {
// if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== questionLink) {
// currentlyHighlightedElement.style.fontWeight = 'normal';
// }
// if (currentlyHighlightedElement === questionLink) {
// questionLink.style.fontWeight = questionLink.style.fontWeight === '400' ? 'normal' : '400';
// questionLink.style.backgroundColor = 'white';
// currentlyHighlightedElement =null
// } else {
// questionLink.style.fontWeight = '400';
// questionLink.style.backgroundColor = '#1D3557';
// QuestionID.style.fontWeight = 'normal';
// currentlyHighlightedElement = questionLink;
// }
// });
QuestionID.addEventListener('mouseover', function () {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== questionLink) {
currentlyHighlightedElement.style.fontWeight = '100';
}
// questionLink.style.fontWeight = '500';
// nodeDiv.style.fontWeight = '500';
nodeDiv.style.backgroundColor ='#fcdddd';
nodeDiv.style.border = '5px solid #fcdddd';
nodeDiv.style.borderRadius = '5px';
nodeDiv.style.color ='black';
nodeDiv.style.marginLeft ='-67px';
nodeDiv.style.paddingLeft='67px';
nodeDiv.style.marginRight= '-75px'
QuestionID.style.fontWeight = '100';
currentlyHighlightedElement = nodeDiv;
});
QuestionID.addEventListener('mouseout', function () {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== questionLink) {
currentlyHighlightedElement.style.fontWeight = 'normal';
}
if (currentlyHighlightedElement === questionLink) {
questionLink.style.fontWeight = questionLink.style.fontWeight === 'bold' ? 'normal' : 'bold';
} else {
questionLink.style.fontWeight = 'bold';
QuestionID.style.fontWeight = 'normal';
currentlyHighlightedElement = questionLink;
}
// questionLink.style.fontWeight = questionLink.style.fontWeight === '400' ? 'normal' : '400';
// questionLink.style.backgroundColor = 'white';
// questionLink.style.border = 'none';
// questionLink.style.borderRadius = '5px';
questionLink.style.color = ' black';
// nodeDiv.style.fontWeight = questionLink.style.fontWeight === '400' ? 'normal' : '400';
nodeDiv.style.backgroundColor = 'white';
nodeDiv.style.border = 'none';
nodeDiv.style.borderRadius = '5px';
nodeDiv.style.color = ' black';
nodeDiv.style.marginLeft ='0px';
nodeDiv.style.paddingLeft='0px';
currentlyHighlightedElement =null
});
questionLink.addEventListener('click', function () {
// questionLink.addEventListener('click', function () {
// if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== questionLink) {
// currentlyHighlightedElement.style.fontWeight = 'normal';
// }
// if (currentlyHighlightedElement === questionLink) {
// questionLink.style.fontWeight = questionLink.style.fontWeight === '400' ? 'normal' : '400';
// questionLink.style.backgroundColor = 'white';
// currentlyHighlightedElement =null
// } else {
// questionLink.style.fontWeight = '400';
// questionLink.style.backgroundColor = '#1D3557';
// currentlyHighlightedElement = questionLink;
// }
// });
questionLink.addEventListener('mouseover', function () {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== questionLink) {
currentlyHighlightedElement.style.fontWeight = 'normal';
currentlyHighlightedElement.style.fontWeight = '100';
}
if (currentlyHighlightedElement === questionLink) {
questionLink.style.fontWeight = questionLink.style.fontWeight === 'bold' ? 'normal' : 'bold';
} else {
questionLink.style.fontWeight = 'bold';
// questionLink.style.fontWeight = '500';
// questionLink.style.color = ' rgb(255 255 255)';
// nodeDiv.style.fontWeight = '500';
nodeDiv.style.backgroundColor = '#fcdddd';
nodeDiv.style.border = '5px solid #fcdddd';
nodeDiv.style.borderRadius = '5px';
// nodeDiv.style.color = ' rgb(255 255 255)';
nodeDiv.style.color ='black';
nodeDiv.style.marginLeft ='-67px';
nodeDiv.style.paddingLeft='67px';
nodeDiv.style.marginRight= '-75px';
nodeDiv.style.borderLeftWidth= '-75px';
currentlyHighlightedElement = questionLink;
}
});
questionLink.addEventListener('mouseout', function () {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== questionLink) {
currentlyHighlightedElement.style.fontWeight = '100';
}
// questionLink.style.fontWeight = questionLink.style.fontWeight === '400' ? 'normal' : '400';
questionLink.style.color = ' black';
// nodeDiv.style.fontWeight = questionLink.style.fontWeight === '400' ? 'normal' : '400';
nodeDiv.style.backgroundColor = 'white';
nodeDiv.style.border = 'none';
nodeDiv.style.borderRadius = '5px';
nodeDiv.style.color = ' black';
nodeDiv.style.marginLeft ='0px';
nodeDiv.style.paddingLeft='0px';
currentlyHighlightedElement =null
});
if (nodeData.question.length > 20) {
questionLink.innerHTML = removeParagraphTags(nodeData.question.substring(0, 20) + '...');
} else {
@ -297,7 +447,7 @@ function navpane() {
groupTitleDiv.classList.add('collapsed');
}
if(editPage == 1){
if(editPage == 1 || editPage == null){
groupTitleDiv.classList.add('collapsed');
@ -307,6 +457,7 @@ function navpane() {
const groupTitleArrow = document.createElement('span');
groupTitleArrow.className = 'arrow-right';
groupTitleArrow.style.cursor = 'pointer';
groupTitleDiv.appendChild(groupTitleArrow);
@ -341,7 +492,7 @@ function navpane() {
});
if(editPage == 1){
if(editPage == 1 || editPage == null){
groupQuestionsDiv.classList.toggle('visible');
groupTitleDiv.classList.toggle('collapsed');
@ -372,32 +523,166 @@ function navpane() {
scrollToElement(targetId);
});
groupQuestionLink.style.color = '#000000';
let currentlyHighlightedElement = null;
// groupQuestionLink.addEventListener('click', () => {
// if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== groupQuestionLink) {
// currentlyHighlightedElement.style.fontWeight = 'normal';
// currentlyHighlightedElement.style.border = 'none';
// currentlyHighlightedElement.style.backgroundColor = 'white';
// currentlyHighlightedElement.style.borderWidth = 'none';
// }
// if (currentlyHighlightedElement === groupQuestionLink) {
// groupQuestionLink.style.fontWeight = 'normal';
// groupQuestionLink.style.border = 'none';
// groupQuestionLink.style.backgroundColor = 'white';
// groupQuestionLink.style.borderWidth = 'none';
// groupQuestionLink.style.color = 'black';
// currentlyHighlightedElement = null;
// } else {
// groupQuestionLink.style.fontWeight = '400';
// groupQuestionLink.style.border = '5px solid #1D3557';
// groupQuestionLink.style.borderRadius = '5px';
// // groupQuestionLink.style.borderWidth= '10px'
// groupQuestionLink.style.backgroundColor = '#1D3557';
// groupQuestionLink.style.color=' rgb(255 255 255)'
// currentlyHighlightedElement = groupQuestionLink;
// }
// });
groupQuestionLink.addEventListener('mouseover', () => {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== groupQuestionLink) {
currentlyHighlightedElement.style.fontWeight = '100';
currentlyHighlightedElement.style.border = 'none';
currentlyHighlightedElement.style.backgroundColor = 'white';
currentlyHighlightedElement.style.borderWidth = 'none';
}
// groupQuestionLink.style.fontWeight = '400';
// groupQuestionLink.style.border = '5px solid #1D3557';
// groupQuestionLink.style.borderRadius = '5px';
// // groupQuestionLink.style.borderWidth= '10px'
// groupQuestionLink.style.backgroundColor = '#1D3557';
// groupQuestionLink.style.color=' rgb(255 255 255)';
groupQuestionLink.style.color= 'black';
groupTitleDiv.style.color='black';
groupTitleDiv.style.fontWeight = '100';
groupTitleDiv.style.border = '5px solid #fcdddd';
groupTitleDiv.style.borderRadius = '5px';
groupTitleDiv.style.backgroundColor = '#fcdddd';
groupTitleDiv.style.marginLeft ='-67px';
groupTitleDiv.style.paddingLeft='67px';
groupTitleDiv.style.marginRight= '-75px';
groupTitleDiv.style.borderLeftWidth= '-75px';
currentlyHighlightedElement = groupQuestionLink;
});
groupQuestionLink.addEventListener('mouseout', () => {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== groupQuestionLink) {
currentlyHighlightedElement.style.fontWeight = 'normal';
currentlyHighlightedElement.style.border = 'none';
currentlyHighlightedElement.style.backgroundColor = 'white';
currentlyHighlightedElement.style.borderWidth = 'none';
}
// groupQuestionLink.style.fontWeight = 'normal';
// groupQuestionLink.style.border = 'none';
// groupQuestionLink.style.backgroundColor = 'white';
// groupQuestionLink.style.borderWidth = 'none';
groupQuestionLink.style.color = 'black';
// currentlyHighlightedElement = null;
groupTitleDiv.style.fontWeight = 'normal';
groupTitleDiv.style.border = 'none';
groupTitleDiv.style.backgroundColor = 'white';
groupTitleDiv.style.borderWidth = 'none';
groupTitleDiv.style.color = 'black';
groupTitleDiv.style.marginLeft ='0px';
groupTitleDiv.style.paddingLeft='0px';
currentlyHighlightedElement = null;
});
// GroupBoxID.addEventListener('click', function () {
// if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== groupQuestionLink) {
// currentlyHighlightedElement.style.fontWeight = 'normal';
// currentlyHighlightedElement.style.border = 'none';
// currentlyHighlightedElement.style.backgroundColor = 'white';
// currentlyHighlightedElement.style.borderWidth = 'none';
// }
groupQuestionLink.addEventListener('click', function () {
// if (currentlyHighlightedElement === groupQuestionLink) {
// groupQuestionLink.style.fontWeight = 'normal';
// groupQuestionLink.style.border = 'none';
// groupQuestionLink.style.backgroundColor = 'white';
// groupQuestionLink.style.borderWidth = 'none';
// groupQuestionLink.style.borderRadius = '0px';
// groupQuestionLink.style.color = 'black';
// currentlyHighlightedElement = null;
// } else {
// groupQuestionLink.style.fontWeight = '400';
// groupQuestionLink.style.border = '5px solid #1D3557';
// groupQuestionLink.style.backgroundColor = '#1D3557';
// groupQuestionLink.style.borderWidth= '10px'
// // groupQuestionLink.style.borderWidth = '5px';
// groupQuestionLink.style.borderRadius = '5px';
// groupQuestionLink.style.color = 'rgb(255 255 255)';
// GroupBoxID.style.fontWeight = 'normal';
// currentlyHighlightedElement = groupQuestionLink;
// }
// });
GroupBoxID.addEventListener('mouseout', function () {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== groupQuestionLink) {
currentlyHighlightedElement.style.fontWeight = 'normal';
currentlyHighlightedElement.style.border = 'none';
currentlyHighlightedElement.style.backgroundColor = 'white';
currentlyHighlightedElement.style.borderWidth = 'none';
}
if (currentlyHighlightedElement === groupQuestionLink) {
groupQuestionLink.style.fontWeight = groupQuestionLink.style.fontWeight === 'bold' ? 'normal' : 'bold';
} else {
groupQuestionLink.style.fontWeight = 'bold';
currentlyHighlightedElement = groupQuestionLink;
}
groupQuestionLink.style.color = 'black';
groupTitleDiv.style.fontWeight = 'normal';
groupTitleDiv.style.border = 'none';
groupTitleDiv.style.backgroundColor = 'white';
groupTitleDiv.style.borderWidth = 'none';
groupTitleDiv.style.color = 'black';
groupTitleDiv.style.marginLeft ='0px';
groupTitleDiv.style.paddingLeft='0px';
currentlyHighlightedElement = null;
});
GroupBoxID.addEventListener('click', function () {
GroupBoxID.addEventListener('mouseover', function () {
if (currentlyHighlightedElement !== null && currentlyHighlightedElement !== groupQuestionLink) {
currentlyHighlightedElement.style.fontWeight = 'normal';
currentlyHighlightedElement.style.border = 'none';
currentlyHighlightedElement.style.backgroundColor = 'white';
currentlyHighlightedElement.style.borderWidth = 'none';
}
if (currentlyHighlightedElement === groupQuestionLink) {
groupQuestionLink.style.fontWeight = groupQuestionLink.style.fontWeight === 'bold' ? 'normal' : 'bold';
} else {
groupQuestionLink.style.fontWeight = 'bold';
GroupBoxID.style.fontWeight = 'normal';
currentlyHighlightedElement = groupQuestionLink;
}
groupTitleDiv.style.fontWeight = '400';
groupTitleDiv.style.border = '5px solid #fcdddd';
groupTitleDiv.style.borderRadius = '5px';
groupTitleDiv.style.backgroundColor = '#fcdddd';
groupQuestionLink.style.color= 'black';
groupTitleDiv.style.marginLeft ='-67px';
groupTitleDiv.style.paddingLeft='67px';
groupTitleDiv.style.marginRight= '-75px';
groupTitleDiv.style.borderLeftWidth= '-75px';
GroupBoxID.style.fontWeight = 'normal';
currentlyHighlightedElement = groupQuestionLink;
});
if (nodeData.group_title.length > 20) {
groupQuestionLink.innerHTML = removeParagraphTags(nodeData.group_title.substring(0, 20) + '..');

1001
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,7 @@
"dotenv": "^16.3.1",
"electron-dl": "^3.5.1",
"electron-download-manager": "^2.1.2",
"electron-context-menu": "^3.6.1",
"ev-emitter": "^2.1.2",
"fizzy-ui-utils": "^3.0.0",
"formidable": "^3.5.1",
@ -33,8 +34,12 @@
"jquery-ui": "^1.13.2",
"jsdom": "^22.1.0",
"mathjax": "^3.2.2",
"mathjax-node": "^2.1.1",
"mathlive": "^0.95.5",
"quill": "^1.3.6",
"quill": "^1.3.7",
"quill-image-resize": "^3.0.9",
"quill-image-resize-module": "^3.0.0",
"quill-resize-module": "^1.2.4",
"sweetalert2": "^11.6.13",
"tinymce": "^6.7.0",
"tippy.js": "^6.3.7",

View File

@ -1,18 +1,16 @@
function rtc_hide_and_show(rtcid) {
// console.log('show id :'+rtcid)
var id = localStorage.getItem('rtc');
var hideid = document.getElementById(id);
// console.log('hide id :' + id)
$(hideid).hide();
var showid = document.getElementById(rtcid);
console.log('hide id :' + id)
$(showid).show();
localStorage.setItem('rtc',rtcid);
};
function add_button_hide_and_show(BtnID){
// console.log('show id :'+BtnID)

View File

@ -1762,7 +1762,9 @@ input::focus {
border-radius: 5px;
overflow: hidden;
margin-top: 5px;
background: linear-gradient(to right,#533dfd,#730fd5);
/* background: linear-gradient(to right,#533dfd,#730fd5); */
/* background: linear-gradient(to right,darkred, #BF303B); */
background: #1D3557;
border: none;
margin-right: 15px;
width:130px;
@ -1775,7 +1777,8 @@ input::focus {
}
.form-button button:hover {
color: #fff;
background: linear-gradient(to left, #533efe, #740fd6);
background: linear-gradient(to right, #BF303B,darkred);
/* background: linear-gradient(to left, #533efe, #740fd6); */
}
/*<!-- ============================================================== -->
<!-- Start pricing-area Css -->
@ -3329,6 +3332,7 @@ a.main_sticky {
padding: 0 10px 20px;
width: 235px;
height: -webkit-fill-available;
margin-left: -10px; /*add this for navbar hover*/
}
.question{
@ -3603,7 +3607,7 @@ margin-bottom: 0px;
/* section menu button */
.menuButton{
.showPopupButton.menuButton{
display: inline-block;
color: #fff;
font-weight: 400;
@ -3616,12 +3620,34 @@ z-index: 1;
border-radius: 5px;
overflow: hidden;
/* margin-top: 5px; */
background: linear-gradient(to right,#533dfd,#730fd5);
/* background: linear-gradient(to right,#533dfd,#730fd5); */
background: linear-gradient(to right,darkred, #BF303B);
border: none;
/* margin-right: 15px; */
width:85px;
}
.menuButton{
display: inline-block;
color: #fff;
font-weight: 400;
padding: 2px 0px;
text-transform: capitalize;
transition: 0.5s;
font-size: 15px;
position: relative;
z-index: 1;
border-radius: 5px;
overflow: hidden;
/* margin-top: 5px; */
/* background: linear-gradient(to right,#533dfd,#730fd5); */
/* background: linear-gradient(to right,darkred, #BF303B); */
background-color: gray;
border: none;
/* margin-right: 15px; */
width:85px;
}
.addPageMenu{
margin-top: -3px;
margin-right: 4px;
@ -3729,4 +3755,13 @@ width:85px;
}
::-webkit-scrollbar-track {
background-color: #f5f5f5;
}
}
/* #questionPaper {
font-size:small;
text-decoration: none;
font-weight: 100;
font-style: normal !important;
} */