From d2197d75d0bf67f99de126d388bb1777e28ae178 Mon Sep 17 00:00:00 2001 From: Lord-Grey Date: Wed, 5 May 2021 13:41:22 +0200 Subject: [PATCH] Grabber - Ensure save is only possible on valid content --- assets/webconfig/js/content_grabber.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/assets/webconfig/js/content_grabber.js b/assets/webconfig/js/content_grabber.js index d6595d25..68502283 100755 --- a/assets/webconfig/js/content_grabber.js +++ b/assets/webconfig/js/content_grabber.js @@ -226,7 +226,7 @@ $(document).ready(function () { 'device_inputs', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false); } - if (!window.readOnlyMode) { + if (conf_editor_screen.validate().length && !window.readOnlyMode) { $('#btn_submit_screengrabber').attr('disabled', false); } } @@ -275,8 +275,8 @@ $(document).ready(function () { 'resolutions', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false); } - if (!window.readOnlyMode) { - $('#btn_submit_videograbber').attr('disabled', false); + if (conf_editor_screen.validate().length && !window.readOnlyMode) { + $('#btn_submit_screengrabber').attr('disabled', false); } }); @@ -331,7 +331,7 @@ $(document).ready(function () { 'framerates', addSchemaElements, enumVals, [], enumDefaultVal, false); } - if (!window.readOnlyMode) { + if (conf_editor_screen.validate().length && !window.readOnlyMode) { $('#btn_submit_screengrabber').attr('disabled', false); } }); @@ -453,7 +453,7 @@ $(document).ready(function () { 'device_inputs', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false, false); } - if (!window.readOnlyMode) { + if (conf_editor_video.validate().length && !window.readOnlyMode) { $('#btn_submit_videograbber').attr('disabled', false); } } @@ -517,7 +517,7 @@ $(document).ready(function () { 'standard', addSchemaElements, enumVals, [], enumDefaultVal, false); } - if (!window.readOnlyMode) { + if (conf_editor_video.validate().length && !window.readOnlyMode) { $('#btn_submit_videograbber').attr('disabled', false); } }); @@ -569,7 +569,7 @@ $(document).ready(function () { 'resolutions', addSchemaElements, enumVals, enumTitelVals, enumDefaultVal, false); } - if (!window.readOnlyMode) { + if (conf_editor_video.validate().length && !window.readOnlyMode) { $('#btn_submit_videograbber').attr('disabled', false); } }); @@ -629,7 +629,7 @@ $(document).ready(function () { 'framerates', addSchemaElements, enumVals, [], enumDefaultVal, false); } - if (!window.readOnlyMode) { + if (conf_editor_video.validate().length && !window.readOnlyMode) { $('#btn_submit_videograbber').attr('disabled', false); } });