modules-Block: prepared different input options, grid-element: panel-background added -> icon always visible

This commit is contained in:
Daniel
2025-04-30 16:43:57 +02:00
committed by Markus Zolliker
parent 43624b4222
commit 70b40646ef
4 changed files with 31 additions and 32 deletions

View File

@@ -182,27 +182,26 @@ window.onload = function() {
let array_icon_edit = document.getElementsByClassName('icon-edit');
let array_button = document.getElementsByClassName('input-element-button');
if (writePermission == false) {
// TODO: here instead of asking "Please confirm we are on <instrument>", do not show the instrument,
// ask the user "Please confrim the instrument:" and check it the entered instrument is correct
// (case insensitive)
alertify.confirm("WRITE PERMISSION", "Current device: <b>"+ window.device
+ "</b>. Please confirm we are on <b>" + window.instrument + "</b>",
function () {
// User decided to proceed.
prompt = false;
writePermission = true;
icon_lock_container.innerHTML = '<img class = "icon-main icon-lock" src="res/icon_lock_open.png">';
for(i = 0; i < array_icon_edit.length; i++) {
array_icon_edit[i].classList.remove('icon-edit-hidden');
}
for(i = 0; i < array_button.length; i++) {
array_button[i].classList.remove('input-element-button-hidden');
alertify.prompt( 'WRITE PERMISSION', "Please enter the name of the instrument you want to work on."
, function(evt, value) {
// User decided to proceed
if (clientTitle.includes(value)) {
writePermission = true;
icon_lock_container.innerHTML = '<img class = "icon-main icon-lock" src="res/icon_lock_open.png">';
for(i = 0; i < array_icon_edit.length; i++) {
array_icon_edit[i].classList.remove('icon-edit-hidden');
}
for(i = 0; i < array_button.length; i++) {
array_button[i].classList.remove('input-element-button-hidden');
}
} else {
console.log(clientTitle);
}
// prompt = false;
}
, function () {
, function() {
// User decided to cancel
prompt = false;
prompt = false;
});
} else {
writePermission = false;