mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
feat(auth): add an auto-focus directive and remove username placeholder
This commit is contained in:
parent
851a1ac64c
commit
774738110b
3 changed files with 16 additions and 2 deletions
14
app/directives/autofocus.js
Normal file
14
app/directives/autofocus.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
angular
|
||||
.module('portainer')
|
||||
.directive('autoFocus', ['$timeout', function porAutoFocus($timeout) {
|
||||
var directive = {
|
||||
restrict: 'A',
|
||||
link: function($scope, $element) {
|
||||
$timeout(function() {
|
||||
$element[0].focus();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return directive;
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue