From 967e5c36ba60e7a26f79ee253886a950569bf6d0 Mon Sep 17 00:00:00 2001 From: Christian Hofmaier Date: Mon, 19 Oct 2020 17:48:53 +0200 Subject: [locationinfo] fix bootstrap-switches override always "on" --- .../locationinfo/templates/page-config-panel-default.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules-available/locationinfo/templates/page-config-panel-default.html b/modules-available/locationinfo/templates/page-config-panel-default.html index 86e2a520..c502db4e 100644 --- a/modules-available/locationinfo/templates/page-config-panel-default.html +++ b/modules-available/locationinfo/templates/page-config-panel-default.html @@ -541,6 +541,7 @@ document.addEventListener("DOMContentLoaded", function () { $( this ).removeClass('btstrpCheckbox'); if ($( this ).attr('type') === 'range') $( this ).val(overVal ? overrides[locId][oldName] : $('#' + oldId).val()); else if ($( this ).attr('type') === 'checkbox') { + $( this ) .bootstrapSwitch({size: 'small'}) .on('switchChange.bootstrapSwitch', function () { @@ -550,7 +551,9 @@ document.addEventListener("DOMContentLoaded", function () { $('#' + substr + 'daystoshow').prop('disabled', this.checked); } }); - $( this ).bootstrapSwitch('state', overVal ? overrides[locId][oldName] : $('#' + oldId).val()); + + // $( this ).bootstrapSwitch('state', overVal ? overrides[locId][oldName] : $('#' + oldId).val()); + } }); -- cgit v1.2.3-55-g7522