Commit 8be03d41c72591a50293a4d666e4284494c26c56

Authored by Eric Fernandez
Exists in master

Merge branch 'master' into 'develop'

Cambio aspecto de botón "crear nuevo domicilio"

La clase css la agregué en el archivo general.scss del proyecto wrapper-demo.

See merge request !13
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 domicilios de descarga</h5> 5 <h5 class="modal-title my-1" ng-show="ingreso">Crear domicilios de descarga</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="6" ng-show="!ingreso"> 59 <td colspan="6" ng-show="!ingreso">
60 <input 60 <button
61 class="form-control form-control-sm" 61 class="form-control form-control-sm btn-rounded"
62 type="text" 62 type="text"
63 placeholder="Nuevo domicilio"
64 readonly 63 readonly
65 ng-click="ingreso = !ingreso" 64 ng-click="ingreso = !ingreso"
66 /> 65 >
66 <i class="fa fa-plus left" aria-hidden="true"></i>
67 Crear domicilio de entrega
68 </button>
67 </td> 69 </td>
68 </tr> 70 </tr>
69 <tr class="selectable" 71 <tr class="selectable"
70 ng-repeat="(key,domicilio) in currentPageDomicilios"> 72 ng-repeat="(key,domicilio) in currentPageDomicilios">
71 <td 73 <td
72 ng-bind="domicilio.titulo" 74 ng-bind="domicilio.titulo"
73 ng-click="select(domicilio)" 75 ng-click="select(domicilio)"
74 ></td> 76 ></td>
75 <td 77 <td
76 ng-bind="domicilio.Calle + ' ' + domicilio.Numero" 78 ng-bind="domicilio.Calle + ' ' + domicilio.Numero"
77 ng-click="select(domicilio)" 79 ng-click="select(domicilio)"
78 ></td> 80 ></td>
79 <td 81 <td
80 ng-bind="domicilio.Localidad" 82 ng-bind="domicilio.Localidad"
81 ng-click="select(domicilio)" 83 ng-click="select(domicilio)"
82 ></td> 84 ></td>
83 <td 85 <td
84 ng-bind="domicilio.Provincia" 86 ng-bind="domicilio.Provincia"
85 ng-click="select(domicilio)" 87 ng-click="select(domicilio)"
86 ></td> 88 ></td>
87 <td> 89 <td>
88 <button 90 <button
89 type="button" 91 type="button"
90 class="btn btn-sm p-1 float-right btn-secondary" 92 class="btn btn-sm p-1 float-right btn-secondary"
91 ng-click="verPuntosDescarga(key)" 93 ng-click="verPuntosDescarga(key)"
92 title="Puntos de descarga" 94 title="Puntos de descarga"
93 > 95 >
94 <small>PD</small> 96 <small>PD</small>
95 </button> 97 </button>
96 </td> 98 </td>
97 <td> 99 <td>
98 <button 100 <button
99 type="button" 101 type="button"
100 class="btn btn-sm p-1 float-right" 102 class="btn btn-sm p-1 float-right"
101 ng-class="{ 103 ng-class="{
102 'btn-secondary': selectedDomicilio != key + 1, 104 'btn-secondary': selectedDomicilio != key + 1,
103 'btn-primary': selectedDomicilio == key + 1 105 'btn-primary': selectedDomicilio == key + 1
104 }" 106 }"
105 foca-focus="selectedDomicilio == {{key + 1}}" 107 foca-focus="selectedDomicilio == {{key + 1}}"
106 ng-keydown="itemDomicilio($event.keyCode)" 108 ng-keydown="itemDomicilio($event.keyCode)"
107 ng-click="select(domicilio)" 109 ng-click="select(domicilio)"
108 title="Seleccionar" 110 title="Seleccionar"
109 > 111 >
110 <i class="fa fa-circle-thin" aria-hidden="true"></i> 112 <i class="fa fa-circle-thin" aria-hidden="true"></i>
111 </button> 113 </button>
112 </td> 114 </td>
113 </tr> 115 </tr>
114 </tbody> 116 </tbody>
115 </table> 117 </table>
116 </div> 118 </div>
117 <form name="formDomicilio" ng-show="ingreso"> 119 <form name="formDomicilio" ng-show="ingreso">
118 <input 120 <input
119 type="hidden" 121 type="hidden"
120 ng-model="domicilio.latitud" 122 ng-model="domicilio.latitud"
121 ng-required="true"> 123 ng-required="true">
122 <input 124 <input
123 type="hidden" 125 type="hidden"
124 ng-model="domicilio.longitud" 126 ng-model="domicilio.longitud"
125 ng-required="true"> 127 ng-required="true">
126 <div class="row"> 128 <div class="row">
127 <div class="col-4"> 129 <div class="col-4">
128 <label>Tipo</label> 130 <label>Tipo</label>
129 <select 131 <select
130 class="form-control" 132 class="form-control"
131 ng-disabled="true" 133 ng-disabled="true"
132 > 134 >
133 <option ng-value="2">Entrega</option> 135 <option ng-value="2">Entrega</option>
134 </select> 136 </select>
135 </div> 137 </div>
136 <div class="col-8"> 138 <div class="col-8">
137 <label>Titulo</label> 139 <label>Titulo</label>
138 <input 140 <input
139 type="text" 141 type="text"
140 foca-focus="ingreso" 142 foca-focus="ingreso"
141 class="form-control" 143 class="form-control"
142 ng-model="domicilio.titulo" 144 ng-model="domicilio.titulo"
143 placeholder="Ingrese título" 145 placeholder="Ingrese título"
144 ng-required="true" 146 ng-required="true"
145 ng-keypress="next($event.keyCode)" 147 ng-keypress="next($event.keyCode)"
146 ng-focus="focused = 1" 148 ng-focus="focused = 1"
147 foca-focus="focused == 1" 149 foca-focus="focused == 1"
148 teclado-virtual 150 teclado-virtual
149 /> 151 />
150 </div> 152 </div>
151 <div class="col-9"> 153 <div class="col-9">
152 <label>Calle</label> 154 <label>Calle</label>
153 <input 155 <input
154 type="text" 156 type="text"
155 class="form-control" 157 class="form-control"
156 ng-model="domicilio.calle" 158 ng-model="domicilio.calle"
157 placeholder="Ingrese calle" 159 placeholder="Ingrese calle"
158 ng-required="true" 160 ng-required="true"
159 ng-keypress="next($event.keyCode)" 161 ng-keypress="next($event.keyCode)"
160 ng-focus="focused = 2" 162 ng-focus="focused = 2"
161 foca-focus="focused == 2" 163 foca-focus="focused == 2"
162 teclado-virtual 164 teclado-virtual
163 /> 165 />
164 </div> 166 </div>
165 <div class="col-3"> 167 <div class="col-3">
166 <label>Nº</label> 168 <label>Nº</label>
167 <input 169 <input
168 type="text" 170 type="text"
169 class="form-control" 171 class="form-control"
170 ng-model="domicilio.numeroCalle" 172 ng-model="domicilio.numeroCalle"
171 placeholder="Ingrese Numero" 173 placeholder="Ingrese Numero"
172 ng-required="true" 174 ng-required="true"
173 ng-keypress="next($event.keyCode)" 175 ng-keypress="next($event.keyCode)"
174 ng-focus="focused = 3" 176 ng-focus="focused = 3"
175 foca-focus="focused == 3" 177 foca-focus="focused == 3"
176 teclado-virtual 178 teclado-virtual
177 /> 179 />
178 </div> 180 </div>
179 <div class="col-6"> 181 <div class="col-6">
180 <label>Localidad</label> 182 <label>Localidad</label>
181 <input 183 <input
182 type="text" 184 type="text"
183 class="form-control" 185 class="form-control"
184 ng-model="domicilio.localidad" 186 ng-model="domicilio.localidad"
185 placeholder="Ingrese localidad" 187 placeholder="Ingrese localidad"
186 ng-required="true" 188 ng-required="true"
187 ng-keypress="next($event.keyCode)" 189 ng-keypress="next($event.keyCode)"
188 ng-focus="focused = 4" 190 ng-focus="focused = 4"
189 foca-focus="focused == 4" 191 foca-focus="focused == 4"
190 teclado-virtual 192 teclado-virtual
191 /> 193 />
192 </div> 194 </div>
193 <div class="col-6"> 195 <div class="col-6">
194 <label>Provincia</label> 196 <label>Provincia</label>
195 <input 197 <input
196 type="text" 198 type="text"
197 class="form-control" 199 class="form-control"
198 ng-model="domicilio.provincia" 200 ng-model="domicilio.provincia"
199 placeholder="Ingrese provincia" 201 placeholder="Ingrese provincia"
200 ng-required="true" 202 ng-required="true"
201 ng-keypress="next($event.keyCode)" 203 ng-keypress="next($event.keyCode)"
202 ng-focus="focused = 5" 204 ng-focus="focused = 5"
203 foca-focus="focused == 5" 205 foca-focus="focused == 5"
204 teclado-virtual 206 teclado-virtual
205 /> 207 />
206 </div> 208 </div>
207 </div> 209 </div>
208 <div class="row mt-3"> 210 <div class="row mt-3">
209 <div class="col-12"> 211 <div class="col-12">
210 <button 212 <button
211 type="button" 213 type="button"
212 class="btn btn-primary float-right ml-3" 214 class="btn btn-primary float-right ml-3"
213 ng-click="localizarDomicilio()">Buscar</button> 215 ng-click="localizarDomicilio()">Buscar</button>
214 <button 216 <button
215 type="button" 217 type="button"
216 class="btn btn-primary float-right" 218 class="btn btn-primary float-right"
217 ng-disabled="!domicilio.calle || !domicilio.numeroCalle || !domicilio.localidad || !domicilio.provincia" 219 ng-disabled="!domicilio.calle || !domicilio.numeroCalle || !domicilio.localidad || !domicilio.provincia"
218 ng-click="localizarDomicilio(true)">Localizar</button> 220 ng-click="localizarDomicilio(true)">Localizar</button>
219 </div> 221 </div>
220 </div> 222 </div>
221 </form> 223 </form>
222 </div> 224 </div>
223 <div class="modal-footer"> 225 <div class="modal-footer">
224 <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto"> 226 <nav ng-show="currentPageDomicilios.length > 0 && !ingreso" class="mr-auto">
225 <ul class="pagination pagination-sm mb-0 justify-content-end"> 227 <ul class="pagination pagination-sm mb-0 justify-content-end">
226 <li class="page-item" ng-class="{'disabled': currentPage == 1}"> 228 <li class="page-item" ng-class="{'disabled': currentPage == 1}">
227 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)"> 229 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage - 1)">
228 <span aria-hidden="true">&laquo;</span> 230 <span aria-hidden="true">&laquo;</span>
229 <span class="sr-only">Anterior</span> 231 <span class="sr-only">Anterior</span>
230 </a> 232 </a>
231 </li> 233 </li>
232 <li 234 <li
233 class="page-item" 235 class="page-item"
234 ng-repeat="pagina in paginas" 236 ng-repeat="pagina in paginas"
235 ng-class="{'active': pagina == currentPage}" 237 ng-class="{'active': pagina == currentPage}"
236 > 238 >
237 <a 239 <a
238 class="page-link" 240 class="page-link"
239 href="javascript:void();" 241 href="javascript:void();"
240 ng-click="selectPage(pagina)" 242 ng-click="selectPage(pagina)"
241 ng-bind="pagina" 243 ng-bind="pagina"
242 ></a> 244 ></a>
243 </li> 245 </li>
244 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}"> 246 <li class="page-item" ng-class="{'disabled': currentPage == lastPage}">
245 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)"> 247 <a class="page-link" href="javascript:void();" ng-click="selectPage(currentPage + 1)">
246 <span aria-hidden="true">&raquo;</span> 248 <span aria-hidden="true">&raquo;</span>
247 <span class="sr-only">Siguiente</span> 249 <span class="sr-only">Siguiente</span>
248 </a> 250 </a>
249 </li> 251 </li>
250 </ul> 252 </ul>
251 </nav> 253 </nav>
252 <button 254 <button
253 ng-show="!ingreso" 255 ng-show="!ingreso"
254 class="btn btn-sm btn-secondary" 256 class="btn btn-sm btn-secondary"
255 type="button" 257 type="button"
256 ng-click="cancel()" 258 ng-click="cancel()"
257 >Volver 259 >Volver
258 </button> 260 </button>
259 <button 261 <button
260 ng-show="ingreso" 262 ng-show="ingreso"
261 class="btn btn-secondary btn-sm" 263 class="btn btn-secondary btn-sm"
262 type="button" 264 type="button"
263 ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]" 265 ng-click="ingreso = !ingreso; domicilio = {}; contactos = [{}]"
264 >Cancelar 266 >Cancelar
265 </button> 267 </button>
266 <button 268 <button
267 ng-show="ingreso" 269 ng-show="ingreso"
268 class="btn btn-sm btn-primary" 270 class="btn btn-sm btn-primary"
269 type="button" 271 type="button"
270 ng-click="agregarDomicilio()" 272 ng-click="agregarDomicilio()"
271 >Agregar domicilio 273 >Agregar domicilio
272 </button> 274 </button>
273 </div> 275 </div>