workarea math changes : RV
This commit is contained in:
parent
432adb7709
commit
87a9e1eb42
83
addform.html
83
addform.html
@ -1282,14 +1282,42 @@ $("#overlay").show();
|
|||||||
|
|
||||||
$('#workarea_math').click(function(){
|
$('#workarea_math').click(function(){
|
||||||
console.log('called');
|
console.log('called');
|
||||||
$('#workarea_math').css('margin-bottom', '190px');
|
$('#workarea_math').css('margin-bottom', '240px');
|
||||||
localStorage.setItem('workAreaMath', true);
|
localStorage.setItem('workAreaMath', true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on("click", function (event) {
|
||||||
|
|
||||||
var ids = document.getElementById('workarea_math')
|
// console.log('Clicked element id:', event.target.id);
|
||||||
console.log(ids)
|
// console.log('Clicked element:', event.target);
|
||||||
|
|
||||||
|
const targetElement = event.target;
|
||||||
|
var tragetedId = event.target.id.startsWith("ML");
|
||||||
|
const classList = Array.from(event.target.classList);
|
||||||
|
const hasMLKClass = classList.some(className => className.startsWith("MLK") || className.startsWith("row") || className.startsWith("left") || className.startsWith("ML") || className.startsWith("action"));
|
||||||
|
const isSvgElement = targetElement.closest('svg') || targetElement.closest('i');
|
||||||
|
// console.log('svg',isSvgElement);
|
||||||
|
// console.log(hasMLKClass);
|
||||||
|
|
||||||
|
if (event.target.id !== 'workarea_math' && tragetedId == false && hasMLKClass == false && isSvgElement == null) {
|
||||||
|
// console.log('Inside if');
|
||||||
|
var value = localStorage.getItem('workAreaMath');
|
||||||
|
|
||||||
|
if (value === 'true') {
|
||||||
|
// console.log('Value:', value);
|
||||||
|
$('#workarea_math').css('margin-bottom', '0px');
|
||||||
|
localStorage.removeItem('workAreaMath');
|
||||||
|
} else {
|
||||||
|
// $('#workarea_math').css('margin-bottom', '190px');
|
||||||
|
// console.log('Value is not true');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var ids = document.getElementById('workarea_math');
|
||||||
|
|
||||||
function clearMessage() {
|
function clearMessage() {
|
||||||
var val = document.getElementById('messages') ;
|
var val = document.getElementById('messages') ;
|
||||||
@ -1392,27 +1420,6 @@ $(document).on("click", function (event) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on("click", function (event) {
|
|
||||||
|
|
||||||
console.log(event.target.id);
|
|
||||||
console.log(event.target.id == 'workarea_math' ? 'true' : 'false');
|
|
||||||
|
|
||||||
if(event.target.id !== 'workarea_math')
|
|
||||||
{
|
|
||||||
var element = $('.ML__virtual-keyboard-toggle');
|
|
||||||
console.log(element);
|
|
||||||
var value = localStorage.getItem('workAreaMath');
|
|
||||||
console.log('valeu : ', value);
|
|
||||||
console.log('type : ',typeof value);
|
|
||||||
if(value === 'true'){
|
|
||||||
$('#workarea_math').css('margin-bottom', '0px');
|
|
||||||
localStorage.removeItem('workAreaMath');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// localStorage.removeItem('workAreaMath');
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
const scrollToTopBtn = document.getElementById('SaveButton');
|
const scrollToTopBtn = document.getElementById('SaveButton');
|
||||||
@ -1550,8 +1557,6 @@ function loadXML(xmlFileName) {
|
|||||||
} else{
|
} else{
|
||||||
decodeData = data;
|
decodeData = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log('jsonDecodeData : ', jsonDecodeData);
|
console.log('jsonDecodeData : ', jsonDecodeData);
|
||||||
xml2json(decodeData);
|
xml2json(decodeData);
|
||||||
|
|
||||||
@ -1742,20 +1747,20 @@ var quill = new Quill('#Question_title', {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
var quill = new Quill('#QuestionsGroupIdset ', {
|
// var quill = new Quill('#QuestionsGroupIdset ', {
|
||||||
|
|
||||||
theme: 'snow',
|
// theme: 'snow',
|
||||||
modules: {
|
// modules: {
|
||||||
toolbar: toolbarOptions,
|
// toolbar: toolbarOptions,
|
||||||
clipboard: {
|
// clipboard: {
|
||||||
matchVisual: true,
|
// matchVisual: true,
|
||||||
},
|
// },
|
||||||
imageResize:{
|
// imageResize:{
|
||||||
displaySize:true,
|
// displaySize:true,
|
||||||
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
|
// modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
var quill = new Quill('#Question_description', {
|
var quill = new Quill('#Question_description', {
|
||||||
theme: 'snow',
|
theme: 'snow',
|
||||||
|
|||||||
26
encodeEnv.js
26
encodeEnv.js
@ -1,26 +0,0 @@
|
|||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
// Function to encode data to base64
|
|
||||||
function encodeToBase64(data) {
|
|
||||||
return Buffer.from(data, 'utf-8').toString('base64');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Function to encode .env file to base64
|
|
||||||
function encodeEnvFileToBase64(envFilePath, outputFilePath) {
|
|
||||||
// Read the content of the .env file
|
|
||||||
const envData = fs.readFileSync(envFilePath, 'utf-8');
|
|
||||||
|
|
||||||
// Encode the data to base64
|
|
||||||
const base64Data = encodeToBase64(envData);
|
|
||||||
|
|
||||||
// Write the base64-encoded data to a new file
|
|
||||||
fs.writeFileSync(outputFilePath, base64Data, 'utf-8');
|
|
||||||
|
|
||||||
console.log('File encoded to base64 successfully.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Example usage
|
|
||||||
const envFilePath = '/.env';
|
|
||||||
const outputFilePath = '/encoded_base64.env';
|
|
||||||
|
|
||||||
encodeEnvFileToBase64(envFilePath, outputFilePath);
|
|
||||||
@ -1,5 +1,3 @@
|
|||||||
const { loadImage } = require("jodit/types/core/helpers");
|
|
||||||
|
|
||||||
function jsonToHtml(jsonData) {
|
function jsonToHtml(jsonData) {
|
||||||
|
|
||||||
// console.log(jsonData);
|
// console.log(jsonData);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user