From a7831c6fb2ee248d481f7dc303ef9954ffab12b9 Mon Sep 17 00:00:00 2001 From: smathis Date: Fri, 11 Sep 2026 11:56:55 +0200 Subject: [PATCH] Only one confirmation, not two --- .../DO_NOT_DELETE_SPINNING_WHEEL.txt | 6 +++++- pages/common.js | 18 +++++------------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/pages/Beamline_elements/DO_NOT_DELETE_SPINNING_WHEEL.txt b/pages/Beamline_elements/DO_NOT_DELETE_SPINNING_WHEEL.txt index 5e88faa..2aabebc 100644 --- a/pages/Beamline_elements/DO_NOT_DELETE_SPINNING_WHEEL.txt +++ b/pages/Beamline_elements/DO_NOT_DELETE_SPINNING_WHEEL.txt @@ -23,4 +23,8 @@ mhttpd to report errors such as: Cannot find resource file 'Beamline_elements/spinning-wheel.gif' This is a compatibility/resource-path requirement resulting from serving the -Beamline Elements pages from their own subdirectory. \ No newline at end of file +Beamline Elements pages from their own subdirectory. It could be resolved by +a more robust design of MIDAS itself (i.e. mhttpd.js could determine the +resource path relative to the MIDAS installation rather than the current +document URL), but until (if ever) this gets fixed upstream, this is a +suitable workaround. \ No newline at end of file diff --git a/pages/common.js b/pages/common.js index ea095e4..bcc1d10 100644 --- a/pages/common.js +++ b/pages/common.js @@ -1143,19 +1143,11 @@ export function run_pysequencer_script(command) { return; } - if (command != 'Idle') { - // Get confirmation from user before proceeding - let result = confirm('Are you sure you want to run ' + command + '?'); - if (result == false) { - // Abort. - return; - } else { - // Get another confirmation - result = confirm('Are you really sure you want to run ' + command + '?'); - if (result == false) { - return; - } - } + // Get confirmation from user before proceeding + let result = confirm('Are you sure you want to run ' + command + '?'); + if (result == false) { + // Abort. + return; } // Check whether there is an pysequencer already going