From f3dfd62eb28d419f2036340de02fc787b0ea044b Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 18 Feb 2016 14:42:20 +0100 Subject: Fix handling of settings navigation icon --- js/codeq/navigation.js | 2 +- js/codeq/settings.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'js/codeq') diff --git a/js/codeq/navigation.js b/js/codeq/navigation.js index f6f032f..70b7fc5 100644 --- a/js/codeq/navigation.js +++ b/js/codeq/navigation.js @@ -206,7 +206,7 @@ along with this program. If not, see . */ codeq.globalStateMachine.transition('changePassword'); e.preventDefault();//prevent this since we'll trigger a page reload otherwise }); - $('#settingsTrigger').on('click',function(e){ + $('#navigation-settings').on('click',function(e){ codeq.globalStateMachine.transition('settings'); e.preventDefault(); }); diff --git a/js/codeq/settings.js b/js/codeq/settings.js index 980aba3..1f35abf 100644 --- a/js/codeq/settings.js +++ b/js/codeq/settings.js @@ -21,7 +21,8 @@ along with this program. If not, see . */ (function(){ "use strict"; - var guiLangSelect = $('#gui_lang_select'), + var navigationSettings = $('#navigation-settings'), + guiLangSelect = $('#gui_lang_select'), robotAddressInput = $('#robot_address_input'), jqDisabledOverlay = $('#disabled'), jqSettForm = $("#settingsForm"), @@ -41,6 +42,8 @@ along with this program. If not, see . */ 'enter':function(){ jqDisabledOverlay.css('display', ''); + navigationSettings.addClass('active'); + robotAddressInput.val(codeq.settings['robot_address']);//set the robot address once we enter the state var previousGuiLang = codeq.settings['gui_lang']; var previousLayout = codeq.settings['gui_layout']; @@ -91,6 +94,7 @@ along with this program. If not, see . */ guiLangSelect.off('select'); robotAddressInput.val(''); jqScreenSettings.css('display', 'none'); + navigationSettings.removeClass('active'); } }); })(); -- cgit v1.2.1