diff --git a/guacamole/src/main/webapp/app/index/styles/ui.css b/guacamole/src/main/webapp/app/index/styles/ui.css index 87c407bcb..77099e837 100644 --- a/guacamole/src/main/webapp/app/index/styles/ui.css +++ b/guacamole/src/main/webapp/app/index/styles/ui.css @@ -96,6 +96,7 @@ h2 { } +.header ~ * .header, .header ~ .header { margin-top: 1em; border-top: 1px solid rgba(0, 0, 0, 0.125); diff --git a/guacamole/src/main/webapp/app/settings/directives/guacSettingsPreferences.js b/guacamole/src/main/webapp/app/settings/directives/guacSettingsPreferences.js index 11c9a3d73..4a5e0e194 100644 --- a/guacamole/src/main/webapp/app/settings/directives/guacSettingsPreferences.js +++ b/guacamole/src/main/webapp/app/settings/directives/guacSettingsPreferences.js @@ -38,12 +38,13 @@ angular.module('settings').directive('guacSettingsPreferences', [function guacSe // Get required types var PermissionSet = $injector.get('PermissionSet'); - + // Required services var authenticationService = $injector.get('authenticationService'); var guacNotification = $injector.get('guacNotification'); var userService = $injector.get('userService'); - var permissionService = $injector.get("permissionService"); + var permissionService = $injector.get('permissionService'); + var preferenceService = $injector.get('preferenceService'); /** * An action to be provided along with the object sent to @@ -64,6 +65,13 @@ angular.module('settings').directive('guacSettingsPreferences', [function guacSe */ var username = authenticationService.getCurrentUserID(); + /** + * All currently-set preferences, or their defaults if not yet set. + * + * @type Object. + */ + $scope.preferences = preferenceService.preferences; + /** * The new password for the user. * diff --git a/guacamole/src/main/webapp/app/settings/styles/input-method.css b/guacamole/src/main/webapp/app/settings/styles/input-method.css new file mode 100644 index 000000000..c6e750507 --- /dev/null +++ b/guacamole/src/main/webapp/app/settings/styles/input-method.css @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2013 Glyptodon LLC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +.preferences .input-method .caption { + margin-left: 2em; + margin-right: 2em; +} diff --git a/guacamole/src/main/webapp/app/settings/styles/mouse-mode.css b/guacamole/src/main/webapp/app/settings/styles/mouse-mode.css new file mode 100644 index 000000000..739048406 --- /dev/null +++ b/guacamole/src/main/webapp/app/settings/styles/mouse-mode.css @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2013 Glyptodon LLC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +.preferences .mouse-mode .choice .figure { + display: inline-block; + vertical-align: middle; + width: 75%; + max-width: 320px; +} + +.preferences .mouse-mode .figure img { + display: block; + width: 100%; + max-width: 320px; + margin: 1em auto; +} diff --git a/guacamole/src/main/webapp/app/settings/templates/settingsPreferences.html b/guacamole/src/main/webapp/app/settings/templates/settingsPreferences.html index 0a5efd80f..0deeabe3b 100644 --- a/guacamole/src/main/webapp/app/settings/templates/settingsPreferences.html +++ b/guacamole/src/main/webapp/app/settings/templates/settingsPreferences.html @@ -49,4 +49,54 @@ + +

{{'SETTINGS_PREFERENCES.SECTION_HEADER_DEFAULT_INPUT_METHOD' | translate}}

+
+

{{'SETTINGS_PREFERENCES.HELP_DEFAULT_INPUT_METHOD' | translate}}

+ + +
+ +

+
+ + +
+ +

+
+ + +
+ +

+
+ +
+ + +

{{'SETTINGS_PREFERENCES.SECTION_HEADER_DEFAULT_MOUSE_MODE' | translate}}

+
+

{{'SETTINGS_PREFERENCES.HELP_DEFAULT_MOUSE_MODE' | translate}}

+ + +
+ +
+ +

+
+
+ + +
+ +
+ +

+
+
+ +
+ diff --git a/guacamole/src/main/webapp/translations/en_US.json b/guacamole/src/main/webapp/translations/en_US.json index b5a7a7173..f3d8cf281 100644 --- a/guacamole/src/main/webapp/translations/en_US.json +++ b/guacamole/src/main/webapp/translations/en_US.json @@ -417,9 +417,23 @@ "FIELD_HEADER_PASSWORD_NEW_AGAIN" : "Confirm New Password:", "FIELD_HEADER_USERNAME" : "Username:", - "HELP_UPDATE_PASSWORD" : "If you wish to change your password, enter your current password and the desired new password below, and click \"Update Password\". The change will take effect immediately.", + "HELP_DEFAULT_INPUT_METHOD" : "The default input method determines how keyboard events are received by Guacamole. Changing this setting may be necessary when using a mobile device, or when typing through an IME. This setting can be overridden on a per-connection basis within the Guacamole menu.", + "HELP_DEFAULT_MOUSE_MODE" : "The default mouse emulation mode determines how the remote mouse will behave in new connections with respect to touches. This setting can be overridden on a per-connection basis within the Guacamole menu.", + "HELP_INPUT_METHOD_NONE" : "@:CLIENT.HELP_INPUT_METHOD_NONE", + "HELP_INPUT_METHOD_OSK" : "@:CLIENT.HELP_INPUT_METHOD_OSK", + "HELP_INPUT_METHOD_TEXT" : "@:CLIENT.HELP_INPUT_METHOD_TEXT", + "HELP_MOUSE_MODE_ABSOLUTE" : "@:CLIENT.HELP_MOUSE_MODE_ABSOLUTE", + "HELP_MOUSE_MODE_RELATIVE" : "@:CLIENT.HELP_MOUSE_MODE_RELATIVE", + "HELP_UPDATE_PASSWORD" : "If you wish to change your password, enter your current password and the desired new password below, and click \"Update Password\". The change will take effect immediately.", - "INFO_PASSWORD_CHANGED" : "Password changed." + "INFO_PASSWORD_CHANGED" : "Password changed.", + + "NAME_INPUT_METHOD_NONE" : "@:CLIENT.NAME_INPUT_METHOD_NONE", + "NAME_INPUT_METHOD_OSK" : "@:CLIENT.NAME_INPUT_METHOD_OSK", + "NAME_INPUT_METHOD_TEXT" : "@:CLIENT.NAME_INPUT_METHOD_TEXT", + + "SECTION_HEADER_DEFAULT_INPUT_METHOD" : "Default Input Method", + "SECTION_HEADER_DEFAULT_MOUSE_MODE" : "Default Mouse Emulation Mode" },