From 08e955335ecb65c308dbc68bf0610dce39ce3623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Pu=C5=A1nik?= Date: Tue, 20 Oct 2015 17:39:04 +0200 Subject: - 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." --- js/codeq/profile.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'js/codeq/profile.js') 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='', 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 -- cgit v1.2.1