lyxaira.glass 4 years ago
parent
commit
80612e6f5f

+ 40
- 40
platforms/browser/www/artesano.html View File

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

+ 3
- 3
platforms/browser/www/js/load.js View File

15
 
15
 
16
 window.fn.pushPage = function (page, anim) {
16
 window.fn.pushPage = function (page, anim) {
17
 
17
 
18
-	//Open and send json file that is equivalent with the especification.
19
-	var artesanos = JSON.parse(window.localStorage.getItem(page.title.toUpperCase()));
18
+  //Open and send json file that is equivalent with the especification.
19
+  var artesanos = JSON.parse(window.localStorage.getItem(page.title.toUpperCase()));
20
 
20
 
21
   if (anim) {
21
   if (anim) {
22
     document.getElementById('myNavigator').pushPage(page.id, { data: { title: page.title, esp: page.esp, json: artesanos } , animation: anim });
22
     document.getElementById('myNavigator').pushPage(page.id, { data: { title: page.title, esp: page.esp, json: artesanos } , animation: anim });
23
   } else {
23
   } else {
24
     document.getElementById('myNavigator').pushPage(page.id, { data: { title: page.title, esp: page.esp, json: artesanos } });
24
     document.getElementById('myNavigator').pushPage(page.id, { data: { title: page.title, esp: page.esp, json: artesanos } });
25
   }
25
   }
26
-};
26
+};

+ 7
- 4
platforms/browser/www/js/renglones.js View File

1
 var info = JSON.parse(window.localStorage.getItem("RENGLONES"));
1
 var info = JSON.parse(window.localStorage.getItem("RENGLONES"));
2
-console.log("TEST!!!");
2
+
3
+
4
+
3
 var list = document.getElementById("list");
5
 var list = document.getElementById("list");
4
 
6
 
5
-console.log(info.length);
6
-  for (var i = 0; i < info.length(); i++) {
7
+  for (var i = 0; i < info.length; i++) {
8
+
9
+          
7
 
10
 
8
           var item = ons.createElement(`<ons-list-item expandable onclick="hideAll()">
11
           var item = ons.createElement(`<ons-list-item expandable onclick="hideAll()">
9
                       <div class="center">${info[i].Renglones}</div>
12
                       <div class="center">${info[i].Renglones}</div>
21
   /*`<ons-card onclick="fn.pushPage({'id':'artesanias.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">
24
   /*`<ons-card onclick="fn.pushPage({'id':'artesanias.html','title':'${info[i].Renglones}','esp': '${info[i].Especificaciones}'})">
22
                         <div class="title">${info[i].Renglones}</div>
25
                         <div class="title">${info[i].Renglones}</div>
23
                         <div class="content"><img class="list-item__thumbnail" src="img/${info[i].Renglones}.png"></div>
26
                         <div class="content"><img class="list-item__thumbnail" src="img/${info[i].Renglones}.png"></div>
24
-                    </ons-card>`*/
27
+                    </ons-card>`*/

+ 1
- 1
platforms/browser/www/js/saveLocal.js View File

38
   }
38
   }
39
   } catch {
39
   } catch {
40
     console.log("error");
40
     console.log("error");
41
-  }
41
+  }