Autofocus and show the second PIN input automatically. Hide submit button. Allow only numbers

This commit is contained in:
Gustavo Maximiliano Cortez 2014-12-03 03:03:16 -03:00
commit 51028178ed
3 changed files with 96 additions and 28 deletions

View file

@ -286,10 +286,20 @@ angular.module('copayApp.directives')
link: function(_scope, _element) {
$timeout(function() {
_element[0].focus();
}, 0);
});
}
};
})
.directive('showFocus', function($timeout) {
return function(scope, element, attrs) {
scope.$watch(attrs.showFocus,
function (newValue) {
$timeout(function() {
newValue && element[0].focus();
});
},true);
};
})
.directive('match', function() {
return {
require: 'ngModel',