Improve Led Device on/off and background effect (#1502)

* Queue On-Off calls

* Do not switch-off LED-device when Background effect is enabled

* Fix LGTM Warnings

* Address LGTM findings
This commit is contained in:
LordGrey
2022-08-14 23:02:30 +02:00
committed by GitHub
parent e17ce6cd4e
commit a2266b177f
8 changed files with 54 additions and 36 deletions

View File

@@ -182,8 +182,9 @@ $(document).ready(function () {
// Disable or enable Delete Effect Button
$('#effectsdellist').off().on('change', function () {
$(this).val() == null ? $('#btn_edit, #btn_delete').prop('disabled', true) : "";
$(this).val().startsWith("int_") ? $('#btn_delete').prop('disabled', true) : $('#btn_delete').prop('disabled', false);
var value = $(this).val();
value == null ? $('#btn_edit, #btn_delete').prop('disabled', true) : "";
value.startsWith("int_") ? $('#btn_delete').prop('disabled', true) : $('#btn_delete').prop('disabled', false);
});
// Load Effect