summaryrefslogtreecommitdiff
path: root/js/codeq/profile.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/codeq/profile.js')
-rw-r--r--js/codeq/profile.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/js/codeq/profile.js b/js/codeq/profile.js
index 133c947..36c5ccf 100644
--- a/js/codeq/profile.js
+++ b/js/codeq/profile.js
@@ -4,13 +4,20 @@
(function(){
- var jqBtnChangePass = $("#change_pass_profile");
+ var jqBtnChangePass = $("#change_pass_profile"),
+ jqBtnGoBack = $("#btnProfileGoBack");
codeq.profile = {
};
codeq.globalStateMachine.register('profile',{
'enter': function(){
+ jqBtnChangePass.on('click',function(){
+ codeq.globalStateMachine.transition('changePassword');
+ });
+ jqBtnGoBack.on('click',function(){
+ history.back();//forces a transition to the previous state
+ });
$("#screen_profile").css('display', '');
$('#disabled').css('display', 'none');
codeq.comms.getUserStat()
@@ -19,7 +26,6 @@
data = data.stat;
var columns = ['language', 'problem_group', 'problems_count', 'done', 'in_progress'],
- labels = ['Language', 'Problem group', 'All', 'Done', 'In progress'],
items='<thead><tr>',
tr_gui = codeq.tr.getDictionary('gui');
@@ -53,13 +59,11 @@
alert('GetUserStat failed: ' + reason);
})
.done();
- jqBtnChangePass.on('click',function(){
- codeq.globalStateMachine.transition('changePassword');
- });
},
'exit' : function(){
- $("#screen_profile").css('display', 'none');
jqBtnChangePass.off('click');
+ jqBtnGoBack.off('click');
+ $("#screen_profile").css('display', 'none');
}
});
})(); \ No newline at end of file