diff --git a/Backend/mocked-services/src/main/resources/static/js/datatransfer.js b/Backend/mocked-services/src/main/resources/static/js/datatransfer.js index e2241b1..adc0cc7 100644 --- a/Backend/mocked-services/src/main/resources/static/js/datatransfer.js +++ b/Backend/mocked-services/src/main/resources/static/js/datatransfer.js @@ -38,8 +38,8 @@ function getData(){ $.getJSON(host + '/api/mock/'+clientUUID, function(data) { json = data; checkUuid(); - console.log(JSON.stringify(json)); - console.log("Json received"); + + refreshData(); }); } @@ -104,11 +104,11 @@ const idToDisplay = function(){ function refreshData(){ $("#uuid-input").val(clientUUID); fillMessageList(); - console.log("List initiated"); + let id = idToDisplay(); - console.log('Loading message of id: ' + id); + loadMessage(id); - console.log("Message loaded"); + } function setCookie(){ @@ -262,7 +262,7 @@ async function fetchUUIDCheck(givenUUID , strategy){ .then ( response => response.text() ) .then ( data => { newUUID = data; - console.log("newUUID: "+newUUID); + } ) break; } @@ -271,7 +271,7 @@ async function fetchUUIDCheck(givenUUID , strategy){ .then (response => response.text() ) .then (data => { newUUID = data; - console.log("restoreUUID: "+newUUID); + } ) break; } @@ -281,11 +281,8 @@ async function fetchUUIDCheck(givenUUID , strategy){ function checkUUIDChars(uuid) { uuid.replace(/ /g,'') - if (uuid.length > 128) - return "invalid"; - console.log("UUID in check: " + uuid); const regex = new RegExp("^[A-z0-9-]+$"); - + if(regex.test(uuid) && uuid != ""){ return uuid ; } @@ -409,14 +406,14 @@ function fillMessageList(){ $('.tile').click(function(e) { var element = $(this); var button = element.find('.btn-tile').children().get(0); - console.log(button == e.target); + if(!(button == e.target)){ - console.log("Button is not a target. Loading message.") + callLoadMessage(parseInt($(this).attr('tileid'))); } }); $('.btn-tile').click(function(){ - // console.log(this); + // callRemoveMessage($(this).closest('.tile').attr('tileId')); }) } @@ -442,35 +439,35 @@ function callLoadMessage(id){ function loadMessage(id){ if(id == null || id == undefined){ - console.log('id is null'); + return; } lastId = id; setCookie(); setDataOrigin(); for(let i=0; i "0px") { collapsibleData.style.maxHeight = "0px"; @@ -3487,7 +3486,7 @@ //Handle clicks in whole form and set info in tooltip setDefaultContent(document.getElementById("xmlArea"), 'Insert XML here'); setDefaultContent(document.getElementById("transformArea"), 'Insert XPath expression here'); - console.log("init"); + processVersionSelector(); processTooltip(); tool.addEventListener('change', event => { diff --git a/Frontend/tools/xsd.html b/Frontend/tools/xsd.html index 42d32ae..8bd8209 100644 --- a/Frontend/tools/xsd.html +++ b/Frontend/tools/xsd.html @@ -81,7 +81,7 @@ //Handle clicks in whole form and set info in tooltip setDefaultContent(document.getElementById("xmlArea"), 'Insert XML here'); setDefaultContent(document.getElementById("transformArea"), 'Insert XSD here'); - console.log("init"); + // refreshTooltip(); processTooltip(); tool.addEventListener('click', event => { @@ -92,13 +92,11 @@ } processTooltip(); - // console.log("clock"); + // }) } function processTooltip() { - console.log("processTooltip"); - if (getProcessor() == "xalan") { document.getElementById("tooltipFunctionInfo").innerText = "XSLT 1.0 functions"; diff --git a/Frontend/tools/xslt.html b/Frontend/tools/xslt.html index c7c7fe9..567a10e 100644 --- a/Frontend/tools/xslt.html +++ b/Frontend/tools/xslt.html @@ -1138,7 +1138,7 @@