From eb50c5c0e8719d3d2d5ceaa4f02928f330a6074b Mon Sep 17 00:00:00 2001 From: m-khan-glyptodon Date: Fri, 7 Jun 2019 14:30:24 -0700 Subject: [PATCH] GUACAMOLE-302: Additions made to the username and password field types so that they can now be manually focussed using the custom guacFocus directive. --- guacamole/src/main/webapp/app/form/directives/form.js | 9 +++++++++ .../main/webapp/app/form/templates/passwordField.html | 2 +- .../src/main/webapp/app/form/templates/textField.html | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/guacamole/src/main/webapp/app/form/directives/form.js b/guacamole/src/main/webapp/app/form/directives/form.js index 925128b9e..81f500fc9 100644 --- a/guacamole/src/main/webapp/app/form/directives/form.js +++ b/guacamole/src/main/webapp/app/form/directives/form.js @@ -187,6 +187,15 @@ angular.module('form').directive('guacForm', [function form() { }); + /** + * Returns whether the given field should be focused or not. + * + * @param {Field} field + * The field to check. + * + * @returns {Boolean} + * true if the given field should be focused, false otherwise. + */ $scope.isFocused = function isFocused(field) { return field && (field.name === $scope.focused); }; diff --git a/guacamole/src/main/webapp/app/form/templates/passwordField.html b/guacamole/src/main/webapp/app/form/templates/passwordField.html index 56472ef4e..68d36f758 100644 --- a/guacamole/src/main/webapp/app/form/templates/passwordField.html +++ b/guacamole/src/main/webapp/app/form/templates/passwordField.html @@ -1,4 +1,4 @@
- +
\ No newline at end of file diff --git a/guacamole/src/main/webapp/app/form/templates/textField.html b/guacamole/src/main/webapp/app/form/templates/textField.html index 819ae038a..6abd4f6c0 100644 --- a/guacamole/src/main/webapp/app/form/templates/textField.html +++ b/guacamole/src/main/webapp/app/form/templates/textField.html @@ -1,5 +1,5 @@
-