From 731ab39b8ef05a4e84b72fb4243d59c9f6dd48cb Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 23 Jan 2018 14:23:39 +0100 Subject: update mostly all GUI forms to split JavaScript and CSS from html code to support "Content Security-Policy" http headers --- .../conf/moa-id/htmlTemplates/javascript_tempalte.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js') diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js b/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js index 0c1f6a561..cc4714006 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js @@ -126,13 +126,12 @@ function isIE() { } } } - function onChangeChecks() { + function onChangeChecks() { if (self.innerWidth < 650) { document.getElementById("moaidform").setAttribute("target","_parent"); } else { document.getElementById("moaidform").removeAttribute("target"); } - } function checkIfBrowserSupportsJava(){ @@ -234,8 +233,21 @@ function isIE() { console.log("Local BKU NOT available") } } catch(e) {console.log("Local BKU detection is not possible! Msg: "+e);} - - } + + } + function setUseMandateFlag(e) { + /*document.getElementById("mandateCheckBox").setAttribute("aria-checked", document.getElementById("mandateCheckBox").checked);*/ + e.setAttribute("aria-checked", e.checked); + } + + document.addEventListener('resize', onChangeChecks); + document.addEventListener('DOMContentLoaded', function () { + document.querySelector('#mandateCheckBox').addEventListener('click', setUseMandateFlag); + document.querySelector('#moaidform>input[type=submit]').addEventListener('click', setMandateSelection); + document.querySelector('#bkuhandy>input[type=button]').addEventListener('click', bkuHandyClicked); + document.querySelector('#stork button[type=button]').addEventListener('click', storkClicked); + onChangeChecks(); + }); /* function setSSOSelection() { document.getElementById("useSSO").value = "false"; -- cgit v1.2.3