|
@@ -0,0 +1,72 @@
|
|
1
|
+<!DOCTYPE html>
|
|
2
|
+<html>
|
|
3
|
+<head>
|
|
4
|
+ <title>Artesanos</title>
|
|
5
|
+
|
|
6
|
+ <script src="jquery/dist/jquery.min.js">
|
|
7
|
+ </script>
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+</head>
|
|
11
|
+<body>
|
|
12
|
+
|
|
13
|
+ <ons-toolbar>
|
|
14
|
+ <div class="left">
|
|
15
|
+ <ons-back-button>Back</ons-back-button>
|
|
16
|
+ </div>
|
|
17
|
+ </ons-toolbar>
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+ <script type="text/javascript">
|
|
22
|
+ function getUrlVars() {
|
|
23
|
+ var vars = [], hash;
|
|
24
|
+ var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
|
25
|
+ for(var i = 0; i < hashes.length; i++)
|
|
26
|
+ {
|
|
27
|
+ hash = hashes[i].split('=');
|
|
28
|
+ vars.push(hash[0]);
|
|
29
|
+ vars[hash[0]] = hash[1];
|
|
30
|
+ }
|
|
31
|
+ return vars;
|
|
32
|
+ }
|
|
33
|
+
|
|
34
|
+ nombre = decodeURIComponent(getUrlVars()["nombre"]);
|
|
35
|
+ renglon = "json/MADERA.json";
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+ $.getJSON(renglon, function(json) {
|
|
39
|
+ for (i = 0; i < json.length; i++) {
|
|
40
|
+ if (json[i].Nombre == nombre) {
|
|
41
|
+ break;
|
|
42
|
+ }
|
|
43
|
+ }
|
|
44
|
+
|
|
45
|
+ var telefono = "Teléfono 1";
|
|
46
|
+ var clickTel = (((json[i]["Teléfono 1"].replace('(', "")).replace(')', "")).replace('-', "")).replace(' ', "");
|
|
47
|
+
|
|
48
|
+ var email = "E-mail";
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+ document.write("<h1 align='center'>" + json[i].Nombre + "</h1>");
|
|
52
|
+
|
|
53
|
+ document.write("<h2 align='center'>" + json[i].Municipio + "</h1>");
|
|
54
|
+
|
|
55
|
+ document.write("<h2 align='center'>" + json[i].Especificaciones + "</h2>");
|
|
56
|
+
|
|
57
|
+ document.write("<a class='button' href='tel://" + clickTel + "'>" + "<h2 align='center'>" + json[i][telefono] + "</h2>" + "</a>");
|
|
58
|
+
|
|
59
|
+ document.write("<a href='mailto:" + json[i][email] + "'>" + "<h2 align='center'>" + json[i][email] + "</h2>" + "</a>");
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+ });
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+ </script>
|
|
70
|
+
|
|
71
|
+</body>
|
|
72
|
+</html>
|