feat: hide analysis image, fps and blend fields when Motion Detection is None

Implement the previously empty Analysing_onChange handler in the monitor
edit view to hide the Analysis Image, AnalysisFPS and Ref/Alarm blend
percentage fields when Analysing is set to None, since no analysis runs
in that mode. Invoke it on page load so the fields reflect the saved
setting.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Isaac Connor
2026-06-23 07:46:35 -04:00
parent ce1474667a
commit bcf72f0284

View File

@@ -555,6 +555,11 @@ function initPage() {
manageChannelStream();
checkVerAudioMotion();
// Reflect the current Motion Detection (Analysing) setting on load.
if (form.elements['newMonitor[Analysing]']) {
Analysing_onChange(form.elements['newMonitor[Analysing]']); // eslint-disable-line new-cap
}
} // end function initPage()
async function checkVerAudioMotion() {
@@ -802,6 +807,10 @@ function Capturing_onChange(e) {
}
function Analysing_onChange(e) {
// When motion detection is None there is no analysis, so hide the
// analysis image, analysis fps and ref/alarm blend fields.
const show = (e.value != 'None');
$j('#AnalysisImage, li.AnalysisFPS, li.RefBlendPerc, li.AlarmRefBlendPerc, li.AlarmRefImageBlendPct').toggle(show);
}
function Recording_onChange(e) {