Commit e6b4fff80c0f6ae94c10744e7ff6d93094e03f7b

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'master'

se selecciona precio condicion al selecionar cualquier lugar de la fila

See merge request modulos-npm/foca-modal-precio-condiciones!2
src/views/modal-precio-condicion.html
1 <div class="modal-header"> 1 <div class="modal-header">
2 <h3 class="modal-title">Busqueda de Precio-Condición</h3> 2 <h3 class="modal-title">Busqueda de Precio-Condición</h3>
3 </div> 3 </div>
4 <div class="modal-body" id="modal-body"> 4 <div class="modal-body" id="modal-body">
5 <div class="input-group mb-3"> 5 <div class="input-group mb-3">
6 <input 6 <input
7 type="text" 7 type="text"
8 class="form-control" 8 class="form-control"
9 placeholder="Busqueda" 9 placeholder="Busqueda"
10 ng-model="filters" 10 ng-model="filters"
11 ng-change="search()" 11 ng-change="search()"
12 ng-keydown="busquedaDown($event.keyCode)" 12 ng-keydown="busquedaDown($event.keyCode)"
13 ng-keypress="busquedaPress($event.keyCode)" 13 ng-keypress="busquedaPress($event.keyCode)"
14 foca-focus="selectedPrecioCondicion == -1" 14 foca-focus="selectedPrecioCondicion == -1"
15 ng-focus="selectedPrecioCondicion = -1" 15 ng-focus="selectedPrecioCondicion = -1"
16 > 16 >
17 <table class="table table-striped table-sm"> 17 <table class="table table-striped table-sm">
18 <thead> 18 <thead>
19 <tr> 19 <tr>
20 <th>Cod.</th> 20 <th>Cod.</th>
21 <th>Nombre</th> 21 <th>Nombre</th>
22 <th>Vigencia</th> 22 <th>Vigencia</th>
23 <th></th> 23 <th></th>
24 </tr> 24 </tr>
25 </thead> 25 </thead>
26 <tbody> 26 <tbody>
27 <tr ng-repeat="(key,precioCondicion) in currentPagePrecioCondicion"> 27 <tr class="selectable"
28 ng-repeat="(key, precioCondicion) in currentPagePrecioCondicion"
29 ng-click="select(precioCondicion)">
28 <td ng-bind="precioCondicion.codigo"></td> 30 <td ng-bind="precioCondicion.codigo"></td>
29 <td ng-bind="precioCondicion.nombre"></td> 31 <td ng-bind="precioCondicion.nombre"></td>
30 <td ng-bind="precioCondicion.vigencia"></td> 32 <td ng-bind="precioCondicion.vigencia"></td>
31 <td> 33 <td>
32 <button 34 <button
33 type="button" 35 type="button"
34 class="btn p-2 float-right" 36 class="btn p-2 float-right"
35 ng-class="{ 37 ng-class="{
36 'btn-secondary': selectedPrecioCondicion != key, 38 'btn-secondary': selectedPrecioCondicion != key,
37 'btn-primary': selectedPrecioCondicion == key 39 'btn-primary': selectedPrecioCondicion == key
38 }" 40 }"
39 ng-click="select(precioCondicion)"
40 foca-focus="selectedPrecioCondicion == {{key}}" 41 foca-focus="selectedPrecioCondicion == {{key}}"
41 ng-keydown="itemProducto($event.keyCode)" 42 ng-keydown="itemProducto($event.keyCode)"
42 > 43 >
43 <i class="fa fa-arrow-right" aria-hidden="true"></i> 44 <i class="fa fa-arrow-right" aria-hidden="true"></i>
44 </button> 45 </button>
45 </td> 46 </td>
46 </tr> 47 </tr>
47 </tbody> 48 </tbody>
48 </table> 49 </table>
49 <nav> 50 <nav>
50 <ul class="pagination justify-content-end"> 51 <ul class="pagination justify-content-end">
51 <li class="page-item" ng-class="{'disabled': currentPage == 1}"> 52 <li class="page-item" ng-class="{'disabled': currentPage == 1}">
52 <a class="page-link" href="#" ng-click="selectPage(currentPage - 1)"> 53 <a class="page-link" href="#" ng-click="selectPage(currentPage - 1)">
53 <span aria-hidden="true">&laquo;</span> 54 <span aria-hidden="true">&laquo;</span>
54 <span class="sr-only">Anterior</span> 55 <span class="sr-only">Anterior</span>
55 </a> 56 </a>
56 </li> 57 </li>
57 <li 58 <li
58 class="page-item" 59 class="page-item"
59 ng-repeat="pagina in paginas" 60 ng-repeat="pagina in paginas"
60 ng-class="{'active': pagina == currentPage}" 61 ng-class="{'active': pagina == currentPage}"
61 > 62 >
62 <a 63 <a
63 class="page-link" 64 class="page-link"
64 href="#" 65 href="#"
65 ng-click="selectPage(pagina)" 66 ng-click="selectPage(pagina)"
66 ng-bind="pagina" 67 ng-bind="pagina"
67 ></a> 68 ></a>
68 </li> 69 </li>
69 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> 70 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}">
70 <a class="page-link" href="#" ng-click="selectPage(currentPage + 1)"> 71 <a class="page-link" href="#" ng-click="selectPage(currentPage + 1)">
71 <span aria-hidden="true">&raquo;</span> 72 <span aria-hidden="true">&raquo;</span>
72 <span class="sr-only">Siguiente</span> 73 <span class="sr-only">Siguiente</span>
73 </a> 74 </a>
74 </li> 75 </li>
75 </ul> 76 </ul>
76 </nav> 77 </nav>
77 </div> 78 </div>
78 </div> 79 </div>
79 <div class="modal-footer"> 80 <div class="modal-footer">
80 <button class="btn btn-secondary" type="button" ng-click="cancel()">Cancelar</button> 81 <button class="btn btn-secondary" type="button" ng-click="cancel()">Cancelar</button>
81 </div> 82 </div>