From: Jan Michel Date: Fri, 18 Nov 2022 08:15:51 +0000 (+0100) Subject: add a flashing signal to xml web pages when clicking a single bit register X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=8bce374fbc61a5c961c7fca91e94b495fc74e886;p=daqtools.git add a flashing signal to xml web pages when clicking a single bit register --- diff --git a/web/htdocs/layout/blue.css b/web/htdocs/layout/blue.css index f865676..edccf88 100644 --- a/web/htdocs/layout/blue.css +++ b/web/htdocs/layout/blue.css @@ -41,7 +41,13 @@ body { float:left; width:1000px; margin:50px 0 0 20px; + transition: 100ms all linear; + background: transparent; +} +#debugpane.loading { + transition: none; + background: #f99; } #overview { diff --git a/web/htdocs/scripts/scriptsnew.js b/web/htdocs/scripts/scriptsnew.js index 8d36172..9ee843f 100644 --- a/web/htdocs/scripts/scriptsnew.js +++ b/web/htdocs/scripts/scriptsnew.js @@ -32,7 +32,7 @@ function getdataprint(command,dId,async,time,callback) { var cmd = command; var asynci = async; var timei = time; - + xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4 && xmlhttp.status==200) { //if(cb) @@ -72,6 +72,9 @@ function getdataprint(command,dId,async,time,callback) { cb(time); } } + if(document.getElementById("debugpane")){ + document.getElementById("debugpane").classList.remove('loading'); + } } xmlhttp.open("GET",command,async); diff --git a/web/htdocs/scripts/xmlpage.js b/web/htdocs/scripts/xmlpage.js index e944082..4620cab 100644 --- a/web/htdocs/scripts/xmlpage.js +++ b/web/htdocs/scripts/xmlpage.js @@ -7,6 +7,9 @@ getdataprint('../xml-db/put.pl?'+e.target.parentNode.getAttribute("cstr")+'-'+'1','returntext',false,-1,refresh); if ( parseInt(e.target.parentNode.getAttribute("raw")) == 1 ) getdataprint('../xml-db/put.pl?'+e.target.parentNode.getAttribute("cstr")+'-'+'0','returntext',false,-1,refresh); + if(document.getElementById("debugpane")){ + document.getElementById("debugpane").classList.add('loading'); + } return; } var text = e.target.parentNode.getAttribute("cstr");