Commit d7ef6cf02930a60f15987ea065d9e9d8723e4439
Exists in
master
and in
1 other branch
Merge branch 'master' of https://debo.suite.repo/modulos-npm/foca-modal-busqueda-productos
Showing
1 changed file
Show diff stats
src/views/modal-busqueda-productos.html
1 | <div class="modal-header py-1"> | 1 | <div class="modal-header"> |
2 | <h5 class="modal-title">Busqueda de Productos</h5> | 2 | <h5 class="modal-title my-1">Busqueda de Productos</h5> |
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"> | 5 | <div class="input-group"> |
6 | <input | 6 | <input |
7 | ladda="searchLoading" | 7 | ladda="searchLoading" |
8 | type="text" | 8 | type="text" |
9 | class="form-control" | 9 | class="form-control" |
10 | placeholder="Busqueda" | 10 | placeholder="Busqueda" |
11 | ng-model="filters" | 11 | ng-model="filters" |
12 | ng-change="search()" | 12 | ng-change="search()" |
13 | ng-keydown="busquedaDown($event.keyCode)" | 13 | ng-keydown="busquedaDown($event.keyCode)" |
14 | ng-keypress="busquedaPress($event.keyCode)" | 14 | ng-keypress="busquedaPress($event.keyCode)" |
15 | foca-focus="selectedProducto == -1" | 15 | foca-focus="selectedProducto == -1" |
16 | ng-focus="selectedProducto = -1" | 16 | ng-focus="selectedProducto = -1" |
17 | teclado-virtual | 17 | teclado-virtual |
18 | > | 18 | > |
19 | <div class="input-group-append"> | 19 | <div class="input-group-append"> |
20 | <button | 20 | <button |
21 | ladda="searchLoading" | 21 | ladda="searchLoading" |
22 | class="btn btn-outline-secondary" | 22 | class="btn btn-outline-secondary" |
23 | type="button" | 23 | type="button" |
24 | ng-click="busquedaPress(13)" | 24 | ng-click="busquedaPress(13)" |
25 | > | 25 | > |
26 | <i class="fa fa-search" aria-hidden="true"></i> | 26 | <i class="fa fa-search" aria-hidden="true"></i> |
27 | </button> | 27 | </button> |
28 | </div> | 28 | </div> |
29 | </div> | 29 | </div> |
30 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> | 30 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> |
31 | <thead> | 31 | <thead> |
32 | <tr> | 32 | <tr> |
33 | <th>Sec.</th> | ||
34 | <th>Cod.</th> | 33 | <th>Código</th> |
35 | <th>Descripción</th> | 34 | <th>Descripción</th> |
36 | <th>P. Base</th> | 35 | <th class="text-right">P. Base</th> |
37 | <th></th> | 36 | <th></th> |
38 | </tr> | 37 | </tr> |
39 | </thead> | 38 | </thead> |
40 | <tbody> | 39 | <tbody> |
41 | <tr ng-show="currentPageProductos.length == 0 && primerBusqueda"> | 40 | <tr ng-show="currentPageProductos.length == 0 && primerBusqueda"> |
42 | <td colspan="5"> | 41 | <td colspan="5"> |
43 | No se encontraron resultados. | 42 | No se encontraron resultados. |
44 | </td> | 43 | </td> |
45 | </tr> | 44 | </tr> |
46 | <tr class="selectable" | 45 | <tr class="selectable" |
47 | ng-repeat="(key,producto) in currentPageProductos" | 46 | ng-repeat="(key,producto) in currentPageProductos" |
48 | ng-click="select(producto)"> | 47 | ng-click="select(producto)"> |
49 | <td ng-bind="producto.sector"></td> | ||
50 | <td ng-bind="producto.codigo"></td> | 48 | <td ng-bind="producto.sector + '-' + producto.codigo"></td> |
51 | <td ng-bind="producto.descripcion"></td> | 49 | <td ng-bind="producto.descripcion"></td> |
52 | <td ng-bind="producto.precio | currency: simbolo : 4"></td> | 50 | <td class="text-right" ng-bind="producto.precio | currency: simbolo : 4"></td> |
51 | <td class="d-md-none text-primary"> | ||
52 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | ||
53 | </td> | ||
53 | <td> | 54 | <td class="d-none d-md-table-cell"> |
54 | <button | 55 | <button |
55 | type="button" | 56 | type="button" |
56 | class="btn btn-xs p-1 float-right" | 57 | class="btn btn-xs p-1 float-right" |
57 | ng-class="{ | 58 | ng-class="{ |
58 | 'btn-secondary': selectedProducto != key, | 59 | 'btn-secondary': selectedProducto != key, |
59 | 'btn-primary': selectedProducto == key | 60 | 'btn-primary': selectedProducto == key |
60 | }" | 61 | }" |
61 | foca-focus="selectedProducto == {{key}}" | 62 | foca-focus="selectedProducto == {{key}}" |
62 | ng-keydown="itemProducto($event.keyCode)" | ||
63 | > | 63 | ng-keydown="itemProducto($event.keyCode)"> |
64 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | 64 | <i class="fa fa-arrow-right" aria-hidden="true"></i> |
65 | </button> | 65 | </button> |
66 | </td> | 66 | </td> |
67 | </tr> | 67 | </tr> |
68 | </tbody> | 68 | </tbody> |
69 | </table> | 69 | </table> |
70 | <nav ng-show="currentPageProductos.length > 0 && primerBusqueda"> | 70 | <nav ng-show="currentPageProductos.length > 0 && primerBusqueda"> |
71 | <ul class="pagination pagination-sm justify-content mb-0"> | 71 | <ul class="pagination pagination-sm justify-content mb-0"> |
72 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 72 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
73 | <a class="page-link" href="#" ng-click="selectPage(currentPage - 1)"> | 73 | <a class="page-link" href="#" ng-click="selectPage(currentPage - 1)"> |
74 | <span aria-hidden="true">«</span> | 74 | <span aria-hidden="true">«</span> |
75 | <span class="sr-only">Anterior</span> | 75 | <span class="sr-only">Anterior</span> |
76 | </a> | 76 | </a> |
77 | </li> | 77 | </li> |
78 | <li | 78 | <li |
79 | class="page-item" | 79 | class="page-item" |
80 | ng-repeat="pagina in paginas" | 80 | ng-repeat="pagina in paginas" |
81 | ng-class="{'active': pagina == currentPage}" | 81 | ng-class="{'active': pagina == currentPage}" |
82 | > | 82 | > |
83 | <a | 83 | <a |
84 | class="page-link" | 84 | class="page-link" |
85 | href="#" | 85 | href="#" |
86 | ng-click="selectPage(pagina)" | 86 | ng-click="selectPage(pagina)" |
87 | ng-bind="pagina" | 87 | ng-bind="pagina" |
88 | ></a> | 88 | ></a> |
89 | </li> | 89 | </li> |
90 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 90 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
91 | <a class="page-link" href="#" ng-click="selectPage(currentPage + 1)"> | 91 | <a class="page-link" href="#" ng-click="selectPage(currentPage + 1)"> |
92 | <span aria-hidden="true">»</span> | 92 | <span aria-hidden="true">»</span> |
93 | <span class="sr-only">Siguiente</span> | 93 | <span class="sr-only">Siguiente</span> |
94 | </a> | 94 | </a> |
95 | </li> | 95 | </li> |
96 | </ul> | 96 | </ul> |
97 | </nav> | 97 | </nav> |
98 | </div> | 98 | </div> |
99 | <div class="modal-footer py-1"> | 99 | <div class="modal-footer"> |