summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remoting/webapp/event_handlers.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/remoting/webapp/event_handlers.js b/remoting/webapp/event_handlers.js
index 0a75f16..c4b5ce9 100644
--- a/remoting/webapp/event_handlers.js
+++ b/remoting/webapp/event_handlers.js
@@ -14,6 +14,13 @@ function onLoad() {
var goEnterAccessCode = function() {
remoting.setMode(remoting.AppMode.CLIENT_UNCONNECTED);
};
+ var goFinishedIt2Me = function() {
+ if (remoting.currentMode == remoting.AppMode.CLIENT_CONNECT_FAILED_IT2ME) {
+ remoting.setMode(remoting.AppMode.CLIENT_UNCONNECTED);
+ } else {
+ remoting.setMode(remoting.AppMode.HOME);
+ }
+ };
var reload = function() {
window.location.reload();
};
@@ -42,7 +49,7 @@ function onLoad() {
{ event: 'click', id: 'host-finished-button', fn: goHome },
{ event: 'click', id: 'client-cancel-button', fn: goHome },
{ event: 'click', id: 'client-finished-it2me-button',
- fn: goEnterAccessCode },
+ fn: goFinishedIt2Me },
{ event: 'click', id: 'client-finished-me2me-button', fn: goHome },
{ event: 'click', id: 'client-reconnect-button', fn: reload },
{ event: 'click', id: 'cancel-button',