Commit abf50a674aa745882ee113af7cdf4b488da408d1
Exists in
master
Merge branch 'develop' of git.focasoftware.com: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 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">Búsqueda de Productos</h5> | 4 | <h5 class="modal-title my-1">Búsqueda 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" | 8 | ladda="searchLoading" | 
| 9 | type="text" | 9 | type="text" | 
| 10 | class="form-control form-control-sm" | 10 | class="form-control form-control-sm" | 
| 11 | id="search" | 11 | id="search" | 
| 12 | placeholder="Busqueda" | 12 | placeholder="Busqueda" | 
| 13 | ng-model="filters" | 13 | ng-model="filters" | 
| 14 | ng-change="search()" | 14 | ng-change="search()" | 
| 15 | ng-keydown="busquedaDown($event.keyCode)" | 15 | ng-keydown="busquedaDown($event.keyCode)" | 
| 16 | ng-keypress="busquedaPress($event.keyCode)" | 16 | ng-keypress="busquedaPress($event.keyCode)" | 
| 17 | foca-focus="selectedProducto == -1" | 17 | foca-focus="selectedProducto == -1" | 
| 18 | ng-focus="selectedProducto = -1" | 18 | ng-focus="selectedProducto = -1" | 
| 19 | teclado-virtual | 19 | teclado-virtual | 
| 20 | > | 20 | > | 
| 21 | <div class="input-group-append"> | 21 | <div class="input-group-append"> | 
| 22 | <button | 22 | <button | 
| 23 | ladda="searchLoading" | 23 | ladda="searchLoading" | 
| 24 | data-spinner-color="#FF0000" | 24 | data-spinner-color="#FF0000" | 
| 25 | class="btn btn-outline-secondary" | 25 | class="btn btn-outline-secondary" | 
| 26 | type="button" | 26 | type="button" | 
| 27 | title="Buscar" | 27 | title="Buscar" | 
| 28 | ng-click="busquedaPress(13)" | 28 | ng-click="busquedaPress(13)" | 
| 29 | > | 29 | > | 
| 30 | <i class="fa fa-search" aria-hidden="true"></i> | 30 | <i class="fa fa-search" aria-hidden="true"></i> | 
| 31 | </button> | 31 | </button> | 
| 32 | </div> | 32 | </div> | 
| 33 | </div> | 33 | </div> | 
| 34 | </div> | 34 | </div> | 
| 35 | </div> | 35 | </div> | 
| 36 | <div class="modal-body" id="modal-body"> | 36 | <div class="modal-body" id="modal-body"> | 
| 37 | 37 | ||
| 38 | <div ng-show="!primerBusqueda"> | 38 | <div ng-show="!primerBusqueda"> | 
| 39 | Debe realizar una primer búsqueda. | 39 | Debe realizar una primer búsqueda. | 
| 40 | </div> | 40 | </div> | 
| 41 | 41 | ||
| 42 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> | 42 | <table ng-show="primerBusqueda" class="table table-striped table-sm"> | 
| 43 | <thead> | 43 | <thead> | 
| 44 | <tr> | 44 | <tr> | 
| 45 | <th ng-hide="soloMostrar">Código</th> | 45 | <th ng-hide="soloMostrar">Código</th> | 
| 46 | <th>Descripción</th> | 46 | <th>Descripción</th> | 
| 47 | <th class="text-right">P. Base</th> | 47 | <th class="text-right">P. Base</th> | 
| 48 | <th ng-hide="soloMostrar"></th> | 48 | <th ng-hide="soloMostrar"></th> | 
| 49 | </tr> | 49 | </tr> | 
| 50 | </thead> | 50 | </thead> | 
| 51 | <tbody> | 51 | <tbody> | 
| 52 | <tr ng-show="currentPageProductos.length == 0 && primerBusqueda"> | 52 | <tr ng-show="currentPageProductos.length == 0 && primerBusqueda"> | 
| 53 | <td colspan="5"> | 53 | <td colspan="5"> | 
| 54 | No se encontraron resultados. | 54 | No se encontraron resultados. | 
| 55 | </td> | 55 | </td> | 
| 56 | </tr> | 56 | </tr> | 
| 57 | <tr class="selectable" | 57 | <tr class="selectable" | 
| 58 | ng-repeat="(key,producto) in currentPageProductos" | 58 | ng-repeat="(key,producto) in currentPageProductos" | 
| 59 | ng-click="select(producto)"> | 59 | ng-click="select(producto)"> | 
| 60 | <td ng-bind="producto.sector + '-' + producto.codigo" | 60 | <td ng-bind="producto.sector + '-' + producto.codigo" | 
| 61 | ng-hide="soloMostrar"></td> | 61 | ng-hide="soloMostrar"></td> | 
| 62 | <td ng-bind="producto.descripcion"></td> | 62 | <td ng-bind="producto.descripcion"></td> | 
| 63 | <td class="text-right" ng-bind="producto.precio | number: 2"></td> | 63 | <td class="text-right" ng-bind="producto.precio | number: 2"></td> | 
| 64 | <td class="d-md-none text-primary"> | 64 | <td class="d-md-none text-primary"> | 
| 65 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 65 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 
| 66 | </td> | 66 | </td> | 
| 67 | <td class="d-none d-md-table-cell"> | 67 | <td class="d-none d-md-table-cell"> | 
| 68 | <button | 68 | <button | 
| 69 | type="button" | 69 | type="button" | 
| 70 | class="btn btn-xs p-1 float-right" | 70 | class="btn btn-xs p-1 float-right" | 
| 71 | title="Seleccionar" | 71 | title="Seleccionar" | 
| 72 | ng-class="{ | 72 | ng-class="{ | 
| 73 | 'btn-secondary': selectedProducto != key, | 73 | 'btn-secondary': selectedProducto != key, | 
| 74 | 'btn-primary': selectedProducto == key | 74 | 'btn-primary': selectedProducto == key | 
| 75 | }" | 75 | }" | 
| 76 | foca-focus="selectedProducto == {{key}}" | 76 | foca-focus="selectedProducto == {{key}}" | 
| 77 | ng-keydown="itemProducto($event.keyCode)" | 77 | ng-keydown="itemProducto($event.keyCode)" | 
| 78 | ng-hide="soloMostrar"> | 78 | ng-hide="soloMostrar"> | 
| 79 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 79 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 
| 80 | </button> | 80 | </button> | 
| 81 | </td> | 81 | </td> | 
| 82 | </tr> | 82 | </tr> | 
| 83 | </tbody> | 83 | </tbody> | 
| 84 | </table> | 84 | </table> | 
| 85 | 85 | ||
| 86 | </div> | 86 | </div> | 
| 87 | <div class="modal-footer py-1"> | 87 | <div class="modal-footer py-1"> | 
| 88 | <nav ng-show="currentPageProductos.length > 0 && primerBusqueda" class="mr-auto"> | 88 | <nav ng-show="currentPageProductos.length > 0 && primerBusqueda" class="mr-auto"> | 
| 89 | <ul class="pagination pagination-sm justify-content mb-0"> | 89 | <ul class="pagination pagination-sm justify-content mb-0"> | 
| 90 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 90 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 
| 91 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 91 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 
| 92 | <span aria-hidden="true">«</span> | 92 | <span aria-hidden="true">«</span> | 
| 93 | <span class="sr-only">Anterior</span> | 93 | <span class="sr-only">Anterior</span> | 
| 94 | </a> | 94 | </a> | 
| 95 | </li> | 95 | </li> | 
| 96 | <li | 96 | <li | 
| 97 | class="page-item" | 97 | class="page-item" | 
| 98 | ng-repeat="pagina in paginas" | 98 | ng-repeat="pagina in paginas" | 
| 99 | ng-class="{'active': pagina == currentPage}" | 99 | ng-class="{'active': pagina == currentPage}" | 
| 100 | > | 100 | > | 
| 101 | <a | 101 | <a | 
| 102 | class="page-link" | 102 | class="page-link" | 
| 103 | href="javascript:void();" | 103 | href="javascript:void();" | 
| 104 | ng-click="selectPage(pagina)" | 104 | ng-click="selectPage(pagina)" | 
| 105 | ng-bind="pagina" | 105 | ng-bind="pagina" | 
| 106 | ></a> | 106 | ></a> | 
| 107 | </li> | 107 | </li> | 
| 108 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 108 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 
| 109 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 109 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> | 
| 110 | <span aria-hidden="true">»</span> | 110 | <span aria-hidden="true">»</span> | 
| 111 | <span class="sr-only">Siguiente</span> | 111 | <span class="sr-only">Siguiente</span> | 
| 112 | </a> | 112 | </a> | 
| 113 | </li> | 113 | </li> | 
| 114 | </ul> | 114 | </ul> | 
| 115 | </nav> | 115 | </nav> | 
| 116 | <button class="btn btn-sm btn-secondary my-1" type="button" ng-click="cancel()">Cancelar</button> | 116 | <button class="btn btn-sm btn-secondary my-1" type="button" ng-click="cancel()">Volver</button> | 
| 117 | </div> | 117 | </div> | 
| 118 | 118 |