소스 검색

Anadi las tecnicas para la seccion de artesanias (ahora sale para los artesanos seleccionados ahi)

carlos.diaz44 3 년 전
부모
커밋
cbd4e2a684
1개의 변경된 파일12개의 추가작업 그리고 13개의 파일을 삭제
  1. 12
    13
      www/index.html

+ 12
- 13
www/index.html 파일 보기

@@ -254,7 +254,7 @@
254 254
                             //'title':'${Artesano.Nombre}','esp': '${info}'
255 255
                             //Tries to pass all the info of each artesano into a new page, the page that display this information is 'artesano.html', not to be confused with 'artesanias.html' or 'artesanos.html'(current page)
256 256
                             //And puts this into the 'item' variable
257
-                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre}', mun: '${Artesano.Municipio}', tel: '${Artesano["Telefono 1"]}', email: '${Artesano["E-mail"]}', esp: '${Artesano.Especificacion}', redes: '${Artesano["E-Commerce 1"]}', tecnicas: '' } })" tappable>
257
+                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre}', mun: '${Artesano.Municipio}', tel: '${Artesano["Telefono 1"]}', email: '${Artesano["E-mail"]}', esp: '${Artesano.Especificacion}', redes: '${Artesano["E-Commerce 1"]}', tecnicas: '${Artesano["Tecnica 1"]}' } })" tappable>
258 258
                         <div class="title">${Artesano.Nombre}</div>
259 259
                     </ons-list-item>`);
260 260
 
@@ -394,9 +394,9 @@
394 394
                                      email = lot[2],
395 395
                                      esp = lot[3],
396 396
                                      redes = lot[4],
397
-                                     tecnicas = '';
397
+                                     tecnicas = lot[5];
398 398
 
399
-                                 listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i]}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', redes: '${redes}', tecnicas: '' }} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
399
+                                 listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i]}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', redes: '${redes}', tecnicas: '${tecnicas}' }} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
400 400
                              }
401 401
 
402 402
 
@@ -591,6 +591,15 @@
591 591
                             }
592 592
                         }
593 593
 
594
+                        if(tecnicas.trim() != ''){
595
+                            if(tecnicas.includes(";", 0)){
596
+                                tecnicas = tecnicas.replace(/;/g,", ");
597
+                                data+='Técnicas que usan: '+tecnicas+'<br>';
598
+                            }
599
+                            else {
600
+                                data+='Técnicas que usan: '+tecnicas+'<br>';
601
+                            }
602
+                        }
594 603
                         //console.log("Las redes son..."+this.data.redes);
595 604
                         //Here it's making sure theres something in municipio and writing their municipio into the page
596 605
                         if(mun.trim() != ""){
@@ -640,16 +649,6 @@
640 649
                             console.log("no tiene nada");
641 650
                         }
642 651
 
643
-                        if(tecnicas.trim() != ''){
644
-                            if(tecnicas.includes(";", 0)){
645
-                                tecnicas = tecnicas.replace(/;/g,", ");
646
-                                data+='Tecnicas que usan: '+tecnicas+'<br>';
647
-                            }
648
-                            else {
649
-                                data+='Tecnicas que usan: '+tecnicas+'<br>';
650
-                            }
651
-                        }
652
-
653 652
                         //This is the part that allows eveything (data) to be displayed
654 653
                         document.getElementById("all").innerHTML = `${data}`;
655 654