Commit 1bdae648a5110d6f262c8a92f4621960886da933

Authored by Nicolás Guarnieri
Exists in master

Merge branch 'master' into 'master'

selecciona texto cuando abre modal

See merge request !5
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"