From 91de37aaf47e041a7a2220c39f7abc9ad60dd268 Mon Sep 17 00:00:00 2001 From: Christian Hofmaier Date: Thu, 26 Sep 2019 19:43:47 +0200 Subject: [locationinfo] Rework from HTML blocks to Jquery Clone - generalize code for easier adding of new functions --- .../templates/page-config-panel-default.html | 191 +++++++++++---------- 1 file changed, 102 insertions(+), 89 deletions(-) (limited to 'modules-available/locationinfo') diff --git a/modules-available/locationinfo/templates/page-config-panel-default.html b/modules-available/locationinfo/templates/page-config-panel-default.html index 5e13190e..eee01875 100644 --- a/modules-available/locationinfo/templates/page-config-panel-default.html +++ b/modules-available/locationinfo/templates/page-config-panel-default.html @@ -133,8 +133,7 @@
@@ -222,7 +221,7 @@
@@ -387,6 +386,7 @@ document.addEventListener("DOMContentLoaded", function () { // Initialize fancy tooltips $('p.helptext').tooltip(); + // Add listener to range sliders so their label can be updated var $range = $('input[type="range"]'); $range.change(function () { @@ -394,13 +394,12 @@ document.addEventListener("DOMContentLoaded", function () { }); // Set state of input controls that aren't statically initialized server side $('.modify-inputs input[type="checkbox"]') - .bootstrapSwitch({size: 'small'}) - .on('switchChange.bootstrapSwitch', function () { - if (this.name === 'scaledaysauto') { - $('#daystoshow').prop('disabled', this.checked); - } - }); - + .bootstrapSwitch({size: 'small'}) + .on('switchChange.bootstrapSwitch', function () { + if (this.name === 'scaledaysauto') { + $('#daystoshow').prop('disabled', this.checked); + } + }); var lids = $locInput.val().split(','); $selLocs.empty(); @@ -481,92 +480,106 @@ document.addEventListener("DOMContentLoaded", function () { } } - function loadOverrideContent(id) { - // 1. Build Content - // $content.append($('