mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 05:31:22 +00:00
GUACAMOLE-302: Additions made to the username and password field types so that they can now be manually focussed using the custom guacFocus directive.
This commit is contained in:
@@ -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) {
|
$scope.isFocused = function isFocused(field) {
|
||||||
return field && (field.name === $scope.focused);
|
return field && (field.name === $scope.focused);
|
||||||
};
|
};
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<div class="password-field">
|
<div class="password-field">
|
||||||
<input type="{{passwordInputType}}" ng-disabled="disabled" ng-model="model" ng-trim="false" autocorrect="off" autocapitalize="off"/>
|
<input type="{{passwordInputType}}" ng-disabled="disabled" ng-model="model" ng-trim="false" guac-focus="focused" autocorrect="off" autocapitalize="off"/>
|
||||||
<div class="icon toggle-password" ng-click="togglePassword()" title="{{getTogglePasswordHelpText() | translate}}"></div>
|
<div class="icon toggle-password" ng-click="togglePassword()" title="{{getTogglePasswordHelpText() | translate}}"></div>
|
||||||
</div>
|
</div>
|
@@ -1,5 +1,5 @@
|
|||||||
<div class="text-field">
|
<div class="text-field">
|
||||||
<input type="text" ng-model="model" autocorrect="off" autocapitalize="off"
|
<input type="text" ng-model="model" autocorrect="off" autocapitalize="off" guac-focus="focused"
|
||||||
ng-disabled="disabled" ng-attr-list="{{ dataListId }}"/>
|
ng-disabled="disabled" ng-attr-list="{{ dataListId }}"/>
|
||||||
<datalist ng-if="dataListId" id="{{ dataListId }}">
|
<datalist ng-if="dataListId" id="{{ dataListId }}">
|
||||||
<option ng-repeat="option in field.options | orderBy: option"
|
<option ng-repeat="option in field.options | orderBy: option"
|
||||||
|
Reference in New Issue
Block a user