diff options
author | Marko Pušnik <marko.pusnik@guru.si> | 2015-11-09 12:50:44 +0100 |
---|---|---|
committer | Marko Pušnik <marko.pusnik@guru.si> | 2015-11-09 12:50:44 +0100 |
commit | 91bb685e531c43f291cc52b46a91c4ea087f95fd (patch) | |
tree | eb435518dc955294ee0c464ca7a5fed1c5193277 /js | |
parent | 7a2bca4459ff0219d15b6e2428b7e9871ab66f52 (diff) |
about screen mockup; TODO: text&design -> Loni&Saša
Diffstat (limited to 'js')
-rw-r--r-- | js/codeq/about.js | 22 | ||||
-rw-r--r-- | js/codeq/navigation.js | 4 |
2 files changed, 26 insertions, 0 deletions
diff --git a/js/codeq/about.js b/js/codeq/about.js new file mode 100644 index 0000000..a0ca261 --- /dev/null +++ b/js/codeq/about.js @@ -0,0 +1,22 @@ +/** + * Created by markop on 11/09/15. + */ +(function(){ + + var jqScreen = $("#screen_about"), + jqBtnGoBack = $("#btnAboutGoBack"); + + codeq.globalStateMachine.register('about',{ + 'enter': function(){ + jqBtnGoBack.on('click',function(){ + history.back();//forces a transition to the previous state + }); + jqScreen.css('display', ''); + }, + 'exit' : function(){ + jqScreen.css('display', 'none'); + jqBtnGoBack.off('click'); + } + }); + +})(); diff --git a/js/codeq/navigation.js b/js/codeq/navigation.js index 4baf5b9..be56740 100644 --- a/js/codeq/navigation.js +++ b/js/codeq/navigation.js @@ -149,6 +149,10 @@ codeq.globalStateMachine.transition('profile'); e.preventDefault();//prevent this since we'll trigger a page reload otherwise }); + $('#navigation-about').on('click', function(e){ + codeq.globalStateMachine.transition('about'); + e.preventDefault();//prevent this since we'll trigger a page reload otherwise + }); $('#change-password').on('click', function(e){ codeq.globalStateMachine.transition('changePassword'); e.preventDefault();//prevent this since we'll trigger a page reload otherwise |