diff options
author | Aleš Smodiš <aless@guru.si> | 2015-10-08 19:01:10 +0200 |
---|---|---|
committer | Aleš Smodiš <aless@guru.si> | 2015-10-08 19:01:10 +0200 |
commit | 084e0806bc5aff00fc697cb51dee7b4a331e4b64 (patch) | |
tree | b1df59c0ac4e8b2a13eb59a14d50f14137c324e0 /js/codeq/core.js | |
parent | 70b73f8e36900ab5b0784684fccc4069af1bae96 (diff) |
Adapted to the reworked session handling on the server. Bugfixed the lang setting handling.
Diffstat (limited to 'js/codeq/core.js')
-rw-r--r-- | js/codeq/core.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/codeq/core.js b/js/codeq/core.js index 02bc2f0..d60c7e4 100644 --- a/js/codeq/core.js +++ b/js/codeq/core.js @@ -569,6 +569,23 @@ if (listeners[i] === callback) listeners.splice(i, 1); } } + }, + + // reset the app + 'reset': function (reason) { + codeq.log.info('App reset: ' + (reason || 'no reason given')); + codeq.globalStateMachine.transition('login'); + codeq.wait( + codeq.comms.logout() + .finally(codeq.comms.disconnect) + .fail(function () {}) // ignore errors + ) + .then(function () { + if (reason) { + alert(reason); + } + }) + .done(); } }; })(); |