Commit 60d60eac9c885d897b4641063769608a45eb66fb
1 parent
c21de4e1ce
Exists in
master
and in
1 other branch
cambio inputs a numbers porque hice andar el teclado para numeros
Showing
2 changed files
with
24 additions
and
10 deletions
Show diff stats
src/js/controller.js
| 1 | 1 | angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 2 | 2 | [ |
| 3 | 3 | '$scope', '$uibModal', '$location', '$filter', 'crearNotaPedidoService', |
| 4 | - 'focaModalService', 'focaSeguimientoService', 'notaPedidoBusinessService', | |
| 4 | + 'focaModalService', 'focaSeguimientoService', 'notaPedidoBusinessService', '$rootScope', | |
| 5 | 5 | function( |
| 6 | 6 | $scope, $uibModal, $location, $filter, crearNotaPedidoService, focaModalService, |
| 7 | - focaSeguimientoService, notaPedidoBusinessService | |
| 7 | + focaSeguimientoService, notaPedidoBusinessService, $rootScope | |
| 8 | 8 | ) { |
| 9 | 9 | $scope.botonera = [ |
| 10 | 10 | {texto: 'Vendedor', accion: function() {$scope.seleccionarVendedor();}}, |
| ... | ... | @@ -571,8 +571,19 @@ angular.module('focaCrearNotaPedido') .controller('notaPedidoCtrl', |
| 571 | 571 | $scope.articuloACargar = {}; |
| 572 | 572 | $scope.cargando = true; |
| 573 | 573 | }; |
| 574 | - | |
| 574 | + //Recibe aviso si el teclado está en uso | |
| 575 | + // $rootScope.$on('usarTeclado', function(event, data) { | |
| 576 | + // if(data) { | |
| 577 | + // $scope.mostrarTeclado = true; | |
| 578 | + // return; | |
| 579 | + // } | |
| 580 | + // $scope.mostrarTeclado = false; | |
| 581 | + // }) | |
| 575 | 582 | $scope.selectFocus = function($event) { |
| 583 | + //Si el teclado esta en uso no selecciona el valor | |
| 584 | + // if($scope.mostrarTeclado) { | |
| 585 | + // return; | |
| 586 | + // } | |
| 576 | 587 | $event.target.select(); |
| 577 | 588 | }; |
| 578 | 589 |
src/views/nota-pedido.html
| ... | ... | @@ -133,11 +133,11 @@ |
| 133 | 133 | ng-show="articulo.editCantidad" |
| 134 | 134 | ng-model="articulo.cantidad" |
| 135 | 135 | class="form-control" |
| 136 | - type="text" | |
| 136 | + type="number" | |
| 137 | + min="1" | |
| 137 | 138 | foca-focus="articulo.editCantidad" |
| 138 | 139 | ng-keypress="editarArticulo($event.keyCode, articulo)" |
| 139 | 140 | ng-focus="selectFocus($event)" |
| 140 | - ng-blur="parsearATexto(articulo)" | |
| 141 | 141 | teclado-virtual |
| 142 | 142 | > |
| 143 | 143 | <i |
| ... | ... | @@ -152,11 +152,12 @@ |
| 152 | 152 | ng-show="articulo.editPrecio" |
| 153 | 153 | ng-model="articulo.precio" |
| 154 | 154 | class="form-control" |
| 155 | - type="text" | |
| 155 | + type="number" | |
| 156 | + min="0" | |
| 157 | + step="0.0001" | |
| 156 | 158 | foca-focus="articulo.editPrecio" |
| 157 | 159 | ng-keypress="editarArticulo($event.keyCode, articulo)" |
| 158 | 160 | ng-focus="selectFocus($event)" |
| 159 | - ng-blur="parsearATexto(articulo)" | |
| 160 | 161 | teclado-virtual |
| 161 | 162 | > |
| 162 | 163 | <i |
| ... | ... | @@ -203,7 +204,8 @@ |
| 203 | 204 | <td class="col text-right"> |
| 204 | 205 | <input |
| 205 | 206 | class="form-control" |
| 206 | - type="text" | |
| 207 | + type="number" | |
| 208 | + min="1" | |
| 207 | 209 | ng-model="articuloACargar.cantidad" |
| 208 | 210 | foca-focus="!cargando" |
| 209 | 211 | esc-key="resetFilter()" |
| ... | ... | @@ -221,12 +223,13 @@ |
| 221 | 223 | > |
| 222 | 224 | <input |
| 223 | 225 | class="form-control" |
| 224 | - type="text" | |
| 226 | + type="number" | |
| 227 | + min="0" | |
| 228 | + step="0.0001" | |
| 225 | 229 | ng-model="articuloACargar.precio" |
| 226 | 230 | esc-key="resetFilter()" |
| 227 | 231 | ng-keypress="agregarATabla($event.keyCode)" |
| 228 | 232 | ng-show="idLista == -1" |
| 229 | - ng-blur="parsearATexto(articuloACargar)" | |
| 230 | 233 | teclado-virtual |
| 231 | 234 | > |
| 232 | 235 | </td> |