From af56157ed52e170d9265f68dddfc3a705ce9da9d Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 19 Apr 2012 15:36:21 -0700 Subject: [PATCH] Prompt when logging out from the button in the yellow bar (users may think this will only disconnect the session with the yellow bar in question, when in reality all sessions will be disconnected). --- guacamole/src/main/webapp/scripts/interface.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/guacamole/src/main/webapp/scripts/interface.js b/guacamole/src/main/webapp/scripts/interface.js index 6b6c132fb..c250ff562 100644 --- a/guacamole/src/main/webapp/scripts/interface.js +++ b/guacamole/src/main/webapp/scripts/interface.js @@ -2,6 +2,9 @@ // UI Definition var GuacamoleUI = { + "LOGOUT_PROMPT" : "Logging out will disconnect all of your active " + + "Guacamole sessions. Are you sure you wish to log out?", + /* Detection Constants */ "LONG_PRESS_DETECT_TIMEOUT" : 800, /* milliseconds */ @@ -296,8 +299,13 @@ var GuacamoleUI = { GuacamoleUI.buttons.logout.onclick = GuacamoleUI.buttons.touchLogout.onclick = function() { - window.location.href = "logout"; - GuacamoleUI.hideTouchMenu(); + + // Logout after warning user about session disconnect + if (confirm(GuacamoleUI.LOGOUT_PROMPT)) { + window.location.href = "logout"; + GuacamoleUI.hideTouchMenu(); + } + }; // Timeouts for detecting if users wants menu to open or close