Diverse Anpassungen besonders bei SEAWebClientGroup
This commit is contained in:
@ -85,7 +85,7 @@
|
|||||||
<!-- × -->
|
<!-- × -->
|
||||||
<img class = "icon-close" src="res/icon_sinus.png">
|
<img class = "icon-close" src="res/icon_sinus.png">
|
||||||
</div>
|
</div>
|
||||||
<div id="log-icon-container">
|
<div class="log-icon-container">
|
||||||
<img class = "log-icon" src="res/icon_log.png">
|
<img class = "log-icon" src="res/icon_log.png">
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -27,13 +27,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.history {
|
.history {
|
||||||
position: absolute;
|
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 80px 8px 50px 8px;
|
padding: 80px 8px 50px 8px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background-color: #303030;
|
background-color: lightgray;
|
||||||
color: lightgray;
|
color: #303030;
|
||||||
}
|
}
|
@ -18,17 +18,13 @@
|
|||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link {
|
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
||||||
transition: 0.4s;
|
/* panel */
|
||||||
cursor: pointer;
|
|
||||||
color: steelblue;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.link:focus {
|
/* ------------------------------ modules-icons ------------------------------ */
|
||||||
color: orangered;
|
|
||||||
outline: none;
|
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
||||||
}
|
/* row */
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
padding: 4px 0px 4px 0px;
|
padding: 4px 0px 4px 0px;
|
||||||
@ -36,7 +32,7 @@
|
|||||||
min-height: 24px;
|
min-height: 24px;
|
||||||
display: block;
|
display: block;
|
||||||
border-bottom: dotted darkgray 2px;
|
border-bottom: dotted darkgray 2px;
|
||||||
overflow: hidden;
|
/* overflow: hidden; */
|
||||||
transition: 0.2s;
|
transition: 0.2s;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@ -55,59 +51,6 @@
|
|||||||
/* background-color: lightgray; */
|
/* background-color: lightgray; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.clickable:hover {
|
|
||||||
background-color: lightgray;
|
|
||||||
}
|
|
||||||
|
|
||||||
.link-static {
|
|
||||||
padding-left: 4px;
|
|
||||||
background-color: #303030;
|
|
||||||
color: white;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-box {
|
|
||||||
margin: 4px 0px 4px 0px;
|
|
||||||
padding: 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
background-color: darkslategray;
|
|
||||||
color: white;
|
|
||||||
display: none;
|
|
||||||
width: 100%;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.col-left {
|
|
||||||
min-height: 24px;
|
|
||||||
line-height: 24px;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.event-toggle-info {
|
|
||||||
color: darkslategray;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.col-right-modules {
|
|
||||||
position: absolute;
|
|
||||||
right: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.col-right-parameters {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.col-right-disabled {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modules-title {
|
|
||||||
display: inline-block;
|
|
||||||
min-width: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------ modules-icons ------------------------------ */
|
|
||||||
|
|
||||||
.modules-icon {
|
.modules-icon {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 12px;
|
width: 12px;
|
||||||
@ -118,6 +61,29 @@
|
|||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
||||||
|
/* left */
|
||||||
|
|
||||||
|
.col-left {
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 140px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------ info ------------------------------ */
|
||||||
|
|
||||||
|
.info-box {
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: #303030;
|
||||||
|
color: white;
|
||||||
|
width: 100%;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-info:hover + .info-box {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
/* ------------------------------ status-icon ------------------------------ */
|
/* ------------------------------ status-icon ------------------------------ */
|
||||||
|
|
||||||
.status-icon {
|
.status-icon {
|
||||||
@ -149,32 +115,40 @@
|
|||||||
.status-info {
|
.status-info {
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #303030;
|
background-color: #303030;
|
||||||
opacity: 0;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 20px;
|
left: 20px;
|
||||||
top: 2px;
|
top: 2px;
|
||||||
z-index: 100;
|
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
transition: 1s;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-icon:hover ~ .status-info {
|
.status-icon:hover ~ .status-info {
|
||||||
opacity: 1.0;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------ value ------------------------------ */
|
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
||||||
|
/* right */
|
||||||
|
|
||||||
.col-right-parameters-value {
|
.col-right-modules {
|
||||||
position: absolute;
|
float: right;
|
||||||
right: 16px;
|
}
|
||||||
|
|
||||||
|
.col-right-parameters {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-right-value {
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-right-disabled {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------ edit-icon ------------------------------ */
|
/* ------------------------------ edit-icon ------------------------------ */
|
||||||
|
|
||||||
.edit-icon {
|
.edit-icon {
|
||||||
/* position: absolute; */
|
|
||||||
/* right: 0; */
|
|
||||||
float: right;
|
float: right;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@ -184,9 +158,17 @@
|
|||||||
opacity: .6;
|
opacity: .6;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------ hidden-input_element ------------------------------ */
|
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
||||||
|
/* INPUT ELEMENTS */
|
||||||
|
|
||||||
.hidden-input-element {
|
.input-element {
|
||||||
|
z-index: 100;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-element-hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,6 +181,7 @@
|
|||||||
border: solid 2px dimgray;
|
border: solid 2px dimgray;
|
||||||
color: black;
|
color: black;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-ms-clear { /* remove the x in the input box on IE */
|
::-ms-clear { /* remove the x in the input box on IE */
|
||||||
@ -207,22 +190,21 @@
|
|||||||
}
|
}
|
||||||
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
||||||
/* CHECKBOX */
|
/* CHECKBOX */
|
||||||
.parameter-checkbox {
|
/* .parameter-checkbox {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
float: left;
|
float: left;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.parameter-checkbox + .parameter-label {
|
/* .parameter-checkbox + .parameter-label {
|
||||||
position: relative;
|
position: relative;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
float: left;
|
} */
|
||||||
}
|
|
||||||
|
|
||||||
.parameter-checkbox:focus+.parameter-label {
|
/* .parameter-checkbox:focus+.parameter-label {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.parameter-checkbox+.parameter-label::before {
|
/* .parameter-checkbox+.parameter-label::before {
|
||||||
content: ' ';
|
content: ' ';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -24px;
|
left: -24px;
|
||||||
@ -232,9 +214,9 @@
|
|||||||
display: block;
|
display: block;
|
||||||
background: lightgray;
|
background: lightgray;
|
||||||
border: 2px solid dimgray;
|
border: 2px solid dimgray;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.parameter-checkbox+.parameter-label::after {
|
/* .parameter-checkbox+.parameter-label::after {
|
||||||
content: ' ';
|
content: ' ';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: -19px;
|
left: -19px;
|
||||||
@ -251,14 +233,14 @@
|
|||||||
-webkit-transform: scale(0);
|
-webkit-transform: scale(0);
|
||||||
transform: scale(0);
|
transform: scale(0);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.parameter-checkbox:checked+.parameter-label::after {
|
/* .parameter-checkbox:checked+.parameter-label::after {
|
||||||
-ms-transform: scale(1);
|
-ms-transform: scale(1);
|
||||||
-webkit-transform: scale(1);
|
-webkit-transform: scale(1);
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
} */
|
||||||
|
|
||||||
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
||||||
/* RADIO */
|
/* RADIO */
|
||||||
|
@ -136,23 +136,6 @@ meta, body {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------ log ------------------------------ */
|
|
||||||
|
|
||||||
.grid-element-3 {
|
|
||||||
position: absolute;
|
|
||||||
display: block;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 0;
|
|
||||||
opacity: .9;
|
|
||||||
z-index: 1000;
|
|
||||||
/* transition: 1s; */
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid-element-3-visible {
|
|
||||||
height: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
||||||
/* PANEL */
|
/* PANEL */
|
||||||
.panel {
|
.panel {
|
||||||
@ -198,7 +181,7 @@ meta, body {
|
|||||||
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
|
||||||
/* LOG ICON */
|
/* LOG ICON */
|
||||||
|
|
||||||
#log-icon-container {
|
.log-icon-container {
|
||||||
z-index: 1001;
|
z-index: 1001;
|
||||||
bottom: 9px;
|
bottom: 9px;
|
||||||
right: 12px;
|
right: 12px;
|
||||||
@ -207,6 +190,10 @@ meta, body {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.log-icon-container-hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.log-icon {
|
.log-icon {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
|
@ -69,16 +69,12 @@ function handleUpdateMessage(src, message) {
|
|||||||
// id-message: Confirms establishment of SSE-connection and determines
|
// id-message: Confirms establishment of SSE-connection and determines
|
||||||
// specific ID of the client
|
// specific ID of the client
|
||||||
case "id":
|
case "id":
|
||||||
for (var i = 0; i < swiper.length; i++) {
|
|
||||||
swiper[i].removeAllSlides();
|
|
||||||
}
|
|
||||||
clientID = message.id;
|
clientID = message.id;
|
||||||
if ("device" in message) {
|
if ("device" in message) {
|
||||||
if (message.device == "_inst_select") {
|
if (message.device == "_inst_select") {
|
||||||
clientTitle = "select instrument";
|
clientTitle = "select instrument";
|
||||||
console.log('IDselect')
|
console.log('IDselect')
|
||||||
pushInitCommand("getblock?path=_inst_select&", "instrument selection");
|
pushInitCommand("getblock?path=_inst_select&", "instrument selection");
|
||||||
menuMode = true;
|
|
||||||
sizeChange();
|
sizeChange();
|
||||||
} else {
|
} else {
|
||||||
clientTitle = message.instrument + " " + message.device;
|
clientTitle = message.instrument + " " + message.device;
|
||||||
@ -208,11 +204,6 @@ function updateValues(message, src) {
|
|||||||
let elem = matches[j];
|
let elem = matches[j];
|
||||||
let type = elem.__ctype__; // -> Show Dom-Properties
|
let type = elem.__ctype__; // -> Show Dom-Properties
|
||||||
|
|
||||||
// let text = htmlEscape(component.formatted);
|
|
||||||
// if (text) {
|
|
||||||
// elem.innerHTML = text;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (type == "rdonly" || type == "rdlink") {
|
if (type == "rdonly" || type == "rdlink") {
|
||||||
let text = htmlEscape(component.formatted);
|
let text = htmlEscape(component.formatted);
|
||||||
if (text) {
|
if (text) {
|
||||||
@ -232,17 +223,29 @@ function updateValues(message, src) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
elem.actualValue = value;
|
elem.actualValue = value;
|
||||||
resizeTextfield(elem);
|
resize_textfield(elem);
|
||||||
} else if (type == "checkbox") {
|
} else if (type == "checkbox") {
|
||||||
let row = elem.parentNode.parentNode;
|
let row = elem.closest('div');
|
||||||
row.style.backgroundColor = "white";
|
row.style.backgroundColor = "white";
|
||||||
|
console.log('receive: ', value);
|
||||||
// console.log('CBX', elem.name, message, Boolean(value && value != 'false'));
|
// console.log('CBX', elem.name, message, Boolean(value && value != 'false'));
|
||||||
elem.checked = Boolean(value && value != 'false');
|
// elem.checked = Boolean(value && value != 'false');
|
||||||
|
if (value === 'False') {
|
||||||
|
elem.checked = false;
|
||||||
|
} else {
|
||||||
|
elem.checked = true;
|
||||||
|
}
|
||||||
} else if (type == "enum") {
|
} else if (type == "enum") {
|
||||||
elem.style.display = "block";
|
elem.style.display = "block";
|
||||||
let row = elem.parentNode.parentNode;
|
let row = elem.closest('div');
|
||||||
row.style.backgroundColor = "white";
|
row.style.backgroundColor = "white";
|
||||||
elem.value = value;
|
|
||||||
|
let options = elem.childNodes;
|
||||||
|
for (var j = 0; j < options.length; j++) {
|
||||||
|
if (options[j].label == value) {
|
||||||
|
elem.value = j + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -253,7 +256,6 @@ function updateStatus(component) {
|
|||||||
let status_icon = matches[0];
|
let status_icon = matches[0];
|
||||||
let row = status_icon.closest(".row");
|
let row = status_icon.closest(".row");
|
||||||
let right = row.lastChild;
|
let right = row.lastChild;
|
||||||
right.classList.remove('col-right-disabled');
|
|
||||||
let statusCode = component.statuscode;
|
let statusCode = component.statuscode;
|
||||||
|
|
||||||
// Update status info, visible when mouse cursor is hovering over status icon
|
// Update status info, visible when mouse cursor is hovering over status icon
|
||||||
@ -262,11 +264,19 @@ function updateStatus(component) {
|
|||||||
status_info.innerHTML = component.formatted;
|
status_info.innerHTML = component.formatted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
status_icon.classList.remove('status-icon-disabled');
|
||||||
|
status_icon.classList.remove('status-icon-idle');
|
||||||
|
status_icon.classList.remove('status-icon-warn');
|
||||||
|
status_icon.classList.remove('status-icon-busy');
|
||||||
|
status_icon.classList.remove('status-icon-error');
|
||||||
|
row.classList.remove('row-disabled');
|
||||||
|
right.classList.remove = 'col-right-disabled';
|
||||||
|
|
||||||
switch (statusCode) {
|
switch (statusCode) {
|
||||||
case 0:
|
case 0:
|
||||||
status_icon.classList.add('status-icon-disabled');
|
status_icon.classList.add('status-icon-disabled');
|
||||||
row.classList.add('row-disabled');
|
row.classList.add('row-disabled');
|
||||||
right.innerHTML = 'col-right-disabled';
|
right.classList.add = 'col-right-disabled';
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
status_icon.classList.add('status-icon-idle');
|
status_icon.classList.add('status-icon-idle');
|
||||||
@ -355,17 +365,21 @@ function successHandler(s, message) {
|
|||||||
// appendToGridElement(2, "", "parameters", createContent({components:[]}));
|
// appendToGridElement(2, "", "parameters", createContent({components:[]}));
|
||||||
} else {
|
} else {
|
||||||
// In the module-block a parameter was selected
|
// In the module-block a parameter was selected
|
||||||
|
showParams = true;
|
||||||
// -> write parameter-block to grid-element2
|
// -> write parameter-block to grid-element2
|
||||||
isl = appendToGridElement(2, message.title, 'parameters', createContent(message));
|
isl = appendToGridElement(2, message.title, 'parameters', createContent(message));
|
||||||
if (nColumns == 1) {
|
adjustGrid();
|
||||||
elements[1].style.display = "none"; // hide modules
|
if (nColumns == 1 || nColumns == 2 || nColumns == 3) {
|
||||||
elements[2].style.display = "inline-block"; // show parameters
|
// elements[1].style.display = "none"; // hide modules
|
||||||
showParams = true;
|
// elements[2].style.display = "inline-block"; // show parameters
|
||||||
|
// style(2,"100vw","100vh");
|
||||||
document.getElementById('close-cross').innerHTML = '<img class = "icon-close" src="res/icon_close.png">';
|
document.getElementById('close-cross').innerHTML = '<img class = "icon-close" src="res/icon_close.png">';
|
||||||
} else if (nColumns == 2 || nColumns == 3) {
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// else if (nColumns == 2 || nColumns == 3) {
|
||||||
|
// adjustGrid();
|
||||||
|
// } else {
|
||||||
|
// adjustGrid();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
nextInitCommand();
|
nextInitCommand();
|
||||||
// Request for updates.
|
// Request for updates.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
var MAXBLOCK = 4; // max number of blocks
|
var MAXBLOCK = 4; // max number of blocks
|
||||||
var elements = []; // grid elements
|
var elements = []; // grid elements
|
||||||
var swiper = []; // This array contains main-swiper-Instances.
|
// var swiper = []; // This array contains main-swiper-Instances.
|
||||||
var hostPort = ""; // Address and port of static html-file.
|
var hostPort = ""; // Address and port of static html-file.
|
||||||
var clientID = ""; // ID given by server when SSE-connection is established.
|
var clientID = ""; // ID given by server when SSE-connection is established.
|
||||||
var clientTitle = ""; // Contains name of instrument and device.
|
var clientTitle = ""; // Contains name of instrument and device.
|
||||||
@ -12,7 +12,6 @@ var getUpdatesGraphics = true;
|
|||||||
var initCommands = [];
|
var initCommands = [];
|
||||||
var loadingShown = true;
|
var loadingShown = true;
|
||||||
var writePermission = false;
|
var writePermission = false;
|
||||||
var menuMode = false;
|
|
||||||
var panelOn = true;
|
var panelOn = true;
|
||||||
var firstState = 0;
|
var firstState = 0;
|
||||||
var showParams = false;
|
var showParams = false;
|
||||||
@ -127,22 +126,7 @@ function nextInitCommand() {
|
|||||||
var loadingScreen = document.getElementsByClassName("loading-div")[0];
|
var loadingScreen = document.getElementsByClassName("loading-div")[0];
|
||||||
loadingScreen.style.display = "none";
|
loadingScreen.style.display = "none";
|
||||||
loadingShown = false;
|
loadingShown = false;
|
||||||
/* Not working without swiper, necessary??? */
|
|
||||||
// if (location.hash) { // there was a #hash part
|
|
||||||
// var slideNames = location.hash.substr(1);
|
|
||||||
// gotoGroups(slideNames);
|
|
||||||
// }
|
|
||||||
console.log("loading finished");
|
console.log("loading finished");
|
||||||
|
|
||||||
// function gotoGroups(slideNames) {
|
|
||||||
|
|
||||||
// slideNames = slideNames.split("%20");
|
|
||||||
// var l = Math.min(MAXBLOCK,slideNames.length);
|
|
||||||
// document.title = "SEA "+ clientTitle + " " + slideNames.join(" ");
|
|
||||||
// for (var s=0; s<l; s++) {
|
|
||||||
// getGroup(s, slideNames[s]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -165,9 +149,9 @@ window.onload = function() {
|
|||||||
|
|
||||||
let crossElement = document.getElementById("close-cross");
|
let crossElement = document.getElementById("close-cross");
|
||||||
|
|
||||||
if(window.hideRightPart){
|
if (window.hideRightPart){
|
||||||
document.body.removeChild(crossElement);
|
document.body.removeChild(crossElement);
|
||||||
}else{
|
} else {
|
||||||
crossElement.onclick = function(){
|
crossElement.onclick = function(){
|
||||||
if (showParams) {
|
if (showParams) {
|
||||||
showParams = false;
|
showParams = false;
|
||||||
@ -176,31 +160,26 @@ window.onload = function() {
|
|||||||
if (window.wideGraphs) {
|
if (window.wideGraphs) {
|
||||||
window.wideGraphs = false;
|
window.wideGraphs = false;
|
||||||
document.getElementById('close-cross').innerHTML = '<img class = "icon-close" src="res/icon_sinus.png">';
|
document.getElementById('close-cross').innerHTML = '<img class = "icon-close" src="res/icon_sinus.png">';
|
||||||
|
document.getElementsByClassName('log-icon-container')[0].classList.remove("log-icon-container-hidden");
|
||||||
} else {
|
} else {
|
||||||
window.wideGraphs = true;
|
window.wideGraphs = true;
|
||||||
document.getElementById('close-cross').innerHTML = '<img class = "icon-close" src="res/icon_modules.png">';
|
document.getElementById('close-cross').innerHTML = '<img class = "icon-close" src="res/icon_modules.png">';
|
||||||
|
document.getElementsByClassName('log-icon-container')[0].classList.add("log-icon-container-hidden");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (elements[0].style.display == "inline-block") { // only graphics is visible
|
|
||||||
elements[0].style.display = "none"; // hide graphics
|
|
||||||
elements[1].style.display = "inline-block"; // show modules
|
|
||||||
elements[2].style.display = "none"; // hide parameters
|
|
||||||
} else if (elements[1].style.display == "inline-block") { // only modules are visible
|
|
||||||
elements[0].style.display = "inline-block"; // show graphics
|
|
||||||
elements[1].style.display = "none"; // hide modules
|
|
||||||
elements[2].style.display = "none"; // hide parameters
|
|
||||||
} else if (elements[2].style.display == "inline-block") { // only parameters are visible
|
|
||||||
elements[0].style.display = "none"; // hide graphics
|
|
||||||
elements[1].style.display = "inline-block"; // show modules
|
|
||||||
elements[2].style.display = "none"; // hide parameters
|
|
||||||
}
|
|
||||||
adjustGrid();
|
adjustGrid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let logIcon = document.getElementById("log-icon-container");
|
let logIcon = document.getElementsByClassName("log-icon-container")[0];
|
||||||
logIcon.onclick = function(){
|
logIcon.onclick = function(){
|
||||||
elements[3].classList.toggle('grid-element-3-visible');
|
if (window.showConsole) {
|
||||||
|
window.showConsole = false;
|
||||||
|
} else {
|
||||||
|
window.showConsole = true;
|
||||||
|
// Initialize?
|
||||||
|
}
|
||||||
|
adjustGrid();
|
||||||
}
|
}
|
||||||
|
|
||||||
var homeButton = document.getElementById("home-icon");
|
var homeButton = document.getElementById("home-icon");
|
||||||
@ -209,33 +188,6 @@ window.onload = function() {
|
|||||||
window.location = "/select_experiment";
|
window.location = "/select_experiment";
|
||||||
};
|
};
|
||||||
buildUpdateConnection();
|
buildUpdateConnection();
|
||||||
// if (location.hash) {
|
|
||||||
// console.log("hash in url", location.hash);
|
|
||||||
// initSlides = location.hash.substring(1);
|
|
||||||
// } else {
|
|
||||||
// initSlides = "";
|
|
||||||
// }
|
|
||||||
// // Initialisation will be continued, when SSE-connection is established
|
|
||||||
// // and id-message is obtained.
|
|
||||||
// // (see also at SEAWebClientCommunication.js)
|
|
||||||
// addEventListener("popstate", function (e) {
|
|
||||||
// if (e.state) {
|
|
||||||
// if (loadingShown) {
|
|
||||||
// if (initSlides != e.state.funarg) {
|
|
||||||
// console.log("hash mismatch", initSlides, e.state.funarg);
|
|
||||||
// initSlides = e.state.funarg;
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// console.log("popstate", e.state.func, e.state.funarg);
|
|
||||||
// window[e.state.func](e.state.funarg);
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// document.title = "SEA "+ clientTitle;
|
|
||||||
// for (var s=0; s<MAXBLOCK; s++) {
|
|
||||||
// swiper[s].slideTo(defaultSlidePos(s));
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function toggleHeader() {
|
function toggleHeader() {
|
||||||
|
@ -44,10 +44,6 @@ function determineViewportSize() {
|
|||||||
if (height > MINHEIGHT) {
|
if (height > MINHEIGHT) {
|
||||||
nRows = 2;
|
nRows = 2;
|
||||||
}
|
}
|
||||||
if (menuMode) {
|
|
||||||
nRows = 1;
|
|
||||||
nColumns = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function sizeChange() {
|
function sizeChange() {
|
||||||
@ -68,108 +64,110 @@ function adjustGrid() {
|
|||||||
style(0,"100vw","100vh");
|
style(0,"100vw","100vh");
|
||||||
style(1); // hide
|
style(1); // hide
|
||||||
style(2); // hide
|
style(2); // hide
|
||||||
// style(3); // hide
|
style(3); // hide
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (nColumns) {
|
switch (nColumns) {
|
||||||
case 1:
|
case 1:
|
||||||
if (menuMode) {
|
if (window['showConsole']) {
|
||||||
leftWidth = Math.min(100, MINWIDTH / width * 100);
|
if (showParams) {
|
||||||
style(1,leftWidth + "vw","100vh");
|
style(0); // hide
|
||||||
|
style(1); // hide
|
||||||
|
style(2,"100vw","50vh");
|
||||||
|
style(3,"100vw","50vh");
|
||||||
|
} else {
|
||||||
|
style(0); // hide
|
||||||
|
style(1,"100vw","50vh");
|
||||||
|
style(2); // hide
|
||||||
|
style(3,"100vw","50vh");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (showParams) {
|
||||||
|
style(0); // hide
|
||||||
|
style(1); // hide
|
||||||
|
style(2,"100vw","100vh");
|
||||||
|
style(3); // hide
|
||||||
} else {
|
} else {
|
||||||
// we may want to switch to 90vh on safari ios (workaround)
|
|
||||||
style(0); // hide
|
style(0); // hide
|
||||||
style(1,"100vw","100vh");
|
style(1,"100vw","100vh");
|
||||||
style(2); // hide
|
style(2); // hide
|
||||||
// style(3); // hide
|
style(3); // hide
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
case 3:
|
||||||
rightWidth = Math.min(50, MINWIDTH / width * 100);
|
rightWidth = Math.min(50, MINWIDTH / width * 100);
|
||||||
leftWidth = 100 - rightWidth;
|
leftWidth = 100 - rightWidth;
|
||||||
if (nRows == 1 || !window['showConsole']) {
|
if (window['showConsole']) {
|
||||||
|
if (nRows == 1) {
|
||||||
|
if (showParams) {
|
||||||
|
style(0,leftWidth + "vw","100vh");
|
||||||
|
style(1); // hide
|
||||||
|
style(2,rightWidth + "vw","50vh");
|
||||||
|
style(3,rightWidth + "vw","50vh");
|
||||||
|
} else {
|
||||||
|
style(0,leftWidth + "vw","100vh");
|
||||||
|
style(1,rightWidth + "vw","50vh");
|
||||||
|
style(2); // hide
|
||||||
|
style(3,rightWidth + "vw","50vh");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (showParams) {
|
||||||
|
style(0,leftWidth + "vw","100vh");
|
||||||
|
style(1); // hide
|
||||||
|
style(2,rightWidth + "vw","50vh");
|
||||||
|
style(3,rightWidth + "vw","50vh");
|
||||||
|
} else {
|
||||||
|
style(0,leftWidth + "vw","100vh");
|
||||||
|
style(1,rightWidth + "vw","50vh");
|
||||||
|
style(2); // hide
|
||||||
|
style(3,rightWidth + "vw","50vh");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (nRows == 1) {
|
||||||
if (showParams) {
|
if (showParams) {
|
||||||
style(0,leftWidth + "vw","100vh");
|
style(0,leftWidth + "vw","100vh");
|
||||||
style(1); // hide
|
style(1); // hide
|
||||||
style(2,rightWidth + "vw","100vh");
|
style(2,rightWidth + "vw","100vh");
|
||||||
// style(3); // hide
|
style(3); // hide
|
||||||
} else {
|
} else {
|
||||||
style(0,leftWidth + "vw","100vh");
|
style(0,leftWidth + "vw","100vh");
|
||||||
style(1,rightWidth + "vw","100vh");
|
style(1,rightWidth + "vw","100vh");
|
||||||
style(2); // hide
|
style(2); // hide
|
||||||
// style(3); // hide
|
style(3); // hide
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// if (showParams) {
|
|
||||||
// style(0,leftWidth + "vw","100vh");
|
|
||||||
// style(1); // hide
|
|
||||||
// style(2,rightWidth + "vw","50vh");
|
|
||||||
// style(3,rightWidth + "vw","50vh");
|
|
||||||
// } else {
|
|
||||||
// style(0,leftWidth + "vw","100vh");
|
|
||||||
// style(1,rightWidth + "vw","50vh");
|
|
||||||
// style(2); // hide
|
|
||||||
// style(3,rightWidth + "vw","50vh");
|
|
||||||
// }
|
|
||||||
style(0,leftWidth + "vw","100vh");
|
|
||||||
style(1,rightWidth + "vw","50vh");
|
|
||||||
style(2,rightWidth + "vw","50vh");
|
|
||||||
// style(3); // hide
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
rightWidth = MINWIDTH / width * 100;
|
|
||||||
leftWidth = 100 - rightWidth;
|
|
||||||
if (nRows == 1 || !window['showConsole']) {
|
|
||||||
if (showParams) {
|
if (showParams) {
|
||||||
style(0,leftWidth + "vw","100vh");
|
style(0,leftWidth + "vw","100vh");
|
||||||
style(1); // hide
|
style(1); // hide
|
||||||
style(2,rightWidth + "vw","100vh");
|
style(2,rightWidth + "vw","100vh");
|
||||||
// style(3); // hide
|
style(3); // hide
|
||||||
} else {
|
} else {
|
||||||
style(0,leftWidth + "vw","100vh");
|
style(0,leftWidth + "vw","100vh");
|
||||||
style(1,rightWidth + "vw","100vh");
|
style(1,rightWidth + "vw","100vh");
|
||||||
style(2); // hide
|
style(2); // hide
|
||||||
// style(3); // hide
|
style(3); // hide
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// if (showParams) {
|
|
||||||
// style(0,leftWidth + "vw","100vh");
|
|
||||||
// style(1); // hide
|
|
||||||
// style(2,rightWidth + "vw","50vh");
|
|
||||||
// style(3,rightWidth + "vw","50vh");
|
|
||||||
// } else {
|
|
||||||
// style(0,leftWidth + "vw","100vh");
|
|
||||||
// style(1,rightWidth + "vw","50vh");
|
|
||||||
// style(2); // hide
|
|
||||||
// style(3,rightWidth + "vw","50vh");
|
|
||||||
// }
|
|
||||||
style(0,leftWidth + "vw","100vh");
|
|
||||||
style(1,rightWidth + "vw","50vh");
|
|
||||||
style(2,rightWidth + "vw","50vh");
|
|
||||||
// style(3); // hide
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
rightWidth = MINWIDTH / width * 100;
|
rightWidth = MINWIDTH / width * 100;
|
||||||
leftWidth = 100 - 2 * rightWidth;
|
leftWidth = 100 - 2 * rightWidth;
|
||||||
// if (nRows == 1 || !window['showConsole']) {
|
if (window['showConsole']) {
|
||||||
|
style(0,leftWidth + "vw","100vh");
|
||||||
|
style(1,rightWidth + "vw","50vh");
|
||||||
|
style(2,rightWidth + "vw","50vh");
|
||||||
|
style(3,100 - leftWidth + "vw","50vh");
|
||||||
|
} else {
|
||||||
style(0,leftWidth + "vw","100vh");
|
style(0,leftWidth + "vw","100vh");
|
||||||
style(1,rightWidth + "vw","100vh");
|
style(1,rightWidth + "vw","100vh");
|
||||||
// if (window['showConsole']) {
|
|
||||||
// style(2); // hide
|
|
||||||
// style(3,rightWidth + "vw","100vh");
|
|
||||||
// } else {
|
|
||||||
style(2,rightWidth + "vw","100vh");
|
style(2,rightWidth + "vw","100vh");
|
||||||
// style(3); // hide
|
style(3); // hide
|
||||||
// }
|
}
|
||||||
// } else {
|
|
||||||
// style(0,leftWidth + "vw","100vh");
|
|
||||||
// style(1,rightWidth + "vw","50vh");
|
|
||||||
// style(2,rightWidth + "vw","50vh");
|
|
||||||
// style(3,(2 * rightWidth) + "vw","50vh");
|
|
||||||
// }
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user