Skip to content

Commit

Permalink
Update dist of form A, B, C and D
Browse files Browse the repository at this point in the history
  • Loading branch information
claudioballardini01 committed Oct 6, 2023
1 parent 2d2ef66 commit 3fae4f9
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 50 deletions.
37 changes: 26 additions & 11 deletions small_claim_form/small_claim_form/dist/form_a/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
let isWarningStepVisible = false;

this.initializeLanguage();
window.addEventListener("message", this.listener.bind(this), false);
if (window.addEventListener) {
//window.addEventListener("message", this.messageListener.bind(this), false);
window.addEventListener("storage", this.storageListener, false);
}

document.addEventListener("DOMContentLoaded", () => {
document;
Expand All @@ -43,14 +46,26 @@
}, 1000);
});

function listener(event) {
if (event.origin === EXTERNAL_URI) {
currentLang = event.data;
resetForm();
initializeForm().then(() => {
translatePage();
});
}
// function messageListener(event) {
// if (event.origin === EXTERNAL_URI) {
// currentLang = event.data;
// resetForm();
// initializeForm().then(() => {
// translatePage();
// });
// }
// }

function storageListener() {
const lang = localStorage.getItem("lang");

if (!lang || typeof lang !== "string") this.initializeLanguage();
else currentLang = lang;

resetForm();
initializeForm().then(() => {
translatePage();
});
}

function initializeForm() {
Expand Down Expand Up @@ -99,7 +114,7 @@

function initializeLanguage() {
currentLang = localStorage.getItem("lang");
if (!currentLang) {
if (!currentLang || typeof this.currentLang !== "string") {
currentLang = "en";
localStorage.setItem("lang", currentLang);
}
Expand Down Expand Up @@ -1187,5 +1202,5 @@
}
</script>
<app-main></app-main>
<script src="/small_claim_form/dist/form_a/runtime.b1d2bf6e7917f304.js" type="module"></script><script src="/small_claim_form/dist/form_a/polyfills.4a7ed440dad8e3c5.js" type="module"></script><script src="/small_claim_form/dist/form_a/scripts.ae934356ffd25f29.js" defer></script><script src="/small_claim_form/dist/form_a/main.733f17c730ab8aa9.js" type="module"></script></body>
<script src="/small_claim_form/dist/form_a/runtime.b1d2bf6e7917f304.js" type="module"></script><script src="/small_claim_form/dist/form_a/polyfills.4a7ed440dad8e3c5.js" type="module"></script><script src="/small_claim_form/dist/form_a/scripts.ae934356ffd25f29.js" defer></script><script src="/small_claim_form/dist/form_a/main.25b9d0d6ccc5c403.js" type="module"></script></body>
</html>

Large diffs are not rendered by default.

13 changes: 1 addition & 12 deletions small_claim_form/small_claim_form/dist/form_b/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@
let simplificatinBoxTooltipStyle;
let isWarningStepVisible = false;

// this.initializeLanguage();
// window.addEventListener("message", this.listener.bind(this), false);

// document.addEventListener("DOMContentLoaded", () => {
// document;
// initializeForm();
// setInterval(function () {
// $("[data-bs-toggle='tooltip']").tooltip();
// }, 1000);
// });

function listener(event) {
if (event.origin === EXTERNAL_URI) {
currentLang = event.data;
Expand Down Expand Up @@ -1164,5 +1153,5 @@
}
</script>
<app-main></app-main>
<script src="/small_claim_form/dist/form_b/runtime.892f6f51554cb14a.js" type="module"></script><script src="/small_claim_form/dist/form_b/polyfills.e978d0b43f9aab8f.js" type="module"></script><script src="/small_claim_form/dist/form_b/scripts.f81939f39350503e.js" defer></script><script src="/small_claim_form/dist/form_b/main.30da5abf0d6e3304.js" type="module"></script></body>
<script src="/small_claim_form/dist/form_b/runtime.892f6f51554cb14a.js" type="module"></script><script src="/small_claim_form/dist/form_b/polyfills.e978d0b43f9aab8f.js" type="module"></script><script src="/small_claim_form/dist/form_b/scripts.f81939f39350503e.js" defer></script><script src="/small_claim_form/dist/form_b/main.68c02b1bcd7548b6.js" type="module"></script></body>
</html>

This file was deleted.

Large diffs are not rendered by default.

37 changes: 26 additions & 11 deletions small_claim_form/small_claim_form/dist/form_c/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
let isWarningStepVisible = false;

this.initializeLanguage();
window.addEventListener("message", this.listener.bind(this), false);
if (window.addEventListener) {
//window.addEventListener("message", this.messageListener.bind(this), false);
window.addEventListener("storage", this.storageListener, false);
}

document.addEventListener("DOMContentLoaded", () => {
document;
Expand All @@ -43,14 +46,26 @@
}, 1000);
});

function listener(event) {
if (event.origin === EXTERNAL_URI) {
currentLang = event.data;
resetForm();
initializeForm().then(() => {
translatePage();
});
}
// function messageListener(event) {
// if (event.origin === EXTERNAL_URI) {
// currentLang = event.data;
// resetForm();
// initializeForm().then(() => {
// translatePage();
// });
// }
// }

function storageListener() {
const lang = localStorage.getItem("lang");

if (!lang || typeof lang !== "string") this.initializeLanguage();
else currentLang = lang;

resetForm();
initializeForm().then(() => {
translatePage();
});
}

function initializeForm() {
Expand Down Expand Up @@ -99,7 +114,7 @@

function initializeLanguage() {
currentLang = localStorage.getItem("lang");
if (!currentLang) {
if (!currentLang || typeof currentLang !== "string") {
currentLang = "en";
localStorage.setItem("lang", currentLang);
}
Expand Down Expand Up @@ -1196,5 +1211,5 @@
}
</script>
<app-main></app-main>
<script src="/small_claim_form/dist/form_c/runtime.fa66ea3437d6d5af.js" type="module"></script><script src="/small_claim_form/dist/form_c/polyfills.c209ba90af5f0534.js" type="module"></script><script src="/small_claim_form/dist/form_c/scripts.f81939f39350503e.js" defer></script><script src="/small_claim_form/dist/form_c/main.4de6b8c581d1fad5.js" type="module"></script></body>
<script src="/small_claim_form/dist/form_c/runtime.fa66ea3437d6d5af.js" type="module"></script><script src="/small_claim_form/dist/form_c/polyfills.c209ba90af5f0534.js" type="module"></script><script src="/small_claim_form/dist/form_c/scripts.f81939f39350503e.js" defer></script><script src="/small_claim_form/dist/form_c/main.a907fc75371bffa0.js" type="module"></script></body>
</html>

This file was deleted.

Large diffs are not rendered by default.

13 changes: 1 addition & 12 deletions small_claim_form/small_claim_form/dist/form_d/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,6 @@
let simplificatinBoxTooltipStyle;
let isWarningStepVisible = false;

// this.initializeLanguage();
// window.addEventListener("message", this.listener.bind(this), false);

// document.addEventListener("DOMContentLoaded", () => {
// document;
// initializeForm();
// setInterval(function () {
// $("[data-bs-toggle='tooltip']").tooltip();
// }, 1000);
// });

function listener(event) {
if (event.origin === EXTERNAL_URI) {
currentLang = event.data;
Expand Down Expand Up @@ -1164,5 +1153,5 @@
}
</script>
<app-main></app-main>
<script src="/small_claim_form/dist/form_d/runtime.6ef6556454db0708.js" type="module"></script><script src="/small_claim_form/dist/form_d/polyfills.1c984f389de484bd.js" type="module"></script><script src="/small_claim_form/dist/form_d/scripts.f81939f39350503e.js" defer></script><script src="/small_claim_form/dist/form_d/main.aea7aab74371fc48.js" type="module"></script></body>
<script src="/small_claim_form/dist/form_d/runtime.6ef6556454db0708.js" type="module"></script><script src="/small_claim_form/dist/form_d/polyfills.1c984f389de484bd.js" type="module"></script><script src="/small_claim_form/dist/form_d/scripts.f81939f39350503e.js" defer></script><script src="/small_claim_form/dist/form_d/main.595123ad2b562108.js" type="module"></script></body>
</html>

Large diffs are not rendered by default.

This file was deleted.

0 comments on commit 3fae4f9

Please sign in to comment.