diff --git a/guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js b/guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js index c6630e72b0..6ba972cfeb 100644 --- a/guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js +++ b/guacamole/src/main/webapp/app/navigation/directives/guacUserMenu.js @@ -134,6 +134,48 @@ angular.module('navigation').directive('guacUserMenu', [function guacUserMenu() return authenticationService.isAnonymous(); }; + /** + * Requests fullscreen for the Guacamole page. + */ + $scope.fullscreen = function fullscreen() { + var elem = document.documentElement; + var fullscreenElem = !(!document.fullscreenElement && + !document.msFullscreenElement && + !document.mozFullScreenElement && + !document.webkitFullscreenElement); + + if (!fullscreenElem) { + if (!elem.requestFullscreen) { + elem.requestFullscreen = (elem.mozRequestFullScreen + || elem.webkitRequestFullscreen + || elem.msRequestFullscreen).bind(elem); + } + + if (elem.requestFullscreen) { + elem.requestFullscreen(); + } + } else { + if (!document.exitFullscreen) { + document.exitFullscreen = (document.mozCancelFullScreen + || document.webkitExitFullscreen + || document.msExitFullscreen).bind(document); + } + + if (document.exitFullscreen) { + document.exitFullscreen(); + } + } + }; + + /** + * Action which requests fullscreen for the Guacamole page. + */ + var FULLSCREEN_ACTION = { + name : 'USER_MENU.ACTION_FULLSCREEN', + className : 'fullscreen', + callback : $scope.fullscreen + }; + /** * Logs out the current user, redirecting them to back to the root * after logout completes. @@ -162,7 +204,7 @@ angular.module('navigation').directive('guacUserMenu', [function guacUserMenu() /** * All available actions for the current user. */ - $scope.actions = [ LOGOUT_ACTION ]; + $scope.actions = [ FULLSCREEN_ACTION, LOGOUT_ACTION ]; }] // end controller diff --git a/guacamole/src/main/webapp/translations/cz.json b/guacamole/src/main/webapp/translations/cz.json index 6f406d0fdd..ee4d0af6b1 100644 --- a/guacamole/src/main/webapp/translations/cz.json +++ b/guacamole/src/main/webapp/translations/cz.json @@ -13,6 +13,7 @@ "ACTION_DOWNLOAD" : "Stáhnout", "ACTION_LOGIN" : "Přihlásit", "ACTION_LOGOUT" : "Odhlásit", + "ACTION_FULLSCREEN" : "Celá obrazovka", "ACTION_MANAGE_CONNECTIONS" : "Připojení", "ACTION_MANAGE_PREFERENCES" : "Vlastnosti", "ACTION_MANAGE_SETTINGS" : "Nastavení", @@ -869,6 +870,7 @@ "USER_MENU" : { "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", + "ACTION_FULLSCREEN" : "@:APP.ACTION_FULLSCREEN", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_PREFERENCES" : "@:APP.ACTION_MANAGE_PREFERENCES", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS", diff --git a/guacamole/src/main/webapp/translations/de.json b/guacamole/src/main/webapp/translations/de.json index 0a2bed021c..aa79188e5e 100644 --- a/guacamole/src/main/webapp/translations/de.json +++ b/guacamole/src/main/webapp/translations/de.json @@ -13,6 +13,7 @@ "ACTION_DOWNLOAD" : "Download", "ACTION_LOGIN" : "Anmelden", "ACTION_LOGOUT" : "Abmelden", + "ACTION_FULLSCREEN" : "Ganzer Bildschirm", "ACTION_MANAGE_CONNECTIONS" : "Verbindungen", "ACTION_MANAGE_PREFERENCES" : "Einstellungen", "ACTION_MANAGE_SETTINGS" : "Einstellungen", @@ -862,6 +863,7 @@ "USER_MENU" : { "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", + "ACTION_FULLSCREEN" : "@:APP.ACTION_FULLSCREEN", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_PREFERENCES" : "@:APP.ACTION_MANAGE_PREFERENCES", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS", diff --git a/guacamole/src/main/webapp/translations/en.json b/guacamole/src/main/webapp/translations/en.json index 63deae5e4d..72e356106f 100644 --- a/guacamole/src/main/webapp/translations/en.json +++ b/guacamole/src/main/webapp/translations/en.json @@ -16,6 +16,7 @@ "ACTION_DOWNLOAD" : "Download", "ACTION_LOGIN" : "Login", "ACTION_LOGOUT" : "Logout", + "ACTION_FULLSCREEN" : "Fullscreen", "ACTION_MANAGE_CONNECTIONS" : "Connections", "ACTION_MANAGE_PREFERENCES" : "Preferences", "ACTION_MANAGE_SETTINGS" : "Settings", @@ -963,6 +964,7 @@ "USER_MENU" : { "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", + "ACTION_FULLSCREEN" : "@:APP.ACTION_FULLSCREEN", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_PREFERENCES" : "@:APP.ACTION_MANAGE_PREFERENCES", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS", diff --git a/guacamole/src/main/webapp/translations/es.json b/guacamole/src/main/webapp/translations/es.json index a3dfc5a228..61c45f45be 100644 --- a/guacamole/src/main/webapp/translations/es.json +++ b/guacamole/src/main/webapp/translations/es.json @@ -13,6 +13,7 @@ "ACTION_DOWNLOAD" : "Descargar", "ACTION_LOGIN" : "Iniciar Sesión", "ACTION_LOGOUT" : "Cerrar Sesión", + "ACTION_FULLSCREEN" : "Pantalla completa", "ACTION_MANAGE_CONNECTIONS" : "Conexiones", "ACTION_MANAGE_PREFERENCES" : "Preferencias", "ACTION_MANAGE_SETTINGS" : "Configuración", @@ -729,6 +730,7 @@ "USER_MENU" : { "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", + "ACTION_FULLSCREEN" : "@:APP.ACTION_FULLSCREEN", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_PREFERENCES" : "@:APP.ACTION_MANAGE_PREFERENCES", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS", diff --git a/guacamole/src/main/webapp/translations/fr.json b/guacamole/src/main/webapp/translations/fr.json index cc3e5841bf..4a8d9b8367 100644 --- a/guacamole/src/main/webapp/translations/fr.json +++ b/guacamole/src/main/webapp/translations/fr.json @@ -12,6 +12,7 @@ "ACTION_DELETE_SESSIONS" : "Fermer les Sessions", "ACTION_LOGIN" : "Se connecter", "ACTION_LOGOUT" : "Se déconnecter", + "ACTION_FULLSCREEN" : "Plein écran", "ACTION_MANAGE_CONNECTIONS" : "Connexions", "ACTION_MANAGE_PREFERENCES" : "Préférences", "ACTION_MANAGE_SETTINGS" : "Paramètres", @@ -648,6 +649,7 @@ "USER_MENU" : { "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", + "ACTION_FULLSCREEN" : "@:APP.ACTION_FULLSCREEN", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_PREFERENCES" : "@:APP.ACTION_MANAGE_PREFERENCES", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS", diff --git a/guacamole/src/main/webapp/translations/it.json b/guacamole/src/main/webapp/translations/it.json index 7437b3125b..e33eb62b36 100644 --- a/guacamole/src/main/webapp/translations/it.json +++ b/guacamole/src/main/webapp/translations/it.json @@ -12,6 +12,7 @@ "ACTION_DELETE_SESSIONS" : "Termina Sessione", "ACTION_LOGIN" : "Entra", "ACTION_LOGOUT" : "Esci", + "ACTION_FULLSCREEN" : "A schermo intero", "ACTION_MANAGE_CONNECTIONS" : "Connessioni", "ACTION_MANAGE_PREFERENCES" : "Preferenze", "ACTION_MANAGE_SETTINGS" : "Opzioni", @@ -590,6 +591,7 @@ "USER_MENU" : { "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", + "ACTION_FULLSCREEN" : "@:APP.ACTION_FULLSCREEN", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_PREFERENCES" : "@:APP.ACTION_MANAGE_PREFERENCES", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS", diff --git a/guacamole/src/main/webapp/translations/ja.json b/guacamole/src/main/webapp/translations/ja.json index c955902483..ba1d47099d 100644 --- a/guacamole/src/main/webapp/translations/ja.json +++ b/guacamole/src/main/webapp/translations/ja.json @@ -12,6 +12,7 @@ "ACTION_DOWNLOAD" : "ダウンロード", "ACTION_LOGIN" : "ログイン", "ACTION_LOGOUT" : "ログアウト", + "ACTION_FULLSCREEN" : "全画面表示", "ACTION_MANAGE_CONNECTIONS" : "接続", "ACTION_MANAGE_PREFERENCES" : "ユーザ設定", "ACTION_MANAGE_SETTINGS" : "設定", @@ -733,6 +734,7 @@ "USER_MENU" : { "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", + "ACTION_FULLSCREEN" : "@:APP.ACTION_FULLSCREEN", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_PREFERENCES" : "@:APP.ACTION_MANAGE_PREFERENCES", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS", diff --git a/guacamole/src/main/webapp/translations/nl.json b/guacamole/src/main/webapp/translations/nl.json index 6d8bb1ecd4..cd2baee806 100644 --- a/guacamole/src/main/webapp/translations/nl.json +++ b/guacamole/src/main/webapp/translations/nl.json @@ -12,6 +12,7 @@ "ACTION_DELETE_SESSIONS" : "Verwijder Sessies", "ACTION_LOGIN" : "Inloggen", "ACTION_LOGOUT" : "Uitloggen", + "ACTION_FULLSCREEN" : "Volledig scherm", "ACTION_MANAGE_CONNECTIONS" : "Verbindingen", "ACTION_MANAGE_PREFERENCES" : "Voorkeuren", "ACTION_MANAGE_SETTINGS" : "Instellingen", @@ -678,6 +679,7 @@ "USER_MENU" : { "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", + "ACTION_FULLSCREEN" : "@:APP.ACTION_FULLSCREEN", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_PREFERENCES" : "@:APP.ACTION_MANAGE_PREFERENCES", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS", diff --git a/guacamole/src/main/webapp/translations/no.json b/guacamole/src/main/webapp/translations/no.json index 1cfcd2524e..01f530db04 100644 --- a/guacamole/src/main/webapp/translations/no.json +++ b/guacamole/src/main/webapp/translations/no.json @@ -12,6 +12,7 @@ "ACTION_DELETE_SESSIONS" : "Avslutt Sesjoner", "ACTION_LOGIN" : "Logg inn", "ACTION_LOGOUT" : "Logg ut", + "ACTION_FULLSCREEN" : "Full skjerm", "ACTION_MANAGE_CONNECTIONS" : "Forbindelser", "ACTION_MANAGE_PREFERENCES" : "Mine valg", "ACTION_MANAGE_SETTINGS" : "Innstillinger", @@ -659,6 +660,7 @@ "USER_MENU" : { "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", + "ACTION_FULLSCREEN" : "@:APP.ACTION_FULLSCREEN", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_PREFERENCES" : "@:APP.ACTION_MANAGE_PREFERENCES", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS", diff --git a/guacamole/src/main/webapp/translations/ru.json b/guacamole/src/main/webapp/translations/ru.json index 63df9586e2..1d57b6376e 100644 --- a/guacamole/src/main/webapp/translations/ru.json +++ b/guacamole/src/main/webapp/translations/ru.json @@ -11,6 +11,7 @@ "ACTION_DELETE_SESSIONS" : "Завершить сессии", "ACTION_LOGIN" : "Вход", "ACTION_LOGOUT" : "Выход", + "ACTION_FULLSCREEN" : "Полноэкранный", "ACTION_MANAGE_CONNECTIONS" : "Подключения", "ACTION_MANAGE_PREFERENCES" : "Настройки", "ACTION_MANAGE_SETTINGS" : "Опции", @@ -574,6 +575,7 @@ "USER_MENU" : { "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", + "ACTION_FULLSCREEN" : "@:APP.ACTION_FULLSCREEN", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_PREFERENCES" : "@:APP.ACTION_MANAGE_PREFERENCES", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS", diff --git a/guacamole/src/main/webapp/translations/zh.json b/guacamole/src/main/webapp/translations/zh.json index d8ad3d3b68..7fac71165b 100644 --- a/guacamole/src/main/webapp/translations/zh.json +++ b/guacamole/src/main/webapp/translations/zh.json @@ -13,6 +13,7 @@ "ACTION_DOWNLOAD" : "下载", "ACTION_LOGIN" : "登录", "ACTION_LOGOUT" : "登出", + "ACTION_FULLSCREEN" : "全屏", "ACTION_MANAGE_CONNECTIONS" : "连接", "ACTION_MANAGE_PREFERENCES" : "偏好", "ACTION_MANAGE_SETTINGS" : "设置", @@ -764,6 +765,7 @@ "USER_MENU" : { "ACTION_LOGOUT" : "@:APP.ACTION_LOGOUT", + "ACTION_FULLSCREEN" : "@:APP.ACTION_FULLSCREEN", "ACTION_MANAGE_CONNECTIONS" : "@:APP.ACTION_MANAGE_CONNECTIONS", "ACTION_MANAGE_PREFERENCES" : "@:APP.ACTION_MANAGE_PREFERENCES", "ACTION_MANAGE_SESSIONS" : "@:APP.ACTION_MANAGE_SESSIONS",