Merge branch 'develop' of 10.196.211.3:222]:maru21/templateGen
into develop
This commit is contained in:
commit
ca697d40df
@ -49,3 +49,9 @@ a {text-decoration: none;}
|
||||
textarea {
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.logo {
|
||||
border: #202e3f;
|
||||
border-style: solid;
|
||||
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<link rel="stylesheet" href="css/font-awesome/css/all.min.css" />
|
||||
<link rel="stylesheet" href="css/styles.css" />
|
||||
|
||||
<script type="module" src="js/9.5/main.js"></script>
|
||||
<script type="module" src="js/9.7/main.js"></script>
|
||||
|
||||
|
||||
<body>
|
||||
@ -40,7 +40,7 @@
|
||||
>
|
||||
Show saved documents
|
||||
</li>
|
||||
<!-- hidden since the data should only be stored on local machine -->
|
||||
<!-- hidden since the data should only be stored on local machine -->
|
||||
<li
|
||||
class="w3-bar-item w3-padding-large w3-button"
|
||||
style="display: none; border-bottom: 2px solid rgb(221, 221, 221)"
|
||||
@ -93,7 +93,7 @@
|
||||
href="."
|
||||
id="siteTitle"
|
||||
class="w3-left-align w3-button w3-padding-large w3-flat-wet-asphalt"
|
||||
>Template Gen</a
|
||||
><img class="logo" src="logo.png" alt="logo" height="30px"></a
|
||||
>
|
||||
</div>
|
||||
|
||||
@ -265,9 +265,6 @@
|
||||
<div class="w3-modal-content w3-margin-top">
|
||||
<div class="w3-container w3-padding-32 w3-flat-clouds">
|
||||
<form method="post" action="javascript:void(0)" id="loginForm">
|
||||
<h1>Welcome to stenoDok</h1>
|
||||
<br>
|
||||
<br>
|
||||
<label> enter password: </label>
|
||||
<input
|
||||
type="password"
|
||||
|
||||
@ -69,7 +69,9 @@ function createTemplate(template = false) {
|
||||
function loadTemplateSidebar(templates) {
|
||||
let sidebarList = document.createElement("ul");
|
||||
sidebarList.classList.add("w3-ul");
|
||||
templates.push('_textBlocks');
|
||||
if (!templates.includes('_textBlocks')) {
|
||||
templates.push('_textBlocks');
|
||||
}
|
||||
|
||||
|
||||
for (let template of templates) {
|
||||
@ -45,7 +45,14 @@ function loadTemplate(template, newFlag = false, loadOnly = false) {
|
||||
cdata = retrieveData("userInputForce");
|
||||
}
|
||||
if (cdata != "") {
|
||||
retrieveForm(JSON.parse(cdata));
|
||||
let res = "";
|
||||
try {
|
||||
res = JSON.parse(cdata);
|
||||
} catch (e) {
|
||||
console.log("error", cdata);
|
||||
return;
|
||||
}
|
||||
retrieveForm(res);
|
||||
}
|
||||
|
||||
//select first object and focus on it
|
||||
@ -77,7 +84,14 @@ function loadNavBar() {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function () {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
let res = JSON.parse(this.responseText);
|
||||
let res = "";
|
||||
try {
|
||||
res = JSON.parse(this.responseText);
|
||||
} catch (e) {
|
||||
console.log("error", this.responseText);
|
||||
return;
|
||||
}
|
||||
|
||||
let divMob = document.getElementById("navMob");
|
||||
for (let x in res) {
|
||||
let aMob = document.createElement("a");
|
||||
@ -117,7 +131,13 @@ function initTextBlocks() {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function () {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
let res = JSON.parse(this.responseText);
|
||||
let res = "";
|
||||
try {
|
||||
res = JSON.parse(this.responseText);
|
||||
} catch (e) {
|
||||
console.log("error", this.responseText)
|
||||
return;
|
||||
}
|
||||
const textBlocksHolder = document.getElementById("textBlocks");
|
||||
const divReg = document.getElementById("navTb");
|
||||
for (let x in res) {
|
||||
Loading…
Reference in New Issue
Block a user