From be677cf9e0d8feece1209fee6668e7bbc8a00b3d Mon Sep 17 00:00:00 2001 From: maru21 Date: Sun, 17 Sep 2023 14:03:47 +0200 Subject: [PATCH] fixed textBlock insert fixed tracking activeState.lastElement --- .gitignore | 3 +++ css/w3.css | 2 +- index.html | 5 +++-- js/{9.3 => 9.4}/buildForm.js | 0 js/{9.3 => 9.4}/createTemplate.js | 0 js/{9.3 => 9.4}/evts.js | 0 js/{9.3 => 9.4}/files.js | 0 js/{9.3 => 9.4}/form.js | 21 +++++++-------------- js/{9.3 => 9.4}/identify.js | 0 js/{9.3 => 9.4}/init.js | 0 js/{9.3 => 9.4}/main.js | 0 js/{9.3 => 9.4}/parseForm.js | 0 js/{9.3 => 9.4}/parseTemplate.js | 0 js/{9.3 => 9.4}/scripts.js | 0 js/{9.3 => 9.4}/sha256.min.js | 0 js/{9.3 => 9.4}/storage.js | 0 js/{9.3 => 9.4}/web.js | 2 +- js/{9.3 => 9.4}/xorc.js | 0 18 files changed, 15 insertions(+), 18 deletions(-) create mode 100644 .gitignore rename js/{9.3 => 9.4}/buildForm.js (100%) rename js/{9.3 => 9.4}/createTemplate.js (100%) rename js/{9.3 => 9.4}/evts.js (100%) rename js/{9.3 => 9.4}/files.js (100%) rename js/{9.3 => 9.4}/form.js (96%) rename js/{9.3 => 9.4}/identify.js (100%) rename js/{9.3 => 9.4}/init.js (100%) rename js/{9.3 => 9.4}/main.js (100%) rename js/{9.3 => 9.4}/parseForm.js (100%) rename js/{9.3 => 9.4}/parseTemplate.js (100%) rename js/{9.3 => 9.4}/scripts.js (100%) rename js/{9.3 => 9.4}/sha256.min.js (100%) rename js/{9.3 => 9.4}/storage.js (100%) rename js/{9.3 => 9.4}/web.js (99%) rename js/{9.3 => 9.4}/xorc.js (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e245175 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.vscode +font-awesome +storage/* \ No newline at end of file diff --git a/css/w3.css b/css/w3.css index 4331cac..5eff116 100644 --- a/css/w3.css +++ b/css/w3.css @@ -58,7 +58,7 @@ hr{border:0;border-top:1px solid #eee;margin:20px 0} .w3-bar-block .w3-dropdown-hover .w3-dropdown-content,.w3-bar-block .w3-dropdown-click .w3-dropdown-content{min-width:100%} .w3-bar-block .w3-dropdown-hover .w3-button,.w3-bar-block .w3-dropdown-click .w3-button{width:100%;text-align:left;padding:8px 16px} .w3-main,#main{transition:margin-left .4s} -.w3-modal{z-index:3;display:none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.6)} +.w3-modal{z-index:3;display:none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.6);backdrop-filter: blur(6px);} .w3-modal-content{margin:auto;background-color:#fff;position:relative;padding:0;outline:0;width:600px} .w3-bar{width:100%;overflow:hidden}.w3-center .w3-bar{display:inline-block;width:auto} .w3-bar .w3-bar-item{padding:8px 16px;float:left;width:auto;border:none;display:block;outline:0} diff --git a/index.html b/index.html index c6d5c4d..f536d82 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@ - + @@ -40,9 +40,10 @@ > Show saved documents +
  • Manage backup files diff --git a/js/9.3/buildForm.js b/js/9.4/buildForm.js similarity index 100% rename from js/9.3/buildForm.js rename to js/9.4/buildForm.js diff --git a/js/9.3/createTemplate.js b/js/9.4/createTemplate.js similarity index 100% rename from js/9.3/createTemplate.js rename to js/9.4/createTemplate.js diff --git a/js/9.3/evts.js b/js/9.4/evts.js similarity index 100% rename from js/9.3/evts.js rename to js/9.4/evts.js diff --git a/js/9.3/files.js b/js/9.4/files.js similarity index 100% rename from js/9.3/files.js rename to js/9.4/files.js diff --git a/js/9.3/form.js b/js/9.4/form.js similarity index 96% rename from js/9.3/form.js rename to js/9.4/form.js index 6aca279..1bbc80e 100644 --- a/js/9.3/form.js +++ b/js/9.4/form.js @@ -1,12 +1,3 @@ -//class Form { -// constructor () { -// this.buildForm = buildForm; -// this.retrieveForm = retrieveForm; -// } -// -// -// -//} import { storeData, createStorageObj } from "./storage.js"; import parseInput from "./parseTemplate.js"; @@ -272,13 +263,15 @@ function formEvts() { } }); - //add handle on blur event listener - document.getElementById("mainForm").addEventListener("click", (e) => { - if (e.target && e.target.matches("div.w3-section")) { + //add handle on blur event listener to each form object + let mainForm = document.getElementById("mainFormObj"); + for (let formElement of mainForm.children) { + let id = formElement.firstChild.lastChild.id; + document.getElementById(id).addEventListener("blur", (e) => { e.preventDefault; handleOnBlur(e.target); - } - }); + }); + } } function focusOnField(id) { diff --git a/js/9.3/identify.js b/js/9.4/identify.js similarity index 100% rename from js/9.3/identify.js rename to js/9.4/identify.js diff --git a/js/9.3/init.js b/js/9.4/init.js similarity index 100% rename from js/9.3/init.js rename to js/9.4/init.js diff --git a/js/9.3/main.js b/js/9.4/main.js similarity index 100% rename from js/9.3/main.js rename to js/9.4/main.js diff --git a/js/9.3/parseForm.js b/js/9.4/parseForm.js similarity index 100% rename from js/9.3/parseForm.js rename to js/9.4/parseForm.js diff --git a/js/9.3/parseTemplate.js b/js/9.4/parseTemplate.js similarity index 100% rename from js/9.3/parseTemplate.js rename to js/9.4/parseTemplate.js diff --git a/js/9.3/scripts.js b/js/9.4/scripts.js similarity index 100% rename from js/9.3/scripts.js rename to js/9.4/scripts.js diff --git a/js/9.3/sha256.min.js b/js/9.4/sha256.min.js similarity index 100% rename from js/9.3/sha256.min.js rename to js/9.4/sha256.min.js diff --git a/js/9.3/storage.js b/js/9.4/storage.js similarity index 100% rename from js/9.3/storage.js rename to js/9.4/storage.js diff --git a/js/9.3/web.js b/js/9.4/web.js similarity index 99% rename from js/9.3/web.js rename to js/9.4/web.js index ed5b7cd..846abf2 100644 --- a/js/9.3/web.js +++ b/js/9.4/web.js @@ -122,7 +122,7 @@ function initTextBlocks() { const divReg = document.getElementById("navTb"); for (let x in res) { if (res[x][1].length < 1) continue; - + let aReg = document.createElement("a"); aReg.setAttribute("href", "#"); aReg.classList.add("w3-bar-item", "w3-hide-small", "w3-padding-small"); diff --git a/js/9.3/xorc.js b/js/9.4/xorc.js similarity index 100% rename from js/9.3/xorc.js rename to js/9.4/xorc.js