mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
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:
@@ -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
|
||||
|
@@ -272,7 +272,7 @@ $(document).ready(function () {
|
||||
|
||||
function updateForwarderServiceSections(type) {
|
||||
|
||||
var editorPath = "root.forwarder." + type
|
||||
var editorPath = "root.forwarder." + type;
|
||||
var selectedServices = conf_editor_forw.getEditor(editorPath + "select").getValue();
|
||||
|
||||
if (jQuery.isEmptyObject(selectedServices) || selectedServices[0] === "NONE") {
|
||||
@@ -301,7 +301,7 @@ $(document).ready(function () {
|
||||
|
||||
function updateForwarderSelectList(type) {
|
||||
|
||||
var selectionElement = type + "select"
|
||||
var selectionElement = type + "select";
|
||||
|
||||
var enumVals = [];
|
||||
var enumTitelVals = [];
|
||||
|
@@ -226,7 +226,7 @@ function pluralRuleParser(rule, number) {
|
||||
return result;
|
||||
}
|
||||
|
||||
result = parseFloat(number, 10);
|
||||
result = parseFloat(number, 10); //lgtm [js/superfluous-trailing-arguments]
|
||||
debug(' -- passed n ', result);
|
||||
|
||||
return result;
|
||||
|
@@ -1310,7 +1310,7 @@ function isValidIPv6(value) {
|
||||
|
||||
function isValidHostname(value) {
|
||||
if (value.match(
|
||||
'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[_a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$'
|
||||
'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])(.([a-zA-Z0-9]|[_a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]))*$' //lgtm [js/redos]
|
||||
))
|
||||
return true;
|
||||
else
|
||||
@@ -1319,7 +1319,7 @@ function isValidHostname(value) {
|
||||
|
||||
function isValidServicename(value) {
|
||||
if (value.match(
|
||||
'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9 \-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[_a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$'
|
||||
'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9 -]{0,61}[a-zA-Z0-9])(.([a-zA-Z0-9]|[_a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]))*$' //lgtm [js/redos]
|
||||
))
|
||||
return true;
|
||||
else
|
||||
|
@@ -466,7 +466,7 @@ function startWizardCC() {
|
||||
|
||||
$('#wiz_cc_kodiip').off().on('change', function () {
|
||||
|
||||
kodiAddress = $(this).val().trim();
|
||||
kodiAddress = encodeURIComponent($(this).val().trim());
|
||||
|
||||
$('#kodi_status').html('');
|
||||
if (kodiAddress !== "") {
|
||||
|
Reference in New Issue
Block a user