Commit 48d305e969783d757e16c1f833f240c75c3dc02a

Authored by Pablo Marco del Pont
Exists in master

Merge branch 'master' into 'master'

Opción manual selección por teclado

See merge request modulos-npm/foca-modal-precio-condiciones!4
src/js/controller.js
... ... @@ -187,7 +187,7 @@ angular.module('focaModalPrecioCondicion')
187 187  
188 188 function siguiente() {
189 189 if ($scope.selectedPrecioCondicion <
190   - $scope.currentPagePrecioCondicion.length - 1 ) {
  190 + $scope.currentPagePrecioCondicion.length ) {
191 191 $scope.selectedPrecioCondicion++;
192 192 } else {
193 193 avanzarPagina();
src/views/modal-precio-condicion.html
... ... @@ -39,15 +39,30 @@
39 39 </td>
40 40 </tr>
41 41 <tr>
42   - <td colspan="6" ng-show="!ingreso">
  42 + <td colspan="4" ng-show="!ingreso">
43 43 <input
44   - class="form-control"
  44 + class="form-control form-control-sm"
45 45 type="text"
46   - placeholder="Ingreso manual"
  46 + placeholder="Selección manual"
47 47 readonly
48 48 ng-click="ingreso = !ingreso"
49 49 />
50 50 </td>
  51 + <td colspan="1" ng-show="!ingreso">
  52 + <button
  53 + type="button"
  54 + class="btn btn-sm p-1 float-right"
  55 + ng-class="{
  56 + 'btn-secondary': selectedPrecioCondicion != 0,
  57 + 'btn-primary': selectedPrecioCondicion == 0
  58 + }"
  59 + foca-focus="selectedPrecioCondicion == 0"
  60 + ng-keydown="itemProducto($event.keyCode)"
  61 + ng-click="ingreso = !ingreso"
  62 + >
  63 + <i class="fa fa-arrow-right" aria-hidden="true"></i>
  64 + </button>
  65 + </td>
51 66 </tr>
52 67 <tr class="selectable"
53 68 ng-repeat="(key, precioCondicion) in currentPagePrecioCondicion"
... ... @@ -61,10 +76,10 @@
61 76 type="button"
62 77 class="btn btn-sm p-1 float-right"
63 78 ng-class="{
64   - 'btn-secondary': selectedPrecioCondicion != key,
65   - 'btn-primary': selectedPrecioCondicion == key
  79 + 'btn-secondary': selectedPrecioCondicion != key + 1,
  80 + 'btn-primary': selectedPrecioCondicion == key + 1
66 81 }"
67   - foca-focus="selectedPrecioCondicion == {{key}}"
  82 + foca-focus="selectedPrecioCondicion == {{key + 1}}"
68 83 ng-keydown="itemProducto($event.keyCode)"
69 84 >
70 85 <i class="fa fa-arrow-right" aria-hidden="true"></i>