From 5c151e0d4fed54b5b582b562be0547c49077d23f Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Wed, 4 Aug 2021 22:36:41 +0200 Subject: [PATCH] Fix Expert Mode Switch --- src/js/main.js | 6 +++--- src/js/tabs/firmware_flasher.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/main.js b/src/js/main.js index bc89bd70..2be0cefb 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -501,12 +501,12 @@ function startProcess() { }); ConfigStorage.get('permanentExpertMode', function (result) { - const experModeCheckbox = 'input[name="expertModeCheckbox"]'; + const expertModeCheckbox = 'input[name="expertModeCheckbox"]'; if (result.permanentExpertMode) { - $(experModeCheckbox).prop('checked', true); + $(expertModeCheckbox).prop('checked', true); } - $(experModeCheckbox).change(function () { + $(expertModeCheckbox).change(function () { const checked = $(this).is(':checked'); checkSetupAnalytics(function (analyticsService) { analyticsService.setDimension(analyticsService.DIMENSIONS.CONFIGURATOR_EXPERT_MODE, checked ? 'On' : 'Off'); diff --git a/src/js/tabs/firmware_flasher.js b/src/js/tabs/firmware_flasher.js index e2e76c5b..52cda162 100644 --- a/src/js/tabs/firmware_flasher.js +++ b/src/js/tabs/firmware_flasher.js @@ -376,7 +376,7 @@ firmware_flasher.initialize = function (callback) { function showOrHideBuildTypeSelect() { const expertModeChecked = $(this).is(':checked'); - globalExpertMode_e.prop('checked', expertModeChecked); + globalExpertMode_e.prop('checked', expertModeChecked).trigger('change'); if (expertModeChecked) { buildTypesToShow = buildTypes.concat(ciBuildsTypes); buildBuildTypeOptionsList();