Commit 06ada3c57fbfcb7255deb5f72d15315b793d0db7
Exists in
master
Merge branch 'master' into 'develop'
Master(mpuebla) See merge request !38
Showing
3 changed files
Show diff stats
package.json
... | ... | @@ -4,6 +4,7 @@ |
4 | 4 | "description": "Búsqueda de clientes", |
5 | 5 | "main": "dist/foca-busqueda-cliente.min.js", |
6 | 6 | "scripts": { |
7 | + "refresh": "gulp uglify && cp tmp/foca-busqueda-cliente.js ../wrapper-demo/node_modules/foca-busqueda-cliente/dist/foca-busqueda-cliente.min.js", | |
7 | 8 | "test": "echo \"Error: no test specified\" && exit 1", |
8 | 9 | "gulp-pre-commit": "gulp pre-commit", |
9 | 10 | "compile": "gulp uglify", |
src/js/controller.js
1 | 1 | angular.module('focaBusquedaCliente') |
2 | 2 | .controller('focaBusquedaClienteModalController', [ |
3 | 3 | '$uibModalInstance', 'focaBusquedaClienteService', '$scope', '$filter', |
4 | - '$uibModal', 'focaModalService', '$timeout', 'vendedor', 'cobrador', | |
4 | + '$uibModal', 'focaModalService', '$timeout', '$rootScope', 'vendedor', 'cobrador', | |
5 | 5 | function ($uibModalInstance, focaBusquedaClienteService, $scope, $filter, |
6 | - $uibModal, focaModalService, $timeout, vendedor, cobrador) { | |
6 | + $uibModal, focaModalService, $timeout, $rootScope, vendedor, cobrador) { | |
7 | 7 | |
8 | 8 | $scope.cobrador = cobrador ? cobrador : {}; |
9 | 9 | $scope.vendedor = vendedor ? vendedor : {}; |
... | ... | @@ -210,6 +210,23 @@ angular.module('focaBusquedaCliente') |
210 | 210 | $scope.focused = val; |
211 | 211 | }; |
212 | 212 | |
213 | + //Recibe aviso si el teclado está en uso | |
214 | + $rootScope.$on('usarTeclado', function (event, data) { | |
215 | + if (data) { | |
216 | + $scope.mostrarTeclado = true; | |
217 | + return; | |
218 | + } | |
219 | + $scope.mostrarTeclado = false; | |
220 | + }); | |
221 | + | |
222 | + $scope.selectFocus = function ($event) { | |
223 | + // Si el teclado esta en uso no selecciona el valor | |
224 | + if ($scope.mostrarTeclado) { | |
225 | + return; | |
226 | + } | |
227 | + $event.target.select(); | |
228 | + }; | |
229 | + | |
213 | 230 | $scope.next = function (key) { |
214 | 231 | if (key === 13) $scope.focused++; |
215 | 232 | }; |
src/views/foca-busqueda-cliente-modal.html
... | ... | @@ -166,7 +166,7 @@ |
166 | 166 | ng-model="cliente.CPO" |
167 | 167 | placeholder="Ingrese CP" |
168 | 168 | ng-required="true" |
169 | - ng-focus="focus(3)" | |
169 | + ng-focus="focus(3); selectFocus($event);" | |
170 | 170 | foca-focus="focused == 3" |
171 | 171 | ng-keypress="next($event.keyCode)" |
172 | 172 | teclado-virtual |
... | ... | @@ -386,17 +386,17 @@ |
386 | 386 | </div> |
387 | 387 | </div> |
388 | 388 | <div class="col-md-6 col-12 mt-2"> |
389 | - <label>Telefono</label> | |
389 | + <label>Teléfono</label> | |
390 | 390 | <div class="input-group"> |
391 | 391 | <input |
392 | 392 | foca-tipo-input |
393 | 393 | limite-numeros-max="20" |
394 | 394 | class="form-control form-control-sm" |
395 | - placeholder="Ingrese Telefono" | |
395 | + placeholder="Ingrese Teléfono" | |
396 | 396 | ng-model="cliente.TEL" |
397 | 397 | ng-required="true" |
398 | 398 | ng-keypress="next($event.keyCode)" |
399 | - ng-focus="focus(11)" | |
399 | + ng-focus="focus(11); selectFocus($event);" | |
400 | 400 | foca-focus="focused == 11" |
401 | 401 | teclado-virtual> |
402 | 402 | </div> |
... | ... | @@ -494,7 +494,7 @@ |
494 | 494 | ng-model="cliente.cuit1" |
495 | 495 | ng-required="true" |
496 | 496 | ng-keypress="pasarCampoCuit(1)" |
497 | - ng-focus="focus(14)" | |
497 | + ng-focus="focus(14); selectFocus($event);" | |
498 | 498 | foca-focus="focused == 14" |
499 | 499 | teclado-virtual |
500 | 500 | foca-tipo-input |
... | ... | @@ -508,7 +508,7 @@ |
508 | 508 | ng-keypress="pasarCampoCuit(2)" |
509 | 509 | ng-model="cliente.cuit2" |
510 | 510 | ng-required="true" |
511 | - ng-focus="focus(15)" | |
511 | + ng-focus="focus(15); selectFocus($event);" | |
512 | 512 | foca-focus="cuitActivo == 2 || focused == 15" |
513 | 513 | teclado-virtual |
514 | 514 | foca-tipo-input |
... | ... | @@ -522,7 +522,7 @@ |
522 | 522 | ng-keypress="pasarCampoCuit(3)" |
523 | 523 | ng-model="cliente.cuit3" |
524 | 524 | ng-required="true" |
525 | - ng-focus="focus(16)" | |
525 | + ng-focus="focus(16); selectValue($event)" | |
526 | 526 | foca-focus="cuitActivo == 3 || focused == 16" |
527 | 527 | teclado-virtual |
528 | 528 | foca-tipo-input |