Commit 604e89ec8a035d27d6baac2660a7bd10b8ad72b4

Authored by Jose Pinto
1 parent fbe64cc5fb
Exists in master

selecciona texto cuando abre modal

src/js/controller.js
... ... @@ -4,9 +4,13 @@ angular.module('focaModalEfectivo')
4 4 '$scope',
5 5 '$uibModalInstance',
6 6 'sugerido',
7   - function($scope, $uibModalInstance, sugerido) {
  7 + '$timeout',
  8 + function($scope, $uibModalInstance, sugerido, $timeout) {
8 9 if(sugerido && sugerido < 0) {
9 10 $scope.efectivo = Math.abs(sugerido);
  11 + $timeout(function() {
  12 + angular.element('#importe')[0].select();
  13 + });
10 14 }
11 15 $scope.aceptar = function(key) {
12 16 if(key === 13 && parseFloat($scope.efectivo)) {
src/views/modal-efectivo.html
... ... @@ -10,6 +10,7 @@
10 10 <input
11 11 teclado-virtual
12 12 foca-tipo-input
  13 + id="importe"
13 14 ng-model="efectivo"
14 15 foca-focus="true"
15 16 class="form-control form-control-sm"