From 13c8be3d82350082093df8cd65771f09fcb83c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Tue, 15 Dec 2015 11:26:23 +0100 Subject: Fixed the bug about the loss of problem solving screen state when entering a navigation-bar state and getting back. Now every state carries with itself the publicly exposed jqScreen object and isModal boolean information, which is used by the globalStateMachine in the actualTransition method. --- js/codeq/profile.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'js/codeq/profile.js') diff --git a/js/codeq/profile.js b/js/codeq/profile.js index 09a0e05..f863140 100644 --- a/js/codeq/profile.js +++ b/js/codeq/profile.js @@ -20,13 +20,17 @@ along with this program. If not, see . */ (function(){ - var jqBtnChangePass = $("#change_pass_profile"), + var jqScreen = $("#screen_profile"), + jqBtnChangePass = $("#change_pass_profile"), jqBtnGoBack = $("#btnProfileGoBack"); codeq.profile = { }; codeq.globalStateMachine.register('profile',{ + 'jqScreen': jqScreen, + 'isModal': true, + 'enter': function(){ jqBtnChangePass.on('click',function(){ codeq.globalStateMachine.transition('changePassword'); @@ -35,7 +39,7 @@ along with this program. If not, see . */ history.back();//forces a transition to the previous state }); if(codeq.samlLogin) $('#loggedInViaSamlSpan').css("display","");//show the span if we actually logged in with SAML - $("#screen_profile").css('display', ''); + jqScreen.css('display', ''); $('#disabled').css('display', 'none'); codeq.comms.getUserStat() .then(function (data) { @@ -78,7 +82,7 @@ along with this program. If not, see . */ 'exit' : function(){ jqBtnChangePass.off('click'); jqBtnGoBack.off('click'); - $("#screen_profile").css('display', 'none'); + jqScreen.css('display', 'none'); $('#loggedInViaSamlSpan').css("display","none"); } }); -- cgit v1.2.1