fixed set form button and
list not been parsed with pell content
This commit is contained in:
parent
0a58816d4b
commit
d4f55d22ff
@ -24,4 +24,4 @@
|
|||||||
vertical-align: bottom; }
|
vertical-align: bottom; }
|
||||||
|
|
||||||
.pell-button-selected {
|
.pell-button-selected {
|
||||||
background-color: #F0F0F0; }
|
background-color: #9e9e9e; }
|
||||||
|
|||||||
@ -249,7 +249,8 @@ function formEvts() {
|
|||||||
createStorageObj("setform");
|
createStorageObj("setform");
|
||||||
let dataArray = retrieveData("userInput");
|
let dataArray = retrieveData("userInput");
|
||||||
let lT = activeState.loadedTemplate;
|
let lT = activeState.loadedTemplate;
|
||||||
setTemplatePreset(lT, dataArray);
|
console.log(lT, dataArray);
|
||||||
|
//setTemplatePreset(lT, dataArray);
|
||||||
modalNotifier("Input saved as preset", activeState.settings.notifierPause);
|
modalNotifier("Input saved as preset", activeState.settings.notifierPause);
|
||||||
}
|
}
|
||||||
if (e.target.id == "sb-item") {
|
if (e.target.id == "sb-item") {
|
||||||
|
|||||||
@ -109,8 +109,6 @@ export function logout() {
|
|||||||
document.getElementById("login").style.display = "block";
|
document.getElementById("login").style.display = "block";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export function sanitize(string) {
|
export function sanitize(string) {
|
||||||
const map = {
|
const map = {
|
||||||
'&': '_',
|
'&': '_',
|
||||||
@ -160,9 +158,8 @@ export const inputRead = {
|
|||||||
let key = (event.key !=undefined) ? event.key : "";
|
let key = (event.key !=undefined) ? event.key : "";
|
||||||
let contentElement = document.getElementById(this.source);
|
let contentElement = document.getElementById(this.source);
|
||||||
this.inputContent = (contentElement != undefined) ? contentElement.value + key : "";
|
this.inputContent = (contentElement != undefined) ? contentElement.value + key : "";
|
||||||
|
|
||||||
if (this.inputContent == "" || key == "") return;
|
if (this.inputContent == "" || key == "") return;
|
||||||
if (key.length > 1) return;
|
if (key.length > 1 && key != "Backspace" && key != "Delete" && key != "Enter") return;
|
||||||
if (event.ctrlKey) return;
|
if (event.ctrlKey) return;
|
||||||
if (this.inputContent == previousContent) return;
|
if (this.inputContent == previousContent) return;
|
||||||
|
|
||||||
|
|||||||
@ -64,6 +64,16 @@ function createStorageObj(ref = "none") {
|
|||||||
for (let i = 0; i < x.length; i++) {
|
for (let i = 0; i < x.length; i++) {
|
||||||
if (x.elements[i].name == "") continue;
|
if (x.elements[i].name == "") continue;
|
||||||
|
|
||||||
|
let parsedContent = x.elements[i].value;
|
||||||
|
parsedContent = parsedContent.replace(/<div>/g, "");
|
||||||
|
parsedContent = parsedContent.replace(/<\/div>/g, "\n");
|
||||||
|
if (ref == "setform") {
|
||||||
|
//parse pell content remove html tags
|
||||||
|
parsedContent = parsedContent.replace(/<.{1,4}>/g, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
x.elements[i].value = parsedContent;
|
||||||
|
|
||||||
dataArray.push({
|
dataArray.push({
|
||||||
value: x.elements[i].value,
|
value: x.elements[i].value,
|
||||||
name: x.elements[i].name,
|
name: x.elements[i].name,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user