Splitted system config into Web, NTP, GPIO and Debugging

This commit is contained in:
Gunnar Skjold
2020-08-05 13:45:10 +02:00
parent 603f2925ce
commit 6479fd6a63
13 changed files with 450 additions and 180 deletions

View File

@@ -99,6 +99,13 @@ $(function() {
$(this).next('.custom-file-label').html(fileName);
})
// For NTP
$('#ntpEnable').on('change', function() {
var inputs = $('.ntp-config');
inputs.prop('disabled', !$(this).is(':checked'));
});
$('#ntpEnable').trigger('change');
switch(window.location.pathname) {
case '/config-meter':
$('#config-meter-link').addClass('active');
@@ -114,9 +121,9 @@ $(function() {
$('#config-mqtt-link').addClass('active');
break;
case '/config-web':
$('#config-web-link').addClass('active');
break;
case '/config-system':
case '/ntp':
case '/gpio':
case '/debugging':
case '/firmware':
case '/reset':
$('#config-system-link').addClass('active');