diff --git a/front/css/app.css b/front/css/app.css index 730fa63e..bc8485b3 100755 --- a/front/css/app.css +++ b/front/css/app.css @@ -745,6 +745,18 @@ height: 50px; .infobox_label { font-size: 16px !important; } + +.deviceSelector +{ + display: block; +} + +.deviceSelector input +{ + width: 100% !important; + display: inline-grid; +} + /* --------------------------------------------------------- */ /* report */ /* --------------------------------------------------------- */ diff --git a/front/js/common.js b/front/js/common.js index a2372270..48415082 100755 --- a/front/js/common.js +++ b/front/js/common.js @@ -1135,6 +1135,35 @@ function arraysContainSameValues(arr1, arr2) { } } +// ----------------------------------------------------------------------------- +// Hide elements on the page based on the supplied setting +function hideUIelements(settingKey) { + + hiddenSectionsSetting = getSetting(settingKey) + + if(hiddenSectionsSetting != "") // handle if settings not yet initialized + { + + sectionsArray = createArray(hiddenSectionsSetting) + + // remove spaces to get IDs + var newArray = $.map(sectionsArray, function(value) { + return value.replace(/\s/g, ''); + }); + + $.each(newArray, function(index, hiddenSection) { + + if($('#' + hiddenSection)) + { + $('#' + hiddenSection).hide() + } + + }); + } + +} + + // ----------------------------------------------------------------------------- // apply dark mode diff --git a/front/js/ui_components.js b/front/js/ui_components.js index 0b263788..df9e6da9 100755 --- a/front/js/ui_components.js +++ b/front/js/ui_components.js @@ -68,38 +68,6 @@ function initDeviceSelectors(devicesListAll_JSON) { } - -// ----------------------------------------------------------------------------- -// Hide elements on the page based on the supplied setting -function hideUIelements(settingKey) { - - hiddenSectionsSetting = getSetting(settingKey) - - if(hiddenSectionsSetting != "") // handle if settings not yet initialized - { - - sectionsArray = createArray(hiddenSectionsSetting) - - // remove spaces to get IDs - var newArray = $.map(sectionsArray, function(value) { - return value.replace(/\s/g, ''); - }); - - $.each(newArray, function(index, hiddenSection) { - - if($('#' + hiddenSection)) - { - $('#' + hiddenSection).hide() - } - - }); - } - -} - - - - // ----------------------------------------------------------------------------- // Updates the icon preview function updateIconPreview (inputId) { @@ -284,10 +252,15 @@ function initSelect2() { } } -// try to initialize select2 -setTimeout(() => { - initSelect2() -}, 1000); +// init select2 after dom laoded +window.addEventListener("load", function() { + // try to initialize select2 + setTimeout(() => { + initSelect2() + }, 1000); +}); + + console.log("init ui_components.js") \ No newline at end of file diff --git a/front/maintenance.php b/front/maintenance.php index cc3cf8cd..fdae73c1 100755 --- a/front/maintenance.php +++ b/front/maintenance.php @@ -20,7 +20,7 @@ require 'php/templates/header.php'; ?> -