make sure instrument and device are availabel separately
- added comment to the alert to be modified ("You changed a field without pressing the return key.")
This commit is contained in:
@ -72,12 +72,18 @@ function handleUpdateMessage(src, message) {
|
||||
clientID = message.id;
|
||||
if ("device" in message) {
|
||||
if (message.device == "_inst_select") {
|
||||
clientTitle = "select instrument";
|
||||
window.clientTitle = "select instrument";
|
||||
console.log('IDselect')
|
||||
pushInitCommand("getblock?path=_inst_select&", "instrument selection");
|
||||
sizeChange();
|
||||
} else {
|
||||
clientTitle = message.instrument + " " + message.device;
|
||||
if (message.instrument) {
|
||||
window.instrument = message.instrument;
|
||||
}
|
||||
if (message.device) {
|
||||
window.device = message.device;
|
||||
}
|
||||
window.clientTitle = window.instrument + " " + window.device;
|
||||
// console.log('loadBlocks', message);
|
||||
loadFirstBlocks();
|
||||
}
|
||||
|
@ -182,7 +182,11 @@ window.onload = 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?",
|
||||
// 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;
|
||||
|
Reference in New Issue
Block a user