{{'client.copiedText' | translate}}
- -diff --git a/guacamole/src/main/webapp/app/client/clientModule.js b/guacamole/src/main/webapp/app/client/clientModule.js index 944189dd4..38eee4bbb 100644 --- a/guacamole/src/main/webapp/app/client/clientModule.js +++ b/guacamole/src/main/webapp/app/client/clientModule.js @@ -23,4 +23,4 @@ /** * The module for code used to connect to a connection or balancing group. */ -angular.module('client', ['auth', 'history', 'osk', 'rest']); +angular.module('client', ['auth', 'history', 'osk', 'rest', 'textInput']); diff --git a/guacamole/src/main/webapp/app/client/controllers/clientController.js b/guacamole/src/main/webapp/app/client/controllers/clientController.js index ec2690ee6..e0efc341c 100644 --- a/guacamole/src/main/webapp/app/client/controllers/clientController.js +++ b/guacamole/src/main/webapp/app/client/controllers/clientController.js @@ -204,8 +204,9 @@ angular.module('home').controller('clientController', ['$scope', '$routeParams', // Show/hide UI elements depending on input method $scope.$watch('inputMethod', function setInputMethod(inputMethod) { - // Show on-screen keyboard only if selected - $scope.showOSK = (inputMethod === 'osk'); + // Show input methods only if selected + $scope.showOSK = (inputMethod === 'osk'); + $scope.showTextInput = (inputMethod === 'text'); }); diff --git a/guacamole/src/main/webapp/app/client/directives/guacClient.js b/guacamole/src/main/webapp/app/client/directives/guacClient.js index 476c5ae11..8c330805a 100644 --- a/guacamole/src/main/webapp/app/client/directives/guacClient.js +++ b/guacamole/src/main/webapp/app/client/directives/guacClient.js @@ -115,6 +115,13 @@ angular.module('client').directive('guacClient', [function guacClient() { */ var main = $element[0]; + /** + * The element which functions as a detector for size changes. + * + * @type Element + */ + var resizeSensor = $element.find('.resize-sensor')[0]; + /** * Guacamole mouse event object, wrapped around the main client * display. @@ -491,8 +498,8 @@ angular.module('client').directive('guacClient', [function guacClient() { $scope.clientProperties.scale = $scope.clientProperties.minScale; }); - // If the window is resized, attempt to resize client - $window.addEventListener('resize', function onResizeWindow() { + // If the element is resized, attempt to resize client + resizeSensor.contentWindow.addEventListener('resize', function mainElementResized() { // Send new display size, if changed if (client && display) { @@ -529,6 +536,16 @@ angular.module('client').directive('guacClient', [function guacClient() { event.preventDefault(); } }); + + // Universally handle all synthetic keydown events + $scope.$on('guacSyntheticKeydown', function syntheticKeydownListener(event, keysym) { + client.sendKeyEvent(1, keysym); + }); + + // Universally handle all synthetic keyup events + $scope.$on('guacSyntheticKeyup', function syntheticKeyupListener(event, keysym) { + client.sendKeyEvent(0, keysym); + }); /** * Converts the given bytes to a base64-encoded string. diff --git a/guacamole/src/main/webapp/app/client/styles/client.css b/guacamole/src/main/webapp/app/client/styles/client.css index 615849ca3..6f20b41b4 100644 --- a/guacamole/src/main/webapp/app/client/styles/client.css +++ b/guacamole/src/main/webapp/app/client/styles/client.css @@ -27,18 +27,6 @@ body.client { overflow: hidden; } -/* Viewport Clone */ - -#viewportClone { - display: table; - height: 100%; - width: 100%; - position: fixed; - left: 0; - top: 0; - visibility: hidden; -} - #preload { visibility: hidden; position: absolute; @@ -48,3 +36,21 @@ body.client { height: 0; overflow: hidden; } + +.client-view { + display: table; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.client-view .client-body { + display: table-row; +} + +.client-view .client-bottom { + display: table-row; + height: 0; +} diff --git a/guacamole/src/main/webapp/app/client/styles/display.css b/guacamole/src/main/webapp/app/client/styles/display.css index 7fd44f623..a606514e4 100644 --- a/guacamole/src/main/webapp/app/client/styles/display.css +++ b/guacamole/src/main/webapp/app/client/styles/display.css @@ -32,11 +32,21 @@ div.main { overflow: auto; - position: fixed; - top: 0; - bottom: 0; - right: 0; + width: 100%; + height: 100%; + position: relative; +} + +.resize-sensor { + height: 100%; + width: 100%; + position: absolute; left: 0; + top: 0; + overflow: hidden; + border: none; + opacity: 0; + z-index: -1; } div.displayOuter { diff --git a/guacamole/src/main/webapp/app/client/templates/clientError.html b/guacamole/src/main/webapp/app/client/templates/blank.html similarity index 71% rename from guacamole/src/main/webapp/app/client/templates/clientError.html rename to guacamole/src/main/webapp/app/client/templates/blank.html index 735d7ca0a..62b9f6aa2 100644 --- a/guacamole/src/main/webapp/app/client/templates/clientError.html +++ b/guacamole/src/main/webapp/app/client/templates/blank.html @@ -19,17 +19,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> - -
{{'client.error.connectionErrorTitle' | translate}}
- -{{errorStatus}}
- -