summaryrefslogtreecommitdiff
path: root/js/codeq/profile.js
diff options
context:
space:
mode:
authorAleš Smodiš <aless@guru.si>2015-12-15 11:26:23 +0100
committerAleš Smodiš <aless@guru.si>2015-12-15 11:26:23 +0100
commit13c8be3d82350082093df8cd65771f09fcb83c54 (patch)
tree3df49dfdff29a1d57cb30857c323187d50852a5e /js/codeq/profile.js
parent8b223c8ad6e096105703776a59937da62d8cb3d5 (diff)
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.
Diffstat (limited to 'js/codeq/profile.js')
-rw-r--r--js/codeq/profile.js10
1 files changed, 7 insertions, 3 deletions
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 <http://www.gnu.org/licenses/>. */
(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 <http://www.gnu.org/licenses/>. */
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 <http://www.gnu.org/licenses/>. */
'exit' : function(){
jqBtnChangePass.off('click');
jqBtnGoBack.off('click');
- $("#screen_profile").css('display', 'none');
+ jqScreen.css('display', 'none');
$('#loggedInViaSamlSpan').css("display","none");
}
});