|
@@ -53,13 +53,12 @@
|
53
|
53
|
|
54
|
54
|
<script type="text/javascript" src="js/saveLocal.js"></script>
|
55
|
55
|
|
56
|
|
- <script> console.log(window.localStorage.getItem("MADERA")); </script>
|
57
|
56
|
|
58
|
57
|
|
59
|
|
- <ons-navigator swipeable animation="slide" id="myNavigator">
|
|
58
|
+
|
60
|
59
|
<ons-page>
|
61
|
60
|
<ons-toolbar>
|
62
|
|
- <div class="center">Directorio Artesanal</div>
|
|
61
|
+ <div class="center">Artesanias PR</div>
|
63
|
62
|
<div class="right"><img class="list-item__thumbnail" src="img/ICP.png"></div>
|
64
|
63
|
</ons-toolbar>
|
65
|
64
|
<ons-tabbar swipeable position="bottom" modifier="autogrow">
|
|
@@ -230,7 +229,7 @@
|
230
|
229
|
|
231
|
230
|
//info a pasar
|
232
|
231
|
//'title':'${Artesano.Nombre}','esp': '${info}'
|
233
|
|
- 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"]}', redes: '${Artesano["E-Commerce1"]}', esp: '${Artesano.Especificacion}' } })" tappable>
|
|
232
|
+ 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"]}' } })" tappable>
|
234
|
233
|
<div class="title">${Artesano.Nombre}</div>
|
235
|
234
|
</ons-list-item>`);
|
236
|
235
|
|
|
@@ -367,9 +366,10 @@
|
367
|
366
|
mun = lot[0],
|
368
|
367
|
tel = lot[1],
|
369
|
368
|
email = lot[2],
|
370
|
|
- esp = lot[3];
|
|
369
|
+ esp = lot[3],
|
|
370
|
+ redes = lot[4];
|
371
|
371
|
|
372
|
|
- listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i]}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}'}} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
|
|
372
|
+ listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i]}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', redes: '${redes}'}} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
|
373
|
373
|
}
|
374
|
374
|
|
375
|
375
|
|
|
@@ -475,13 +475,14 @@
|
475
|
475
|
</script>
|
476
|
476
|
|
477
|
477
|
<template id="search.html">
|
|
478
|
+ <ons-navigator swipeable animation="slide" id="SNavigator">
|
478
|
479
|
<ons-page id="Buscar">
|
479
|
480
|
<p style="text-align: center; margin-top: 10px;">
|
480
|
|
- <ons-search-input placeholder="Search anything" id = "searchbar"
|
|
481
|
+ <ons-search-input placeholder="Busqueda en cualquiera" id = "searchbar"
|
481
|
482
|
onkeyup = "filter()"></ons-search-input>
|
482
|
|
- <ons-search-input placeholder="Tipo de artesania" id = "searchartesania"
|
|
483
|
+ <ons-search-input placeholder="Busqueda por artesanias" id = "searchartesania"
|
483
|
484
|
onkeyup = "filter()"></ons-search-input>
|
484
|
|
- <ons-search-input placeholder = "Municipio" id = "searchbarmunicipio"
|
|
485
|
+ <ons-search-input placeholder = "Busqueda por municipio" id = "searchbarmunicipio"
|
485
|
486
|
onkeyup = "filter()"></ons-search-input>
|
486
|
487
|
</p>
|
487
|
488
|
|
|
@@ -491,7 +492,7 @@
|
491
|
492
|
<script>
|
492
|
493
|
for (i = 0; i < all_artesanos.length;i++){
|
493
|
494
|
var artesano = ons.createElement(`<ons-list-item class = "artists"
|
494
|
|
- onclick="myNavigator.pushPage('artesano.html', { data: {title: '${all_artesanos[i].Nombre}', mun: '${all_artesanos[i].Municipio}', tel: '${all_artesanos[i]["Telefono 1"]}', email: '${all_artesanos[i]["E-mail"]}', redes: '${all_artesanos[i]["E-Commerce"]}', esp: '${all_artesanos[i].Especificacion}' } })" tappable>
|
|
495
|
+ onclick="SNavigator.pushPage('artesano.html', { data: {title: '${all_artesanos[i].Nombre}', mun: '${all_artesanos[i].Municipio}', tel: '${all_artesanos[i]["Telefono 1"]}', email: '${all_artesanos[i]["E-mail"]}', esp: '${all_artesanos[i].Especificacion}', redes: '${all_artesanos[i]["E-Commerce 1"]}' } })" tappable>
|
495
|
496
|
<div>${all_artesanos[i].Nombre}</div>
|
496
|
497
|
</ons-list-item>`);
|
497
|
498
|
// var artesano = ons.createElement(`
|
|
@@ -525,7 +526,8 @@
|
525
|
526
|
mun = this.data.mun,
|
526
|
527
|
tel = this.data.tel,
|
527
|
528
|
em = this.data.email,
|
528
|
|
- esp = this.data.esp;
|
|
529
|
+ esp = this.data.esp,
|
|
530
|
+ redes = this.data.redes;
|
529
|
531
|
|
530
|
532
|
email = em.slice(0, em.search("#"));
|
531
|
533
|
if(esp.trim() != ""){
|
|
@@ -555,6 +557,34 @@
|
555
|
557
|
data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
|
556
|
558
|
}
|
557
|
559
|
|
|
560
|
+ console.log("Redes: "+redes);
|
|
561
|
+
|
|
562
|
+ if(redes.includes("facebook")){
|
|
563
|
+
|
|
564
|
+ console.log(redes.substring(1,redes.length-2));
|
|
565
|
+ 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>';
|
|
566
|
+ }
|
|
567
|
+ else if(redes.includes("instagram")){
|
|
568
|
+ console.log(redes.substring(1,redes.length-2));
|
|
569
|
+ 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>';
|
|
570
|
+ }
|
|
571
|
+ else if(redes.includes("myspace")){
|
|
572
|
+ console.log(redes.substring(1,redes.length-2));
|
|
573
|
+ 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>';
|
|
574
|
+ }
|
|
575
|
+ else if((redes.includes(".org") || redes.includes(".com")) && !redes.includes("mailto")){
|
|
576
|
+ redes = redes.substr(redes.indexOf("#")+1,redes.length);
|
|
577
|
+ redes = redes.substr(0, redes.length-1);
|
|
578
|
+ console.log(redes);
|
|
579
|
+ data+='<br><a href="'+ redes + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
|
|
580
|
+ }
|
|
581
|
+ else if(redes.includes("#") || redes.includes("mailto")){
|
|
582
|
+ console.log("tiene un disparate");
|
|
583
|
+ } else {
|
|
584
|
+ console.log("no tiene nada");
|
|
585
|
+ }
|
|
586
|
+
|
|
587
|
+
|
558
|
588
|
document.getElementById("all").innerHTML = `${data}`;
|
559
|
589
|
|
560
|
590
|
}
|
|
@@ -565,6 +595,7 @@
|
565
|
595
|
<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
|
566
|
596
|
|
567
|
597
|
<template id="renglones.html">
|
|
598
|
+ <ons-navigator swipeable animation="slide" id="myNavigator">
|
568
|
599
|
<ons-page id="renglones">
|
569
|
600
|
|
570
|
601
|
<!--div class="search-bar">
|
|
@@ -679,4 +710,4 @@
|
679
|
710
|
<script type="text/javascript" src="cordova.js"></script>
|
680
|
711
|
<script type="text/javascript" src="js/index.js"></script>
|
681
|
712
|
</body>
|
682
|
|
-</html>
|
|
713
|
+</html>
|