Commit e57c9aee2b82bc91f95b5f909a059a58f7b1d182
Exists in
master
Merge branch 'master' into 'master'
muestro código de vehículo See merge request modulos-npm/foca-modal-vehiculo!2
Showing
1 changed file
Show diff stats
src/views/modal-vehiculo.html
1 | <div class="modal-header py-1"> | 1 | <div class="modal-header py-1"> |
2 | <h5 class="modal-title">Busqueda de Vehiculo</h5> | 2 | <h5 class="modal-title">Busqueda de Vehiculo</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="selectedVehiculo == -1" | 15 | foca-focus="selectedVehiculo == -1" |
16 | ng-focus="selectedVehiculo = -1" | 16 | ng-focus="selectedVehiculo = -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>Cod</th> | ||
32 | <th>Tractor</th> | 33 | <th>Tractor</th> |
33 | <th>Semi</th> | 34 | <th>Semi</th> |
34 | <th>Capacidad</th> | 35 | <th>Capacidad</th> |
35 | <th>Cisternado</th> | 36 | <th>Cisternado</th> |
36 | </tr> | 37 | </tr> |
37 | </thead> | 38 | </thead> |
38 | <tbody> | 39 | <tbody> |
39 | <tr ng-show="currentPageVehiculos.length == 0 && primerBusqueda"> | 40 | <tr ng-show="currentPageVehiculos.length == 0 && primerBusqueda"> |
40 | <td colspan="5"> | 41 | <td colspan="5"> |
41 | No se encontraron resultados. | 42 | No se encontraron resultados. |
42 | </td> | 43 | </td> |
43 | </tr> | 44 | </tr> |
44 | <tr class="selectable" | 45 | <tr class="selectable" |
45 | ng-repeat="(key,vehiculo) in currentPageVehiculos" | 46 | ng-repeat="(key,vehiculo) in currentPageVehiculos" |
46 | ng-click="select(vehiculo)"> | 47 | ng-click="select(vehiculo)"> |
48 | <td ng-bind="vehiculo.id"></td> | ||
47 | <td ng-bind="vehiculo.tractor"></td> | 49 | <td ng-bind="vehiculo.tractor"></td> |
48 | <td ng-bind="vehiculo.semi"></td> | 50 | <td ng-bind="vehiculo.semi"></td> |
49 | <td ng-bind="vehiculo.capacidad"></td> | 51 | <td ng-bind="vehiculo.capacidad"></td> |
50 | <td ng-bind="vehiculo.cisternado"></td> | 52 | <td ng-bind="vehiculo.cisternado"></td> |
51 | <td> | 53 | <td> |
52 | <button | 54 | <button |
53 | type="button" | 55 | type="button" |
54 | class="btn btn-xs p-1 float-right" | 56 | class="btn btn-xs p-1 float-right" |
55 | ng-class="{ | 57 | ng-class="{ |
56 | 'btn-secondary': selectedVehiculo != key, | 58 | 'btn-secondary': selectedVehiculo != key, |
57 | 'btn-primary': selectedVehiculo == key | 59 | 'btn-primary': selectedVehiculo == key |
58 | }" | 60 | }" |
59 | foca-focus="selectedVehiculo == {{key}}" | 61 | foca-focus="selectedVehiculo == {{key}}" |
60 | ng-keydown="itemVehiculo($event.keyCode)" | 62 | ng-keydown="itemVehiculo($event.keyCode)" |
61 | > | 63 | > |
62 | <i class="fa fa-arrow-right" aria-hidden="true"></i> | 64 | <i class="fa fa-arrow-right" aria-hidden="true"></i> |
63 | </button> | 65 | </button> |
64 | </td> | 66 | </td> |
65 | </tr> | 67 | </tr> |
66 | </tbody> | 68 | </tbody> |
67 | </table> | 69 | </table> |
68 | <nav ng-show="currentPageVehiculos.length > 0 && primerBusqueda"> | 70 | <nav ng-show="currentPageVehiculos.length > 0 && primerBusqueda"> |
69 | <ul class="pagination pagination-sm justify-content mb-0"> | 71 | <ul class="pagination pagination-sm justify-content mb-0"> |
70 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> | 72 | <li class="page-item" ng-class="{'disabled': currentPage == 1}"> |
71 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> | 73 | <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> |
72 | <span aria-hidden="true">«</span> | 74 | <span aria-hidden="true">«</span> |
73 | <span class="sr-only">Anterior</span> | 75 | <span class="sr-only">Anterior</span> |
74 | </a> | 76 | </a> |
75 | </li> | 77 | </li> |
76 | <li | 78 | <li |
77 | class="page-item" | 79 | class="page-item" |
78 | ng-repeat="pagina in paginas" | 80 | ng-repeat="pagina in paginas" |
79 | ng-class="{'active': pagina == currentPage}" | 81 | ng-class="{'active': pagina == currentPage}" |
80 | > | 82 | > |
81 | <a | 83 | <a |
82 | class="page-link" | 84 | class="page-link" |
83 | href="javascript:void();" | 85 | href="javascript:void();" |
84 | ng-click="selectPage(pagina)" | 86 | ng-click="selectPage(pagina)" |
85 | ng-bind="pagina" | 87 | ng-bind="pagina" |
86 | ></a> | 88 | ></a> |
87 | </li> | 89 | </li> |
88 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> | 90 | <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> |
89 | <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)"> |
90 | <span aria-hidden="true">»</span> | 92 | <span aria-hidden="true">»</span> |
91 | <span class="sr-only">Siguiente</span> | 93 | <span class="sr-only">Siguiente</span> |
92 | </a> | 94 | </a> |
93 | </li> | 95 | </li> |
94 | </ul> | 96 | </ul> |
95 | </nav> | 97 | </nav> |
96 | </div> | 98 | </div> |
97 | <div class="modal-footer py-1"> | 99 | <div class="modal-footer py-1"> |
98 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> | 100 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> |
99 | </div> | 101 | </div> |
100 | 102 |