Commit 82ab6cfc90f1759f7140f7daf7367b30e52b1b07

Authored by Jose Pinto
1 parent f235f0936a
Exists in master and in 1 other branch develop

titles y funcion select en toda la fila

Showing 1 changed file with 19 additions and 20 deletions   Show diff stats
src/views/modal-domicilio.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" ng-hide="ingreso">Búsqueda de Domicilios</h5> 4 <h5 class="modal-title my-1" ng-hide="ingreso">Búsqueda de Domicilios</h5>
5 <h5 class="modal-title my-1" ng-show="ingreso">Crear domicilio</h5> 5 <h5 class="modal-title my-1" ng-show="ingreso">Crear domicilio</h5>
6 </div> 6 </div>
7 <div class="input-group col-lg-6 pr-0 my-2"> 7 <div class="input-group col-lg-6 pr-0 my-2">
8 <input 8 <input
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="Búsqueda" 12 placeholder="Búsqueda"
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="selectedDomicilio == -1" 17 foca-focus="selectedDomicilio == -1"
18 ng-focus="selectedDomicilio = -1" 18 ng-focus="selectedDomicilio = -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 class="btn btn-outline-secondary" 24 class="btn btn-outline-secondary"
25 type="button" 25 type="button"
26 ng-click="busquedaPress(13)" 26 ng-click="busquedaPress(13)"
27 > 27 >
28 <i class="fa fa-search" aria-hidden="true"></i> 28 <i class="fa fa-search" aria-hidden="true"></i>
29 </button> 29 </button>
30 </div> 30 </div>
31 </div> 31 </div>
32 </div> 32 </div>
33 </div> 33 </div>
34 <div class="modal-body" id="modal-body"> 34 <div class="modal-body" id="modal-body">
35 35
36 <div ng-show="!primerBusqueda"> 36 <div ng-show="!primerBusqueda">
37 Debe realizar una primer búsqueda. 37 Debe realizar una primer búsqueda.
38 </div> 38 </div>
39 39
40 <div ng-show="!ingreso"> 40 <div ng-show="!ingreso">
41 <table ng-show="!ingreso" class="table table-striped table-sm"> 41 <table ng-show="!ingreso" class="table table-striped table-sm">
42 <thead> 42 <thead>
43 <tr> 43 <tr>
44 <th>Titulo</th> 44 <th>Titulo</th>
45 <th>Calle</th> 45 <th>Calle</th>
46 <th>Localidad</th> 46 <th>Localidad</th>
47 <th>Provincia</th> 47 <th>Provincia</th>
48 <th></th> 48 <th></th>
49 <th></th> 49 <th></th>
50 </tr> 50 </tr>
51 </thead> 51 </thead>
52 <tbody> 52 <tbody>
53 <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda"> 53 <tr ng-show="currentPageDomicilios.length == 0 && primerBusqueda">
54 <td colspan="5"> 54 <td colspan="5">
55 No se encontraron resultados. 55 No se encontraron resultados.
56 </td> 56 </td>
57 </tr> 57 </tr>
58 <tr> 58 <tr>
59 <td colspan="4" ng-show="!ingreso"> 59 <td colspan="6" ng-show="!ingreso">
60 <input 60 <input
61 class="form-control form-control-sm" 61 class="form-control form-control-sm"
62 type="text" 62 type="text"
63 placeholder="Nuevo domicilio" 63 placeholder="Nuevo domicilio"
64 readonly 64 readonly
65 ng-click="ingreso = !ingreso" 65 ng-click="ingreso = !ingreso"
66 /> 66 />
67 </td> 67 </td>
68 <td colspan="1" ng-show="!ingreso">
69 <button
70 type="button"
71 class="btn btn-sm p-1 float-right"
72 ng-class="{
73 'btn-secondary': selectedDomicilio != 0,
74 'btn-primary': selectedDomicilio == 0
75 }"
76 foca-focus="selectedDomicilio == 0"
77 ng-keydown="itemDomicilio($event.keyCode)"
78 ng-click="ingreso = !ingreso"
79 >
80 <i class="fa fa-circle-thin" aria-hidden="true"></i>
81 </button>
82 </td>
83 </tr> 68 </tr>
84 <tr class="selectable" 69 <tr class="selectable"
85 ng-repeat="(key,domicilio) in currentPageDomicilios"> 70 ng-repeat="(key,domicilio) in currentPageDomicilios">
86 <td ng-bind="domicilio.titulo"></td> 71 <td
87 <td ng-bind="domicilio.Calle + ' ' + domicilio.Numero"></td> 72 ng-bind="domicilio.titulo"
88 <td ng-bind="domicilio.Localidad"></td> 73 ng-click="select(domicilio)"
89 <td ng-bind="domicilio.Provincia"></td> 74 ></td>
75 <td
76 ng-bind="domicilio.Calle + ' ' + domicilio.Numero"
77 ng-click="select(domicilio)"
78 ></td>
79 <td
80 ng-bind="domicilio.Localidad"
81 ng-click="select(domicilio)"
82 ></td>
83 <td
84 ng-bind="domicilio.Provincia"
85 ng-click="select(domicilio)"
86 ></td>
90 <td> 87 <td>
91 <button 88 <button
92 type="button" 89 type="button"
93 class="btn btn-sm p-1 float-right btn-secondary" 90 class="btn btn-sm p-1 float-right btn-secondary"
94 ng-click="verPuntosDescarga(key)" 91 ng-click="verPuntosDescarga(key)"
92 title="Puntos de descarga"
95 > 93 >
96 <i class="fa fa-arrow-down" aria-hidden="true"></i> 94 <i class="fa fa-arrow-down" aria-hidden="true"></i>
97 </button> 95 </button>
98 </td> 96 </td>
99 <td> 97 <td>
100 <button 98 <button
101 type="button" 99 type="button"
102 class="btn btn-sm p-1 float-right" 100 class="btn btn-sm p-1 float-right"
103 ng-class="{ 101 ng-class="{
104 'btn-secondary': selectedDomicilio != key + 1, 102 'btn-secondary': selectedDomicilio != key + 1,
105 'btn-primary': selectedDomicilio == key + 1 103 'btn-primary': selectedDomicilio == key + 1
106 }" 104 }"
107 foca-focus="selectedDomicilio == {{key + 1}}" 105 foca-focus="selectedDomicilio == {{key + 1}}"
108 ng-keydown="itemDomicilio($event.keyCode)" 106 ng-keydown="itemDomicilio($event.keyCode)"
109 ng-click="select(domicilio)" 107 ng-click="select(domicilio)"
108 title="Seleccionar"
110 > 109 >
111 <i class="fa fa-circle-thin" aria-hidden="true"></i> 110 <i class="fa fa-circle-thin" aria-hidden="true"></i>
112 </button> 111 </button>
113 </td> 112 </td>
114 </tr> 113 </tr>
115 </tbody> 114 </tbody>
116 </table> 115 </table>
117 </div> 116 </div>
118 <form name="formDomicilio" ng-show="ingreso"> 117 <form name="formDomicilio" ng-show="ingreso">
119 <div class="row"> 118 <div class="row">
120 <div class="col-4"> 119 <div class="col-4">
121 <label>Tipo</label> 120 <label>Tipo</label>
122 <select 121 <select
123 class="form-control" 122 class="form-control"
124 ng-disabled="true" 123 ng-disabled="true"
125 > 124 >
126 <option ng-value="2">Entrega</option> 125 <option ng-value="2">Entrega</option>
127 </select> 126 </select>
128 </div> 127 </div>
129 <div class="col-8"> 128 <div class="col-8">
130 <label>Titulo</label> 129 <label>Titulo</label>
131 <input 130 <input
132 type="text" 131 type="text"
133 foca-focus="ingreso" 132 foca-focus="ingreso"
134 class="form-control" 133 class="form-control"
135 ng-model="domicilio.titulo" 134 ng-model="domicilio.titulo"
136 placeholder="Ingrese título" 135 placeholder="Ingrese título"
137 ng-required="true" 136 ng-required="true"
138 teclado-virtual 137 teclado-virtual
139 /> 138 />
140 </div> 139 </div>
141 <div class="col-9"> 140 <div class="col-9">
142 <label>Calle</label> 141 <label>Calle</label>
143 <input 142 <input
144 type="text" 143 type="text"
145 class="form-control" 144 class="form-control"
146 ng-model="domicilio.calle" 145 ng-model="domicilio.calle"
147 placeholder="Ingrese calle" 146 placeholder="Ingrese calle"
148 ng-required="true" 147 ng-required="true"
149 /> 148 />
150 </div> 149 </div>
151 <div class="col-3"> 150 <div class="col-3">
152 <label>Nº</label> 151 <label>Nº</label>
153 <input 152 <input
154 type="text" 153 type="text"
155 class="form-control" 154 class="form-control"
156 ng-model="domicilio.numeroCalle" 155 ng-model="domicilio.numeroCalle"
157 placeholder="Ingrese Numero" 156 placeholder="Ingrese Numero"
158 ng-required="true" 157 ng-required="true"
159 teclado-virtual 158 teclado-virtual
160 /> 159 />
161 </div> 160 </div>
162 <div class="col-6"> 161 <div class="col-6">
163 <label>Localidad</label> 162 <label>Localidad</label>
164 <input 163 <input
165 type="text" 164 type="text"
166 class="form-control" 165 class="form-control"
167 ng-model="domicilio.localidad" 166 ng-model="domicilio.localidad"
168 placeholder="Ingrese localidad" 167 placeholder="Ingrese localidad"
169 ng-required="true" 168 ng-required="true"
170 teclado-virtual 169 teclado-virtual
171 /> 170 />
172 </div> 171 </div>
173 <div class="col-6"> 172 <div class="col-6">
174 <label>Provincia</label> 173 <label>Provincia</label>
175 <input 174 <input
176 type="text" 175 type="text"
177 class="form-control" 176 class="form-control"
178 ng-model="domicilio.provincia" 177 ng-model="domicilio.provincia"
179 placeholder="Ingrese provincia" 178 placeholder="Ingrese provincia"
180 ng-required="true" 179 ng-required="true"
181 /> 180 />
182 </div> 181 </div>
183 </div> 182 </div>
184 </form> 183 </form>
185 </div> 184 </div>
186 <div class="modal-footer"> 185 <div class="modal-footer">
187 <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto"> 186 <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto">
188 <ul class="pagination pagination-sm mb-0 justify-content-end"> 187 <ul class="pagination pagination-sm mb-0 justify-content-end">
189 <li class="page-item" ng-class="{'disabled': currentPage == 1}"> 188 <li class="page-item" ng-class="{'disabled': currentPage == 1}">
190 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> 189 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)">
191 <span aria-hidden="true">&laquo;</span> 190 <span aria-hidden="true">&laquo;</span>
192 <span class="sr-only">Anterior</span> 191 <span class="sr-only">Anterior</span>
193 </a> 192 </a>
194 </li> 193 </li>
195 <li 194 <li
196 class="page-item" 195 class="page-item"
197 ng-repeat="pagina in paginas" 196 ng-repeat="pagina in paginas"
198 ng-class="{'active': pagina == currentPage}" 197 ng-class="{'active': pagina == currentPage}"
199 > 198 >
200 <a 199 <a
201 class="page-link" 200 class="page-link"
202 href="javascript:void();" 201 href="javascript:void();"
203 ng-click="selectPage(pagina)" 202 ng-click="selectPage(pagina)"
204 ng-bind="pagina" 203 ng-bind="pagina"
205 ></a> 204 ></a>
206 </li> 205 </li>
207 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> 206 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}">
208 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> 207 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)">
209 <span aria-hidden="true">&raquo;</span> 208 <span aria-hidden="true">&raquo;</span>
210 <span class="sr-only">Siguiente</span> 209 <span class="sr-only">Siguiente</span>
211 </a> 210 </a>
212 </li> 211 </li>
213 </ul> 212 </ul>
214 </nav> 213 </nav>
215 <button 214 <button
216 ng-show="!ingreso" 215 ng-show="!ingreso"
217 class="btn btn-sm btn-secondary" 216 class="btn btn-sm btn-secondary"
218 type="button" 217 type="button"
219 ng-click="cancel()" 218 ng-click="cancel()"
220 >Volver 219 >Volver
221 </button> 220 </button>
222 <button 221 <button
223 ng-show="ingreso" 222 ng-show="ingreso"
224 class="btn btn-secondary btn-sm" 223 class="btn btn-secondary btn-sm"