Commit 96b4db7dfabc9c7ab2479e83f40a5588b412912e
1 parent
199149c13b
Exists in
master
selectFocus cuando teclado esta desactivado
Showing
2 changed files
with
15 additions
and
2 deletions
Show diff stats
src/js/controller.js
| 1 | 1 | angular.module('focaCrearRemito') .controller('remitoController', |
| 2 | 2 | [ |
| 3 | 3 | '$scope', '$uibModal', '$location', '$filter', 'crearRemitoService', |
| 4 | - 'focaModalService', 'remitoBusinessService', | |
| 4 | + 'focaModalService', 'remitoBusinessService', '$rootScope', | |
| 5 | 5 | function( |
| 6 | 6 | $scope, $uibModal, $location, $filter, crearRemitoService, focaModalService, |
| 7 | - remitoBusinessService) | |
| 7 | + remitoBusinessService, $rootScope) | |
| 8 | 8 | { |
| 9 | 9 | $scope.botonera = [ |
| 10 | 10 | {texto: 'Nota Pedido', accion: function() { |
| ... | ... | @@ -796,8 +796,20 @@ angular.module('focaCrearRemito') .controller('remitoController', |
| 796 | 796 | $scope.articuloACargar = {}; |
| 797 | 797 | $scope.cargando = true; |
| 798 | 798 | }; |
| 799 | + //Recibe aviso si el teclado está en uso | |
| 800 | + $rootScope.$on('usarTeclado', function(event, data) { | |
| 801 | + if(data) { | |
| 802 | + $scope.mostrarTeclado = true; | |
| 803 | + return; | |
| 804 | + } | |
| 805 | + $scope.mostrarTeclado = false; | |
| 806 | + }); | |
| 799 | 807 | |
| 800 | 808 | $scope.selectFocus = function($event) { |
| 809 | + // Si el teclado esta en uso no selecciona el valor | |
| 810 | + if($scope.mostrarTeclado) { | |
| 811 | + return; | |
| 812 | + } | |
| 801 | 813 | $event.target.select(); |
| 802 | 814 | }; |
| 803 | 815 |