Browse Source

Changes in social networks and tecnicas fix

Christian Matos 3 years ago
parent
commit
c581369c0e
2 changed files with 150 additions and 106 deletions
  1. 75
    53
      platforms/browser/www/index.html
  2. 75
    53
      www/index.html

+ 75
- 53
platforms/browser/www/index.html View File

259
                             //'title':'${Artesano.Nombre}','esp': '${info}'
259
                             //'title':'${Artesano.Nombre}','esp': '${info}'
260
                             //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)
260
                             //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)
261
                             //And puts this into the 'item' variable
261
                             //And puts this into the 'item' variable
262
-                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre.replace(/"/g, " ")}', mun: '${Artesano.Municipio}', tel: '${Artesano["Telefono 1"]}', email: '${Artesano["Email"]}', esp: '${Artesano.Especificacion}', redes: '${Artesano["E-Commerce 1"]}', tecnicas: '${Artesano["Tecnica"]}' } })" tappable>
262
+                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre.replace(/"/g, " ")}', mun: '${Artesano.Municipio}', tel: '${Artesano["Telefono 1"]}', email: '${Artesano["Email"]}', esp: '${Artesano.Especificacion}', red1: '${Artesano["Red Social 1"]}', red2: '${Artesano["Red Social 2"]}', ecom: '${Artesano["E-Commerce 1"]}', tecnicas: '${Artesano["Tecnica"]}' } })" tappable>
263
                         <div class="title">${Artesano.Nombre}</div>
263
                         <div class="title">${Artesano.Nombre}</div>
264
                     </ons-list-item>`);
264
                     </ons-list-item>`);
265
 
265
 
364
                              });*/
364
                              });*/
365
 
365
 
366
                              for(var i=0; i<results.length; i++) {
366
                              for(var i=0; i<results.length; i++) {
367
-
367
+                                
368
                                  //if(Esp[num] in artesanos_json.) {}
368
                                  //if(Esp[num] in artesanos_json.) {}
369
                                  //results[i].Nombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
369
                                  //results[i].Nombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
370
                                  ANombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
370
                                  ANombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
371
                                  Artesanos+=`${ANombre}|`
371
                                  Artesanos+=`${ANombre}|`
372
-                                 ArtesanosInfo+=`${results[i].Municipio}|${results[i]["Telefono 1"]}|${results[i]["Email"]}|${results[i].Especificacion}|${results[i]["Tecnica"]}&&`
372
+                                 ArtesanosInfo+=`${results[i].Municipio}|${results[i]["Telefono 1"]}|${results[i]["Email"]}|${results[i].Especificacion}|${results[i]["E-Commerce 1"]}|${results[i]["Red Social 1"]}|${results[i]["Red Social 2"]}|${results[i]["Tecnica"]}&&`
373
                                  //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
373
                                  //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
374
-                             }
374
+                                }
375
 
375
 
376
                              return {
376
                              return {
377
                                  name: Esp[num],
377
                                  name: Esp[num],
400
                                      tel = lot[1],
400
                                      tel = lot[1],
401
                                      email = lot[2],
401
                                      email = lot[2],
402
                                      esp = lot[3],
402
                                      esp = lot[3],
403
-                                     redes = lot[4],
404
-                                     tecnicas = lot[5];
403
+                                     ecom = lot[4],
404
+                                     red1 = lot[5];
405
+                                     red2 = lot[6];
406
+                                     tecnicas = lot[7]
407
+                                     console.log(lot)
405
 
408
 
406
-                                 listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i].replace(/"/g, " ")}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', redes: '${redes}', tecnicas: '${tecnicas}' }} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
409
+                                 listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i].replace(/"/g, " ")}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', red1: '${red1}', red2: '${red2}', ecom: '${ecom}', tecnicas: '${tecnicas}' }} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
407
                              }
410
                              }
408
 
411
 
409
                              if (Artesania.name == "Figuras y simbolos indigenas") {
412
                              if (Artesania.name == "Figuras y simbolos indigenas") {
410
                                  Artesania.name = "Figuras y símbolos indígenas";
413
                                  Artesania.name = "Figuras y símbolos indígenas";
411
                              } 
414
                              } 
412
 
415
 
413
-                             console.log(Artesania.name);
416
+        
414
 
417
 
415
                              return ons.createElement(`
418
                              return ons.createElement(`
416
               <ons-list-item expandable tappable>
419
               <ons-list-item expandable tappable>
551
                     for (i = 0; i < all_artesanos.length;i++){
554
                     for (i = 0; i < all_artesanos.length;i++){
552
                         all_artesanos[i].Nombre = all_artesanos[i].Nombre +  " " + all_artesanos[i]["Apellido Paterno"] + " " + all_artesanos[i]["Apellido Materno"];
555
                         all_artesanos[i].Nombre = all_artesanos[i].Nombre +  " " + all_artesanos[i]["Apellido Paterno"] + " " + all_artesanos[i]["Apellido Materno"];
553
                         var artesano = ons.createElement(`<ons-list-item class = "artists"
556
                         var artesano = ons.createElement(`<ons-list-item class = "artists"
554
-                        onclick="SNavigator.pushPage('artesano_s.html', { data: {title: '${all_artesanos[i].Nombre.replace(/"/g, " ")}', mun: '${all_artesanos[i].Municipio}', tel: '${all_artesanos[i]["Telefono 1"]}', email: '${all_artesanos[i]["Email"]}', esp: '${all_artesanos[i].Especificacion}', redes: '${all_artesanos[i]["E-Commerce 1"]}', tecnicas: '${all_artesanos[i]["Tecnica"]}' } })" tappable>
557
+                        onclick="SNavigator.pushPage('artesano_s.html', { data: {title: '${all_artesanos[i].Nombre.replace(/"/g, " ")}', mun: '${all_artesanos[i].Municipio}', tel: '${all_artesanos[i]["Telefono 1"]}', email: '${all_artesanos[i]["Email"]}', esp: '${all_artesanos[i].Especificacion}', red1: '${all_artesanos[i]["Red Social 1"]}', red2: '${all_artesanos[i]["Red Social 2"]}', ecom: '${all_artesanos[i]["E-Commerce 1"]}', tecnicas: '${all_artesanos[i]["Tecnica"]}' } })" tappable>
555
                         <div>${all_artesanos[i].Nombre}</div>
558
                         <div>${all_artesanos[i].Nombre}</div>
556
                     </ons-list-item>`);
559
                     </ons-list-item>`);
557
                         document.getElementById('results').appendChild(artesano);
560
                         document.getElementById('results').appendChild(artesano);
587
                             tel = this.data.tel,
590
                             tel = this.data.tel,
588
                             em = this.data.email,
591
                             em = this.data.email,
589
                             esp = this.data.esp,
592
                             esp = this.data.esp,
590
-                            redes = this.data.redes,
593
+                            red1 = this.data.red1,
594
+                            red2 = this.data.red2,
595
+                            ecom = this.data.ecom,
591
                             tecnicas = this.data.tecnicas;
596
                             tecnicas = this.data.tecnicas;
592
 
597
 
598
+                            
599
+
593
                         //here the email is the string made from the start to where the '#' is.
600
                         //here the email is the string made from the start to where the '#' is.
594
                         
601
                         
595
 
602
 
638
                             data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
645
                             data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
639
                         }
646
                         }
640
 
647
 
641
-                        console.log("Redes: "+redes);
648
+                        
642
 
649
 
643
                         //Here it has to decide what to do depending on the links they give to their social media pages
650
                         //Here it has to decide what to do depending on the links they give to their social media pages
644
                         //if the link is to a facebook, instagram or myspace account then it will show the picture of the social media site, and when you click the picture then the app redirects you to their social media.
651
                         //if the link is to a facebook, instagram or myspace account then it will show the picture of the social media site, and when you click the picture then the app redirects you to their social media.
645
-                        //The alt attribute is required for images, it's in case theres no internet connection, then it will display that tet instead, I think screen readers can also read that text
646
-                        //If the link is to another website (but isn't a mailto link) then it will display a default picture we chose to display a default web browser, like the other ones clikcing on it will take you to the link.
652
+                        
653
+                        
647
                         //If it's none of them then it will not display anything
654
                         //If it's none of them then it will not display anything
648
-                        if(redes.includes("facebook")){
649
-
650
-                            console.log(redes.substring(1,redes.length-2));
651
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
655
+                        //First Social Media
656
+                        if(red1.includes("facebook")){
657
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
652
                         }
658
                         }
653
-                        else if(redes.includes("instagram")){
654
-                            console.log(redes.substring(1,redes.length-2));
655
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
659
+                        else if(red1.includes("instagram")){
660
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
656
                         }
661
                         }
657
-                        else if(redes.includes("myspace")){
658
-                            console.log(redes.substring(1,redes.length-2));
659
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
662
+                        else if(red1.includes("myspace")){
663
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
660
                         }
664
                         }
661
-                        else if((redes.includes(".org") || redes.includes(".com")) && !redes.includes("mailto")){
662
-                            redes = redes.substr(redes.indexOf("#")+1,redes.length);
663
-                            redes = redes.substr(0, redes.length-1);
664
-                            console.log(redes);
665
-                            data+='<br><a href="'+ redes + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
665
+
666
+                        //Second Social Media
667
+                        if(red2.includes("facebook")){
668
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
669
+                        }
670
+                        else if(red2.includes("instagram")){
671
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
666
                         }
672
                         }
667
-                        else if(redes.includes("#") || redes.includes("mailto")){
668
-                            console.log("tiene un disparate");
669
-                        } else {
670
-                            console.log("no tiene nada");
673
+                        else if(red2.includes("myspace")){
674
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
671
                         }
675
                         }
676
+                        
677
+                        //E-commerce 
678
+                        if ((ecom.includes(".org") || ecom.includes(".com")) && !ecom.includes("mailto")){
679
+                            ecom = ecom.substr(ecom.indexOf("#")+1,ecom.length);
680
+                            ecom = ecom.substr(0, ecom.length-1);
681
+                            console.log(ecom);
682
+                            data+='<br><a href="'+ ecom + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
683
+                        }
684
+                        
672
 
685
 
673
                         //This is the part that allows eveything (data) to be displayed
686
                         //This is the part that allows eveything (data) to be displayed
674
                         document.getElementById("all").innerHTML = `${data}`;
687
                         document.getElementById("all").innerHTML = `${data}`;
701
                             tel = this.data.tel,
714
                             tel = this.data.tel,
702
                             em = this.data.email,
715
                             em = this.data.email,
703
                             esp = this.data.esp,
716
                             esp = this.data.esp,
704
-                            redes = this.data.redes,
717
+                            red1 = this.data.red1,
718
+                            red2 = this.data.red2,
719
+                            ecom = this.data.ecom,
705
                             tecnicas = this.data.tecnicas;
720
                             tecnicas = this.data.tecnicas;
706
 
721
 
707
                         //here the email is the string made from the start to where the '#' is.
722
                         //here the email is the string made from the start to where the '#' is.
746
                             data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
761
                             data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
747
                         }
762
                         }
748
 
763
 
749
-                        console.log("Redes: "+redes);
764
+                        
750
 
765
 
751
                         //Here it has to decide what to do depending on the links they give to their social media pages
766
                         //Here it has to decide what to do depending on the links they give to their social media pages
752
                         //if the link is to a facebook, instagram or myspace account then it will show the picture of the social media site, and when you click the picture then the app redirects you to their social media.
767
                         //if the link is to a facebook, instagram or myspace account then it will show the picture of the social media site, and when you click the picture then the app redirects you to their social media.
753
                         //The alt attribute is required for images, it's in case theres no internet connection, then it will display that tet instead, I think screen readers can also read that text
768
                         //The alt attribute is required for images, it's in case theres no internet connection, then it will display that tet instead, I think screen readers can also read that text
754
                         //If the link is to another website (but isn't a mailto link) then it will display a default picture we chose to display a default web browser, like the other ones clikcing on it will take you to the link.
769
                         //If the link is to another website (but isn't a mailto link) then it will display a default picture we chose to display a default web browser, like the other ones clikcing on it will take you to the link.
755
                         //If it's none of them then it will not display anything
770
                         //If it's none of them then it will not display anything
756
-                        if(redes.includes("facebook")){
757
-
758
-                            console.log(redes.substring(1,redes.length-2));
759
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
771
+                        if(red1.includes("facebook")) {
772
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
773
+                        }
774
+                        else if(red1.includes("instagram")){
775
+                            
776
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
777
+                        }
778
+                        else if(red1.includes("myspace")){
779
+                            
780
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
760
                         }
781
                         }
761
-                        else if(redes.includes("instagram")){
762
-                            console.log(redes.substring(1,redes.length-2));
763
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
782
+
783
+
784
+                        if(red2.includes("facebook")){
785
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
764
                         }
786
                         }
765
-                        else if(redes.includes("myspace")){
766
-                            console.log(redes.substring(1,redes.length-2));
767
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
787
+                        else if(red2.includes("instagram")){
788
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
768
                         }
789
                         }
769
-                        else if((redes.includes(".org") || redes.includes(".com")) && !redes.includes("mailto")){
770
-                            redes = redes.substr(redes.indexOf("#")+1,redes.length);
771
-                            redes = redes.substr(0, redes.length-1);
772
-                            console.log(redes);
773
-                            data+='<br><a href="'+ redes + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
790
+                        else if(red2.includes("myspace")){
791
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
774
                         }
792
                         }
775
-                        else if(redes.includes("#") || redes.includes("mailto")){
776
-                            console.log("tiene un disparate");
777
-                        } else {
778
-                            console.log("no tiene nada");
793
+
794
+
795
+                        if((ecom.includes(".org") || ecom.includes(".com")) && !ecom.includes("mailto")){
796
+                            ecom = ecom.substr(ecom.indexOf("#")+1,ecom.length);
797
+                            ecom = ecom.substr(0, ecom.length-1);
798
+
799
+                            data+='<br><a href="'+ ecom + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
779
                         }
800
                         }
801
+                        
780
 
802
 
781
                         //This is the part that allows eveything (data) to be displayed
803
                         //This is the part that allows eveything (data) to be displayed
782
                         document.getElementById("all2").innerHTML = `${data}`;
804
                         document.getElementById("all2").innerHTML = `${data}`;

+ 75
- 53
www/index.html View File

259
                             //'title':'${Artesano.Nombre}','esp': '${info}'
259
                             //'title':'${Artesano.Nombre}','esp': '${info}'
260
                             //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)
260
                             //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)
261
                             //And puts this into the 'item' variable
261
                             //And puts this into the 'item' variable
262
-                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre.replace(/"/g, " ")}', mun: '${Artesano.Municipio}', tel: '${Artesano["Telefono 1"]}', email: '${Artesano["Email"]}', esp: '${Artesano.Especificacion}', redes: '${Artesano["E-Commerce 1"]}', tecnicas: '${Artesano["Tecnica"]}' } })" tappable>
262
+                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre.replace(/"/g, " ")}', mun: '${Artesano.Municipio}', tel: '${Artesano["Telefono 1"]}', email: '${Artesano["Email"]}', esp: '${Artesano.Especificacion}', red1: '${Artesano["Red Social 1"]}', red2: '${Artesano["Red Social 2"]}', ecom: '${Artesano["E-Commerce 1"]}', tecnicas: '${Artesano["Tecnica"]}' } })" tappable>
263
                         <div class="title">${Artesano.Nombre}</div>
263
                         <div class="title">${Artesano.Nombre}</div>
264
                     </ons-list-item>`);
264
                     </ons-list-item>`);
265
 
265
 
364
                              });*/
364
                              });*/
365
 
365
 
366
                              for(var i=0; i<results.length; i++) {
366
                              for(var i=0; i<results.length; i++) {
367
-
367
+                                
368
                                  //if(Esp[num] in artesanos_json.) {}
368
                                  //if(Esp[num] in artesanos_json.) {}
369
                                  //results[i].Nombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
369
                                  //results[i].Nombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
370
                                  ANombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
370
                                  ANombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
371
                                  Artesanos+=`${ANombre}|`
371
                                  Artesanos+=`${ANombre}|`
372
-                                 ArtesanosInfo+=`${results[i].Municipio}|${results[i]["Telefono 1"]}|${results[i]["Email"]}|${results[i].Especificacion}|${results[i]["Tecnica"]}&&`
372
+                                 ArtesanosInfo+=`${results[i].Municipio}|${results[i]["Telefono 1"]}|${results[i]["Email"]}|${results[i].Especificacion}|${results[i]["E-Commerce 1"]}|${results[i]["Red Social 1"]}|${results[i]["Red Social 2"]}|${results[i]["Tecnica"]}&&`
373
                                  //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
373
                                  //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
374
-                             }
374
+                                }
375
 
375
 
376
                              return {
376
                              return {
377
                                  name: Esp[num],
377
                                  name: Esp[num],
400
                                      tel = lot[1],
400
                                      tel = lot[1],
401
                                      email = lot[2],
401
                                      email = lot[2],
402
                                      esp = lot[3],
402
                                      esp = lot[3],
403
-                                     redes = lot[4],
404
-                                     tecnicas = lot[5];
403
+                                     ecom = lot[4],
404
+                                     red1 = lot[5];
405
+                                     red2 = lot[6];
406
+                                     tecnicas = lot[7]
407
+                                     console.log(lot)
405
 
408
 
406
-                                 listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i].replace(/"/g, " ")}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', redes: '${redes}', tecnicas: '${tecnicas}' }} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
409
+                                 listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i].replace(/"/g, " ")}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', red1: '${red1}', red2: '${red2}', ecom: '${ecom}', tecnicas: '${tecnicas}' }} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
407
                              }
410
                              }
408
 
411
 
409
                              if (Artesania.name == "Figuras y simbolos indigenas") {
412
                              if (Artesania.name == "Figuras y simbolos indigenas") {
410
                                  Artesania.name = "Figuras y símbolos indígenas";
413
                                  Artesania.name = "Figuras y símbolos indígenas";
411
                              } 
414
                              } 
412
 
415
 
413
-                             console.log(Artesania.name);
416
+        
414
 
417
 
415
                              return ons.createElement(`
418
                              return ons.createElement(`
416
               <ons-list-item expandable tappable>
419
               <ons-list-item expandable tappable>
551
                     for (i = 0; i < all_artesanos.length;i++){
554
                     for (i = 0; i < all_artesanos.length;i++){
552
                         all_artesanos[i].Nombre = all_artesanos[i].Nombre +  " " + all_artesanos[i]["Apellido Paterno"] + " " + all_artesanos[i]["Apellido Materno"];
555
                         all_artesanos[i].Nombre = all_artesanos[i].Nombre +  " " + all_artesanos[i]["Apellido Paterno"] + " " + all_artesanos[i]["Apellido Materno"];
553
                         var artesano = ons.createElement(`<ons-list-item class = "artists"
556
                         var artesano = ons.createElement(`<ons-list-item class = "artists"
554
-                        onclick="SNavigator.pushPage('artesano_s.html', { data: {title: '${all_artesanos[i].Nombre.replace(/"/g, " ")}', mun: '${all_artesanos[i].Municipio}', tel: '${all_artesanos[i]["Telefono 1"]}', email: '${all_artesanos[i]["Email"]}', esp: '${all_artesanos[i].Especificacion}', redes: '${all_artesanos[i]["E-Commerce 1"]}', tecnicas: '${all_artesanos[i]["Tecnica"]}' } })" tappable>
557
+                        onclick="SNavigator.pushPage('artesano_s.html', { data: {title: '${all_artesanos[i].Nombre.replace(/"/g, " ")}', mun: '${all_artesanos[i].Municipio}', tel: '${all_artesanos[i]["Telefono 1"]}', email: '${all_artesanos[i]["Email"]}', esp: '${all_artesanos[i].Especificacion}', red1: '${all_artesanos[i]["Red Social 1"]}', red2: '${all_artesanos[i]["Red Social 2"]}', ecom: '${all_artesanos[i]["E-Commerce 1"]}', tecnicas: '${all_artesanos[i]["Tecnica"]}' } })" tappable>
555
                         <div>${all_artesanos[i].Nombre}</div>
558
                         <div>${all_artesanos[i].Nombre}</div>
556
                     </ons-list-item>`);
559
                     </ons-list-item>`);
557
                         document.getElementById('results').appendChild(artesano);
560
                         document.getElementById('results').appendChild(artesano);
587
                             tel = this.data.tel,
590
                             tel = this.data.tel,
588
                             em = this.data.email,
591
                             em = this.data.email,
589
                             esp = this.data.esp,
592
                             esp = this.data.esp,
590
-                            redes = this.data.redes,
593
+                            red1 = this.data.red1,
594
+                            red2 = this.data.red2,
595
+                            ecom = this.data.ecom,
591
                             tecnicas = this.data.tecnicas;
596
                             tecnicas = this.data.tecnicas;
592
 
597
 
598
+                            
599
+
593
                         //here the email is the string made from the start to where the '#' is.
600
                         //here the email is the string made from the start to where the '#' is.
594
                         
601
                         
595
 
602
 
638
                             data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
645
                             data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
639
                         }
646
                         }
640
 
647
 
641
-                        console.log("Redes: "+redes);
648
+                        
642
 
649
 
643
                         //Here it has to decide what to do depending on the links they give to their social media pages
650
                         //Here it has to decide what to do depending on the links they give to their social media pages
644
                         //if the link is to a facebook, instagram or myspace account then it will show the picture of the social media site, and when you click the picture then the app redirects you to their social media.
651
                         //if the link is to a facebook, instagram or myspace account then it will show the picture of the social media site, and when you click the picture then the app redirects you to their social media.
645
-                        //The alt attribute is required for images, it's in case theres no internet connection, then it will display that tet instead, I think screen readers can also read that text
646
-                        //If the link is to another website (but isn't a mailto link) then it will display a default picture we chose to display a default web browser, like the other ones clikcing on it will take you to the link.
652
+                        
653
+                        
647
                         //If it's none of them then it will not display anything
654
                         //If it's none of them then it will not display anything
648
-                        if(redes.includes("facebook")){
649
-
650
-                            console.log(redes.substring(1,redes.length-2));
651
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
655
+                        //First Social Media
656
+                        if(red1.includes("facebook")){
657
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
652
                         }
658
                         }
653
-                        else if(redes.includes("instagram")){
654
-                            console.log(redes.substring(1,redes.length-2));
655
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
659
+                        else if(red1.includes("instagram")){
660
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
656
                         }
661
                         }
657
-                        else if(redes.includes("myspace")){
658
-                            console.log(redes.substring(1,redes.length-2));
659
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
662
+                        else if(red1.includes("myspace")){
663
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
660
                         }
664
                         }
661
-                        else if((redes.includes(".org") || redes.includes(".com")) && !redes.includes("mailto")){
662
-                            redes = redes.substr(redes.indexOf("#")+1,redes.length);
663
-                            redes = redes.substr(0, redes.length-1);
664
-                            console.log(redes);
665
-                            data+='<br><a href="'+ redes + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
665
+
666
+                        //Second Social Media
667
+                        if(red2.includes("facebook")){
668
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
669
+                        }
670
+                        else if(red2.includes("instagram")){
671
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
666
                         }
672
                         }
667
-                        else if(redes.includes("#") || redes.includes("mailto")){
668
-                            console.log("tiene un disparate");
669
-                        } else {
670
-                            console.log("no tiene nada");
673
+                        else if(red2.includes("myspace")){
674
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
671
                         }
675
                         }
676
+                        
677
+                        //E-commerce 
678
+                        if ((ecom.includes(".org") || ecom.includes(".com")) && !ecom.includes("mailto")){
679
+                            ecom = ecom.substr(ecom.indexOf("#")+1,ecom.length);
680
+                            ecom = ecom.substr(0, ecom.length-1);
681
+                            console.log(ecom);
682
+                            data+='<br><a href="'+ ecom + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
683
+                        }
684
+                        
672
 
685
 
673
                         //This is the part that allows eveything (data) to be displayed
686
                         //This is the part that allows eveything (data) to be displayed
674
                         document.getElementById("all").innerHTML = `${data}`;
687
                         document.getElementById("all").innerHTML = `${data}`;
701
                             tel = this.data.tel,
714
                             tel = this.data.tel,
702
                             em = this.data.email,
715
                             em = this.data.email,
703
                             esp = this.data.esp,
716
                             esp = this.data.esp,
704
-                            redes = this.data.redes,
717
+                            red1 = this.data.red1,
718
+                            red2 = this.data.red2,
719
+                            ecom = this.data.ecom,
705
                             tecnicas = this.data.tecnicas;
720
                             tecnicas = this.data.tecnicas;
706
 
721
 
707
                         //here the email is the string made from the start to where the '#' is.
722
                         //here the email is the string made from the start to where the '#' is.
746
                             data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
761
                             data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
747
                         }
762
                         }
748
 
763
 
749
-                        console.log("Redes: "+redes);
764
+                        
750
 
765
 
751
                         //Here it has to decide what to do depending on the links they give to their social media pages
766
                         //Here it has to decide what to do depending on the links they give to their social media pages
752
                         //if the link is to a facebook, instagram or myspace account then it will show the picture of the social media site, and when you click the picture then the app redirects you to their social media.
767
                         //if the link is to a facebook, instagram or myspace account then it will show the picture of the social media site, and when you click the picture then the app redirects you to their social media.
753
                         //The alt attribute is required for images, it's in case theres no internet connection, then it will display that tet instead, I think screen readers can also read that text
768
                         //The alt attribute is required for images, it's in case theres no internet connection, then it will display that tet instead, I think screen readers can also read that text
754
                         //If the link is to another website (but isn't a mailto link) then it will display a default picture we chose to display a default web browser, like the other ones clikcing on it will take you to the link.
769
                         //If the link is to another website (but isn't a mailto link) then it will display a default picture we chose to display a default web browser, like the other ones clikcing on it will take you to the link.
755
                         //If it's none of them then it will not display anything
770
                         //If it's none of them then it will not display anything
756
-                        if(redes.includes("facebook")){
757
-
758
-                            console.log(redes.substring(1,redes.length-2));
759
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
771
+                        if(red1.includes("facebook")) {
772
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
773
+                        }
774
+                        else if(red1.includes("instagram")){
775
+                            
776
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
777
+                        }
778
+                        else if(red1.includes("myspace")){
779
+                            
780
+                            data+='<br><a href="'+ red1.substring(1,red1.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
760
                         }
781
                         }
761
-                        else if(redes.includes("instagram")){
762
-                            console.log(redes.substring(1,redes.length-2));
763
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
782
+
783
+
784
+                        if(red2.includes("facebook")){
785
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/facebook.png" alt="Facebook"style="width:35px;height:35px;border:0;"><br>';
764
                         }
786
                         }
765
-                        else if(redes.includes("myspace")){
766
-                            console.log(redes.substring(1,redes.length-2));
767
-                            data+='<br><a href="'+ redes.substring(1,redes.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
787
+                        else if(red2.includes("instagram")){
788
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/instagram.png" alt="Instagram"style="width:35px;height:35px;border:0;"><br>';
768
                         }
789
                         }
769
-                        else if((redes.includes(".org") || redes.includes(".com")) && !redes.includes("mailto")){
770
-                            redes = redes.substr(redes.indexOf("#")+1,redes.length);
771
-                            redes = redes.substr(0, redes.length-1);
772
-                            console.log(redes);
773
-                            data+='<br><a href="'+ redes + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
790
+                        else if(red2.includes("myspace")){
791
+                            data+='<br><a href="'+ red2.substring(1,red2.length-2) + '"><img src="img/MySpace.png" alt="MySpace"style="width:35px;height:35px;border:0;"><br>';
774
                         }
792
                         }
775
-                        else if(redes.includes("#") || redes.includes("mailto")){
776
-                            console.log("tiene un disparate");
777
-                        } else {
778
-                            console.log("no tiene nada");
793
+
794
+
795
+                        if((ecom.includes(".org") || ecom.includes(".com")) && !ecom.includes("mailto")){
796
+                            ecom = ecom.substr(ecom.indexOf("#")+1,ecom.length);
797
+                            ecom = ecom.substr(0, ecom.length-1);
798
+
799
+                            data+='<br><a href="'+ ecom + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
779
                         }
800
                         }
801
+                        
780
 
802
 
781
                         //This is the part that allows eveything (data) to be displayed
803
                         //This is the part that allows eveything (data) to be displayed
782
                         document.getElementById("all2").innerHTML = `${data}`;
804
                         document.getElementById("all2").innerHTML = `${data}`;