modules-Block: prepared different input options, grid-element: panel-background added -> icon always visible
This commit is contained in:
@ -181,24 +181,27 @@ window.onload = function() {
|
||||
icon_lock_container.onclick = function(){
|
||||
let array_icon_edit = document.getElementsByClassName('icon-edit');
|
||||
let array_button = document.getElementsByClassName('input-element-button');
|
||||
if (writePermission == false) {
|
||||
alertify.confirm("WRITE PERMISSION", "You are working on <b>"+ clientTitle + "</b>. Are You sure you want to change things here?",
|
||||
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');
|
||||
if (writePermission == false) {
|
||||
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;
|
||||
|
Reference in New Issue
Block a user