Fix: When saving Layout, change "mode = VIEWING" only after successful name checks (montage.js)

pull/4023/head
IgorA100 2024-05-21 23:21:35 +03:00 committed by GitHub
parent 642d50fb8a
commit b87b3de292
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -383,8 +383,6 @@ function edit_layout(button) {
} // end function edit_layout
function save_layout(button) {
mode = VIEWING;
const form = button.form;
let name = form.elements['Name'].value;
const layout = layouts[form.zmMontageLayout.value];
@ -403,6 +401,8 @@ function save_layout(button) {
return;
}
mode = VIEWING;
var Positions = {};
Positions['gridStack'] = objGridStack.save(false, false);
Positions['monitorStatusPositon'] = $j('#monitorStatusPositon').val(); //Not yet used when reading Layout