summaryrefslogtreecommitdiff
path: root/js/codeq/profile.js
diff options
context:
space:
mode:
authorMarko Pušnik <marko.pusnik@guru.si>2015-10-20 17:39:04 +0200
committerMarko Pušnik <marko.pusnik@guru.si>2015-10-20 17:39:04 +0200
commit08e955335ecb65c308dbc68bf0610dce39ce3623 (patch)
tree8b9326f9e6a9c7d4cf5189efca83f56cf3961bd7 /js/codeq/profile.js
parentcdfff9e0ab7fc26682218c5c694da4e9d0f4eea5 (diff)
- icons
- any state marker from the URL before everything else loads removed - settings dropdown separator visibility in case of saml login fixed - profile screen: - go back button refactored - name, email field - phone, browser and platform type detection (misc.js) added - mobile apps: - meta viewport and add HandheldFriendly changed - style @-ms-viewport defined - ajaxPrefix and eioHost temporary changed to dev server - android: phonegap whitelistening in config.xml fixed - ios: add hide status bar to config.xml TODO: - WP8 mobile app: test - iOS mobile app: saml login solution (iframe cross domain url not allowed) - "No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin."
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