make web client work

This commit is contained in:
2020-12-10 16:58:59 +01:00
parent 9e1d3b4e07
commit 1de819cd26
7 changed files with 380 additions and 209 deletions

View File

@ -86,7 +86,7 @@ function handleUpdateMessage(src, message) {
sizeChange();
} else {
clientTitle = message.instrument + " " + message.device;
console.log('loadBlocks')
console.log('loadBlocks', message);
loadFirstBlocks();
}
document.title = "SEA "+clientTitle;
@ -155,7 +155,6 @@ function handleUpdateMessage(src, message) {
case "graph-update":
//if (getUpdatesGraphics) {
//timeServer = message.time;
console.log("graph-update");
updateCharts2(message.graph);
//}
break;
@ -207,11 +206,12 @@ function updateValues(message, src) {
} else if (type == "input") {
var row = matches[j].parentNode.parentNode.parentNode;
row.style.backgroundColor = "white";
var oldValue = matches[j].getAttribute("oldValue")
|| matches[j].value;
if (value != matches[j].value && value != oldValue) {
var mval = matches[j].value;
var oldValue = matches[j].getAttribute("oldValue");
if (oldValue === null) oldValue = mval;
if (value != mval && parseFloat(value) != parseFloat(mval) && value != oldValue) {
if (matches[j] == document.activeElement
|| oldValue != matches[j].value) {
|| oldValue != mval) {
row.style.backgroundColor = "orange";
} else {
matches[j].value = value;