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