1
0
Fork 0
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:
Anthony Lapenna 2017-09-17 17:07:19 +02:00
parent 851a1ac64c
commit 774738110b
3 changed files with 16 additions and 2 deletions

View 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;
}]);