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