浏览代码

Merge branch 'Sprint6' of https://git.ccom.uprrp.edu/CCOM4030/artesanias into Sprint6

lyxaira.glass 3 年前
父节点
当前提交
d710c8b2ff

www/img/Barro.jpg → platforms/browser/www/img/BARRO.jpg 查看文件


www/img/Cristal.jpg → platforms/browser/www/img/CRISTAL.jpg 查看文件


www/img/Cuero.jpg → platforms/browser/www/img/CUERO.jpg 查看文件


www/img/Fibras.jpg → platforms/browser/www/img/FIBRAS.jpg 查看文件


www/img/Higüera.jpg → platforms/browser/www/img/HIGÜERA.jpg 查看文件


www/img/Instrumento musical.jpg → platforms/browser/www/img/INSTRUMENTO TÍPICO.jpg 查看文件


www/img/Juguetes tradicional.jpg → platforms/browser/www/img/JUGUETES TRADICIONAL.jpg 查看文件


www/img/Labores en aguja.jpg → platforms/browser/www/img/LABORES EN AGUJA.jpg 查看文件


www/img/Madera.jpg → platforms/browser/www/img/MADERA.jpg 查看文件


www/img/Metal.jpg → platforms/browser/www/img/METAL.jpg 查看文件


www/img/Tabacos.jpg → platforms/browser/www/img/TABACOS.jpg 查看文件


www/img/Textiles.jpg → platforms/browser/www/img/TEXTILES.jpg 查看文件


+ 0
- 711
platforms/browser/www/index.html 查看文件

@@ -1,711 +0,0 @@
1
-<!DOCTYPE html>
2
-<!--
3
-    Licensed to the Apache Software Foundation (ASF) under one
4
-    or more contributor license agreements.  See the NOTICE file
5
-    distributed with this work for additional information
6
-    regarding copyright ownership.  The ASF licenses this file
7
-    to you under the Apache License, Version 2.0 (the
8
-    "License"); you may not use this file except in compliance
9
-    with the License.  You may obtain a copy of the License at
10
-
11
-    http://www.apache.org/licenses/LICENSE-2.0
12
-
13
-    Unless required by applicable law or agreed to in writing,
14
-    software distributed under the License is distributed on an
15
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
-     KIND, either express or implied.  See the License for the
17
-    specific language governing permissions and limitations
18
-    under the License.
19
--->
20
-<html>
21
-    <head>
22
-        <!--
23
-        Customize this policy to fit your own app's needs. For more guidance, see:
24
-            https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy
25
-        Some notes:
26
-            * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
27
-            * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
28
-            * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
29
-                * Enable inline JS: add 'unsafe-inline' to default-src
30
-        -->
31
-        <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' http://* 'unsafe-inline'; script-src 'self' http://* 'unsafe-inline' 'unsafe-eval'" />
32
-        <!--these three for the calendar-->
33
-        <link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
34
-        <link href="css/robotocondensed.css" rel="stylesheet">
35
-        <link rel="stylesheet" href="calendar_files/css/demo.css"/>
36
-        <link rel="stylesheet" href="css/file.css"/>
37
-        <link rel="stylesheet" href="calendar_files/css/theme1.css"/>
38
-        <!--this is for the search bar-->
39
-        <link rel = "stylesheet" href = "css/searchbar1.css">
40
-
41
-        <meta name="format-detection" content="telephone=no">
42
-        <meta name="msapplication-tap-highlight" content="no">
43
-        <meta name="viewport" content="initial-scale=1, width=device-width, height=device, heigth viewport-fit=cover">
44
-        <link rel="stylesheet" type="text/css" href="css/index.css">
45
-        <link rel="stylesheet" href="lib/OnsenUI/css/onsenui.css">
46
-        <link rel="stylesheet" href="lib/OnsenUI/css/onsen-css-components.min.css">
47
-        <script src="lib/OnsenUI/js/onsenui.min.js"></script>
48
-        <script src="js/jquery_.js"></script>
49
-
50
-
51
-    </head>
52
-    <body>
53
-
54
-      <script type="text/javascript" src="js/saveLocal.js">console.log("DATA: "+window.localStorage.getItem("DATE"));</script>
55
-
56
-
57
-        <ons-navigator swipeable animation="slide" id="myNavigator">
58
-           <ons-page>
59
-            <ons-toolbar>
60
-                <div class="center">Directorio Artesanal</div>
61
-                <div class="right"><img class="list-item__thumbnail" src="img/ICP.png"></div>
62
-            </ons-toolbar>
63
-            <ons-tabbar swipeable position="bottom" modifier="autogrow">
64
-                <ons-tab page="home.html" label="Hogar" active></ons-tab>
65
-                <ons-tab page="renglones.html" label="Artesanías"></ons-tab>
66
-                <ons-tab page ="search.html" label="Buscar"> </ons-tab>
67
-                <ons-tab page="ferias.html" label="Eventos"></ons-tab>
68
-                <ons-tab page="instituto.html" label="ICP"></ons-tab>
69
-            </ons-tabbar>
70
-        </ons-page>
71
-        </ons-navigator>
72
-
73
-
74
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
75
-
76
-        <template id="home.html">
77
-
78
-            <ons-page id="home" class="red">
79
-
80
-                <ons-card id="azar">
81
-
82
-                    <!--<div class="title" id="Title"></div>-->
83
-                    <div id="image"></div><br>
84
-                    <div class="content" id="Content"></div>
85
-
86
-                    <script type="text/javascript" src="js/azar.js"> </script>
87
-
88
-                </ons-card>
89
-
90
-
91
-            </ons-page>
92
-
93
-        </template>
94
-
95
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
96
-
97
-        <template id="artesanos.html">
98
-            <ons-page id="artesanos">
99
-
100
-                <ons-toolbar>
101
-                    <div class="left"><ons-back-button>Atrás</ons-back-button></div>
102
-                    <div class="center"></div>
103
-                </ons-toolbar>
104
-
105
-                <ons-pull-hook id="pull-hook" threshold-height="120px">
106
-                    <ons-icon id="pull-hook-icon" size="22px" class="pull-hook-content" icon="fa-arrow-down"></ons-icon>
107
-                </ons-pull-hook>
108
-
109
-                <ons-list id="artesanos-list" src="">
110
-                    <ons-list-header>Artesanos</ons-list-header>
111
-                </ons-list>
112
-
113
-                <script>
114
-
115
-                    ons.getScriptPage().onInit = function () {
116
-                        this.querySelector('ons-toolbar div.center').textContent = this.data.title;
117
-
118
-
119
-                        //var File = this.data.title.toUpperCase() + '.json' ;
120
-                        var Esp = this.data.esp.split(', ');
121
-                        var artesanos_json = this.data.json;
122
-                        console.log(artesanos_json);
123
-
124
-                        //Convertir en mayuscula primera letra del string.
125
-                        for(var i=0; i<Esp.length; i++) {
126
-                            Esp[i] = Esp[i].charAt(0).toUpperCase() + Esp[i].slice(1);
127
-                        };
128
-
129
-                        var pullHook = document.getElementById('pull-hook');
130
-                        var icon = document.getElementById('pull-hook-icon');
131
-                        pullHook.addEventListener('changestate', function (event) {
132
-                            switch (event.state) {
133
-                                case 'initial':
134
-                                    icon.setAttribute('icon', 'fa-arrow-down');
135
-                                    icon.removeAttribute('rotate');
136
-                                    icon.removeAttribute('spin');
137
-                                    break;
138
-                                case 'preaction':
139
-                                    icon.setAttribute('icon', 'fa-arrow-down');
140
-                                    icon.setAttribute('rotate', '180');
141
-                                    icon.removeAttribute('spin');
142
-                                    break;
143
-                                case 'action':
144
-                                    icon.setAttribute('icon', 'fa-spinner');
145
-                                    icon.removeAttribute('rotate');
146
-                                    icon.setAttribute('spin', true);
147
-                                    break;
148
-                            }
149
-                        });
150
-
151
-                        var getArtesania = function (num) {
152
-
153
-                            var Artesanos = ``;
154
-
155
-                            console.log('Filtrado de ',Esp[num])
156
-
157
-                            var results = [];
158
-                            var searchVal = "my Name";
159
-                            for (var i=0 ; i < artesanos_json.length ; i++)
160
-                            {
161
-                                if (artesanos_json[i].Especificaciones.includes(Esp[num])) {
162
-                                    results.push(artesanos_json[i]);
163
-                                }
164
-                            }
165
-
166
-          /*var arr1=artesanos_json.filter(function(item){
167
-              return item.Nombre=="Ana";
168
-          });*/
169
-
170
-                            for(var i=0; i<results.length; i++) {
171
-
172
-                                //if(Esp[num] in artesanos_json.) {}
173
-                                Artesanos=Artesanos+`<a id='home.html'>${results[i].Nombre} | ${results[i].Municipio}<br>`
174
-                                //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
175
-                            }
176
-
177
-
178
-                            return {
179
-                                name: Esp[num],
180
-                                artesan: Artesanos
181
-                            };
182
-                        };
183
-
184
-                        var getData = function () {
185
-                            const data = [];
186
-                            for (var i = 0; i < Esp.length; i++) {
187
-                                data.push(getArtesania(i));
188
-                            }
189
-                            return data;
190
-                        };
191
-
192
-
193
-                        var createArtesano = function (Artesano) {
194
-
195
-                            return ons.createElement(`
196
-              <ons-list-item expandable tappable>
197
-                <div class="center" >${Artesano.Nombre}</div>
198
-                <div class="expandable-content"> Municipio: ${Artesano.Municipio}<br>
199
-                                                 Tel\u00e9fono: ${Artesano["Tel\u00e9fono 1"]}<br>
200
-                                                 Correo Electr\u00f3nico: ${Artesano["E-mail"]}<br>
201
-                                                 </div>
202
-              </ons-list-item>`
203
-                                                    );
204
-                        };
205
-
206
-                        //var Artesanias = getData();
207
-                        //artesanos_json
208
-
209
-                        for (Artesano of artesanos_json) {
210
-
211
-                            var cont = 0;
212
-                            var lista = document.getElementById('artesanos-list');
213
-
214
-                            //Recopilar datos no vacios.
215
-                            if (Artesano.Municipio.trim().length != 0) {
216
-                                cont ++;
217
-                            }
218
-                            if (Artesano["Tel\u00e9fono 1"].trim().length != 0) {
219
-                                cont ++;
220
-                            }
221
-                            if (Artesano["E-mail"].trim().length != 0) {
222
-                                cont ++;
223
-                            }
224
-                            if (Artesano.Especificaciones.trim().length != 0) {
225
-                                cont ++;
226
-                            }
227
-
228
-
229
-                            //info a pasar
230
-                            //'title':'${Artesano.Nombre}','esp': '${info}'
231
-                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre}', mun: '${Artesano.Municipio}', tel: '${Artesano["Tel\u00e9fono 1"]}', email: '${Artesano["E-mail"]}', esp: '${Artesano.Especificaciones}' } })" tappable>
232
-                        <div class="title">${Artesano.Nombre}</div>
233
-                    </ons-list-item>`);
234
-
235
-
236
-                            if(cont == 0){
237
-                                console.log(Artesano.Nombre+' no tiene ningun tipo de informacion.');
238
-                                //return ons.createElement(``);
239
-                            }
240
-                            else {
241
-                                lista.appendChild(item);
242
-                            }
243
-
244
-                        };
245
-
246
-                    };
247
-                </script>
248
-
249
-                <style>
250
-                    .pull-hook-content {
251
-                        color: #333;
252
-                        transition: transform .25s ease-in-out;
253
-                    }
254
-                </style>
255
-
256
-            </ons-page>
257
-
258
-        </template>
259
-
260
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
261
-
262
-         <template id="artesanias.html">
263
-             <ons-page id="artesanias">
264
-
265
-                 <ons-toolbar>
266
-                     <div class="left"><ons-back-button>Atrás</ons-back-button></div>
267
-                     <div class="center"></div>
268
-                 </ons-toolbar>
269
-
270
-                 <ons-pull-hook id="pull-hook" threshold-height="120px">
271
-                     <ons-icon id="pull-hook-icon" size="22px" class="pull-hook-content" icon="fa-arrow-down"></ons-icon>
272
-                 </ons-pull-hook>
273
-
274
-                 <ons-list id="artesania-list" src="">
275
-                     <ons-list-header>Artesanias</ons-list-header>
276
-                 </ons-list>
277
-
278
-                 <script>
279
-
280
-                     ons.getScriptPage().onInit = function () {
281
-                         this.querySelector('ons-toolbar div.center').textContent = this.data.title;
282
-
283
-                         //var File = this.data.title.toUpperCase() + '.json' ;
284
-                         var Esp = this.data.esp.split(', ');
285
-                         var artesanos_json = this.data.json;
286
-
287
-                         //Convertir en mayuscula primera letra del string.
288
-                         for(var i=0; i<Esp.length; i++) {
289
-                             Esp[i] = Esp[i].charAt(0).toUpperCase() + Esp[i].slice(1);
290
-                         };
291
-
292
-                         var pullHook = document.getElementById('pull-hook');
293
-                         var icon = document.getElementById('pull-hook-icon');
294
-                         pullHook.addEventListener('changestate', function (event) {
295
-                             switch (event.state) {
296
-                                 case 'initial':
297
-                                     icon.setAttribute('icon', 'fa-arrow-down');
298
-                                     icon.removeAttribute('rotate');
299
-                                     icon.removeAttribute('spin');
300
-                                     break;
301
-                                 case 'preaction':
302
-                                     icon.setAttribute('icon', 'fa-arrow-down');
303
-                                     icon.setAttribute('rotate', '180');
304
-                                     icon.removeAttribute('spin');
305
-                                     break;
306
-                                 case 'action':
307
-                                     icon.setAttribute('icon', 'fa-spinner');
308
-                                     icon.removeAttribute('rotate');
309
-                                     icon.setAttribute('spin', true);
310
-                                     break;
311
-                             }
312
-                         });
313
-
314
-                         var getArtesania = function (num) {
315
-
316
-                             var Artesanos = ``,
317
-                                 ArtesanosInfo = ``;
318
-
319
-                             //console.log('Filtrado de ',Esp[num])
320
-
321
-                             var results = [];
322
-                             var searchVal = "my Name";
323
-                             for (var i=0 ; i < artesanos_json.length ; i++)
324
-                             {
325
-                                 if (artesanos_json[i].Especificaciones.includes(Esp[num])) {
326
-                                     results.push(artesanos_json[i]);
327
-                                 }
328
-                             }
329
-
330
-                             /*var arr1=artesanos_json.filter(function(item){
331
-                             return item.Nombre=="Ana";
332
-                             });*/
333
-
334
-                             for(var i=0; i<results.length; i++) {
335
-
336
-                                 //if(Esp[num] in artesanos_json.) {}
337
-                                 Artesanos+=`${results[i].Nombre}|`
338
-                                 ArtesanosInfo+=`${results[i].Municipio}|${results[i]["Tel\u00e9fono 1"]}|${results[i]["E-mail"]}|${results[i].Especificaciones}&&`
339
-                                 //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
340
-                             }
341
-
342
-                             return {
343
-                                 name: Esp[num],
344
-                                 artesan: Artesanos,
345
-                                 info: ArtesanosInfo
346
-                             };
347
-                         };
348
-
349
-                         var getData = function () {
350
-                             const data = [];
351
-                             for (var i = 0; i < Esp.length; i++) {
352
-                                 data.push(getArtesania(i));
353
-                             }
354
-                             return data;
355
-                         };
356
-                         var createArtesania = function (Artesania) {
357
-
358
-                             //console.log('Devuelto elemento')
359
-                             var listaArt=``;
360
-                             var arts = Artesania.artesan.split('|');
361
-                             var artsInfo = Artesania.info.split('&&');
362
-
363
-                             for(var i=0; i<arts.length; i++) {
364
-                                 var lot = artsInfo[i].split('|'),
365
-                                     mun = lot[0],
366
-                                     tel = lot[1],
367
-                                     email = lot[2],
368
-                                     esp = lot[3];
369
-
370
-                                 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>`;
371
-                             }
372
-
373
-
374
-                             return ons.createElement(`
375
-              <ons-list-item expandable tappable>
376
-                <div class="center" >${Artesania.name}</div>
377
-                <div class="expandable-content">Artesanos que trabajan con ${Artesania.name}
378
-                <ons-card>${listaArt}</ons-card></div>
379
-                </ons-list-item>`
380
-                                                     );
381
-                         };
382
-
383
-                         var Artesanias = getData();
384
-
385
-                         for (Art of Artesanias) {
386
-
387
-                             var Artesania = createArtesania(Art);
388
-                             document.getElementById('artesania-list').appendChild(Artesania);
389
-                         };
390
-                         pullHook.onAction = function (done) {
391
-
392
-                             setTimeout(function() {
393
-                                 document.getElementById('artesania-list').appendChild(createArtesania(getArtesania()));
394
-                                 done();
395
-                             }, 400);
396
-                         }
397
-
398
-                     };
399
-                 </script>
400
-
401
-                 <style>
402
-                     .pull-hook-content {
403
-                         color: #333;
404
-                         transition: transform .25s ease-in-out;
405
-                     }
406
-                 </style>
407
-             </ons-page>
408
-        </template>
409
-
410
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
411
-
412
-        <template id="artesano.html">
413
-            <ons-page id="artesano">
414
-                <ons-toolbar>
415
-                    <div class="left"><ons-back-button>Atras</ons-back-button></div>
416
-                    <div class="center"></div>
417
-                </ons-toolbar>
418
-                <body>
419
-                    <ons-card id="all"></ons-card>
420
-                </body>
421
-                <script>
422
-                    ons.getScriptPage().onInit = function () {
423
-                        this.querySelector('ons-toolbar div.center').textContent = this.data.title;
424
-
425
-                        var info = ``,
426
-                            mun = this.data.mun,
427
-                            tel = this.data.tel,
428
-                            email = this.data.email,
429
-                            esp = this.data.esp;
430
-
431
-                        if(mun.trim() != '') {
432
-                            info = info + `Municipio: ` + mun + `<br>`;
433
-                        }
434
-                        if(tel.trim() != '') {
435
-                            info = info + `Tel\u00e9fono: <a href="tel:+1` + tel + `">` + tel + `</a><br>`;
436
-                        }
437
-                        if(email.trim() != '') {
438
-                            info = info + `Correo Electr\u00f3nico: ` + email + `<br>`;
439
-                        }
440
-                        if(esp.trim() != '') {
441
-                            info = info + `Trabaja con: ` + esp + `<br>`;
442
-                        }
443
-
444
-                        document.getElementById("all").innerHTML = `${info}`;
445
-
446
-                    }
447
-                </script>
448
-
449
-            </ons-page>
450
-        </template>
451
-
452
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
453
-
454
-        <script>
455
-            var Madera = JSON.parse(window.localStorage.getItem("TODOS"));
456
-            function filter(){
457
-
458
-
459
-                // var request = new XMLHttpRequest()
460
-                // request.open('GET','json/MADERA.json',true)
461
-                // request.onload = function(){
462
-                //   var Madera = JSON.parse(this.response)
463
-                // }
464
-                // request.send()
465
-                // var input = document.getElementById('searchbar').value
466
-                // var firstwood = Madera[0].Nombre
467
-                // ons.notification.alert('Searched for: ' + firstwood)
468
-                var input = document.getElementById('searchbar').value
469
-                var x = document.getElementsByClassName('artists');
470
-                input = input.trim().toLowerCase();
471
-                if (input.length == 0){
472
-                    for (i = 0; Madera.length; i++){
473
-                        x[i].style.display = "list-item";
474
-                    }
475
-                }
476
-                else{
477
-                    var foundesp = 0;
478
-                    for (i = 0; i < Madera.length; i++){
479
-                        console.log("damn")
480
-                        //try checking the especificacion first
481
-                        var especificaciones = Madera[i].Especificaciones1;
482
-                        especificaciones = especificaciones.split(';');
483
-                        for (var j = 0; j < especificaciones.length; j++){
484
-                            var especificacion = especificaciones[j];
485
-                            especificacion = especificacion.trim().toLowerCase();
486
-                            if (input == especificacion){
487
-                                x[i].style.display = "list-item";
488
-                                foundesp = 1;
489
-                                break;
490
-                            }
491
-                            else{
492
-                                x[i].style.display = "none";
493
-                            }
494
-                        }
495
-                    }
496
-                    if (foundesp != 1){
497
-                        input = input.trim().toLowerCase().split(' ')
498
-                        //changing the input into something that can be searched
499
-                        for (var i = 0; i < input.length; i++){
500
-                            input[i] = input[i].charAt(0).toUpperCase() + input[i].slice(1);
501
-                        }
502
-                        console.log(input);
503
-                        for(var i = 0; i < Madera.length; i++){
504
-                            count = 0;
505
-                            artist = Madera[i].Nombre.trim().split(' ');
506
-                            for (k = 0; k < input.length; k++){
507
-                                for (var l = 0; l < artist.length; l++){
508
-                                    if(artist[l] == input[k]){
509
-                                        x[i].style.display = "list-item";
510
-                                        break;
511
-                                    }
512
-                                    else{
513
-                                        x[i].style.display = "none";
514
-                                    }
515
-                                }
516
-                            }
517
-                        }
518
-                    }
519
-                }
520
-            }
521
-        </script>
522
-
523
-        <template id="search.html">
524
-            <ons-page id="Buscar">
525
-
526
-                <p style="text-align: center; margin-top: 10px;">
527
-                    <ons-search-input placeholder="Search" id = "searchbar"
528
-                                      onchange = "filter()"
529
-                                      ></ons-search-input>
530
-                </p>
531
-
532
-                <ons-list id="results" src="">
533
-                </ons-list>
534
-
535
-                <script>
536
-                    for (i = 0; i < Madera.length;i++){
537
-                        var artesano = ons.createElement(`<ons-list-item class = "artists"
538
-                        onclick="myNavigator.pushPage('artesano.html', { data: {title: '${Madera[i].Nombre}', mun: '${Madera[i].Municipio}', tel: '${Madera[i]["Telefono1"]}', email: '${Madera[i]["E-mail1"]}', esp: '${Madera[i].Especificaciones1}' } })" tappable>
539
-                        <div>${Madera[i].Nombre}</div>
540
-                    </ons-list-item>`);
541
-                        // var artesano = ons.createElement(`
542
-                        //   <ons-list-item class = "artists">
543
-                        //     <div class="center" >${Madera[i].Nombre}</div>
544
-                        //   </ons-list-item>`
545
-                        // );
546
-                        document.getElementById('results').appendChild(artesano);
547
-                    }
548
-                </script>
549
-
550
-            </ons-page>
551
-        </template>
552
-
553
-        <!-- ---------------------------------------------------------------------------------------------------------------------------------------- -->
554
-
555
-        <template id= "artesano.html">
556
-            <ons-page id = "artesano">
557
-                <ons-toolbar>
558
-                    <div class = "left"> <ons-back-button> Atras </ons-back-button></div>
559
-                    <div class = "center"></div>
560
-                </ons-toolbar>
561
-                <body>
562
-                    <ons-card id="all"></ons-card>
563
-                </body>
564
-                <script>
565
-                    ons.getScriptPage().onInit = function () {
566
-                        this.querySelector('ons-toolbar div.center').textContent = this.data.title;
567
-
568
-                        var info = ``,
569
-                            mun = this.data.mun,
570
-                            tel = this.data.tel,
571
-                            email = this.data.email,
572
-                            esp = this.data.esp;
573
-
574
-                        if(mun.trim() != '') {
575
-                            info = info + `Municipio: ` + mun + `<br>`;
576
-                        }
577
-                        if(tel.trim() != '') {
578
-                            info = info + `Tel\u00e9fono: <a href="tel:+1` + tel + `">` + tel + `</a><br>`;
579
-                        }
580
-                        if(email.trim() != '') {
581
-                            info = info + `Correo Electr\u00f3nico: ` + email + `<br>`;
582
-                        }
583
-                        if(esp.trim() != '') {
584
-                            info = info + `Trabaja con: ` + esp + `<br>`;
585
-                        }
586
-
587
-                        document.getElementById("all").innerHTML = `${info}`;
588
-
589
-                    }
590
-                </script>
591
-            </ons-page>
592
-        </template>
593
-
594
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
595
-
596
-        <template id="renglones.html">
597
-            <ons-page id="renglones">
598
-
599
-            <!--div class="search-bar">
600
-                 <p style="text-align: center; margin-top: 10px;">
601
-                    <ons-search-input placeholder="Search" onchange="ons.notification.alert('Searched for: ' + this.value)"
602
-           style="width: 96%; margin: 6px auto 6px auto;"></ons-search-input>
603
-                </p>
604
-            </div-->
605
-
606
-            <ons-card id="list">
607
-              <script type="text/javascript" src="js/renglones.js"></script>
608
-            </ons-card>
609
-
610
-                <!--Javascript function to hide other open expandables-->
611
-                <script>
612
-                    const hideAll = () => {
613
-                        Array.from(document.querySelector('#list').children)
614
-                            .forEach(item => {
615
-                                if (item.expanded) {
616
-                                    item.hideExpansion();
617
-                                }
618
-                            });
619
-                        };
620
-                </script>
621
-
622
-                <style>
623
-                    .intro {
624
-                        text-align: center;
625
-                        padding: 20px;
626
-                        margin-top: 30px;
627
-                    }
628
-
629
-                    ons-card {
630
-                        cursor: pointer;
631
-                        color: #333;
632
-                    }
633
-
634
-                    .card__title,
635
-                    .card--material__title {
636
-                        font-size: 15px;
637
-                    }
638
-                </style>
639
-            </ons-page>
640
-
641
-
642
-        </template>
643
-
644
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
645
-
646
-        <template id="ferias.html">
647
-            <ons-page id="ferias">
648
-                <!--<ons-card>
649
-
650
-                <div id = "caleandar" class = "calendar" style="margin-top: 20px;">
651
-                    <script type="text/javascript" src="calendar_files/js/caleandar.js"></script>
652
-                    <script type="text/javascript" src="calendar_files/js/events.js"></script>
653
-                </div>
654
-
655
-                </ons-card>-->
656
-                <br><br><br>
657
-                <button onclick="redirect()">Pasar a la pagina de eventos</button>
658
-
659
-              <script>
660
-              function redirect() {
661
-                location.replace("https://facebook.com/icppr")
662
-              }
663
-              </script>
664
-            </ons-page>
665
-        </template>
666
-
667
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
668
-
669
-        <template id="instituto.html">
670
-            <ons-page id="instituto">
671
-                <ons-card>
672
-
673
-                    <h1>Instituto de Cultura Puertorriqueña</h1>
674
-                    <h3>Ven, descubre lo que nuestra riqueza cultural puertorriqueña tiene para tí.<br> Disfrútala, es tu identidad.
675
-                    </h3>
676
-
677
-                    <body>
678
-                        <br>
679
-                        El Instituto de Cultura Puertorriqueña (ICP) tiene como misión investigar, conservar, promover y divulgar la cultura puertorriqueña en su diversidad y complejidad. Con la memoria y la promesa de la cultura, los distintos niveles, sectores, edades e intereses de la comunidad crean el conjunto de modos de vida, costumbres y manifestaciones artísticas que nos identifica como país. El ICP existe para preservar y divulgar estos saberes, difundir internacionalmente nuestro talento y enriquecer el amor a lo propio.
680
-                        <br><br>
681
-                        Nuestras tradiciones no son rígidos objetos de museo, sino actividades vivas en constante renovación y reapropiación, según van también desarrollándose nuevas tradiciones. El respeto a la diversidad, a lo híbrido, a lo apropiado y a lo replanteado también son parte esencial de esta institución que busca activamente la colaboración de todos en un quehacer que debe ser siempre compartido de la mano con su ingente diversidad.
682
-                        <br><br>
683
-                        Prof. Carlos R. Ruiz Cortés<br>
684
-                        Director Ejecutivo<br>
685
-                        Instituto de Cultura Puertorriqueña<br>
686
-                        Directorio Artesanal Cultural PR <img src="img/gobierno.png" style="width:35px;height:35px;border:0;">
687
-                        <br><br>
688
-                    </body>
689
-
690
-
691
-                    Visita nuestra <a href="https://www.icp.pr.gov/">Página Web</a> o síguenos en nuestras redes sociales: <br>
692
-                    <a href="https://twitter.com/icppr"><img src="img/twitter.png" alt="Twitter" style="width:35px;height:35px;border:0;">
693
-                    </a>
694
-                    <a href="https://facebook.com/icppr"><img src="img/facebook.png" alt="Facebook" style="width:35px;height:35px;border:0;">
695
-                    </a>
696
-                    <a href="https://youtube.com/user/icppr"><img src="img/youtube.png" alt="Youtube" style="width:35px;height:35px;border:0;">
697
-                    </a>
698
-                    <a href="https://instagram.com/icppr"><img src="img/instagram.png" alt="Instagram" style="width:35px;height:35px;border:0;">
699
-                    </a>
700
-                    <!--</div>
701
-                <!--</p>-->
702
-                </ons-card>
703
-            </ons-page>
704
-        </template>
705
-
706
-  <script src="js/load.js"></script>
707
-
708
-        <script type="text/javascript" src="cordova.js"></script>
709
-        <script type="text/javascript" src="js/index.js"></script>
710
-    </body>
711
-</html>

+ 2
- 1
platforms/browser/www/js/saveLocal.js 查看文件

@@ -28,9 +28,10 @@ try {
28 28
   if (checkDate() == false) {
29 29
 
30 30
     window.localStorage.setItem("RENGLONES", loadFile("https://136.145.181.12/renglones.json"));
31
+    window.localStorage.setItem("TODOS", loadFile("https://136.145.181.12/artesanias.json"))
31 32
 
32 33
     var renglones = JSON.parse(window.localStorage.getItem("RENGLONES"));
33
-    console.log(renglones);
34
+
34 35
     for (var i = 0; i < renglones.length; i++) {
35 36
       window.localStorage.setItem(renglones[i].Renglones, loadFile("https://136.145.181.12/" + renglones[i].Renglones + ".json"));
36 37
     }

platforms/browser/www/img/Barro.jpg → www/img/BARRO.jpg 查看文件


platforms/browser/www/img/Cristal.jpg → www/img/CRISTAL.jpg 查看文件


platforms/browser/www/img/Cuero.jpg → www/img/CUERO.jpg 查看文件


platforms/browser/www/img/Fibras.jpg → www/img/FIBRAS.jpg 查看文件


platforms/browser/www/img/Higüera.jpg → www/img/HIGÜERA.jpg 查看文件


platforms/browser/www/img/Instrumento musical.jpg → www/img/INSTRUMENTO TÍPICO.jpg 查看文件


platforms/browser/www/img/Juguetes tradicional.jpg → www/img/JUGUETES TRADICIONAL.jpg 查看文件


platforms/browser/www/img/Labores en aguja.jpg → www/img/LABORES EN AGUJA.jpg 查看文件


platforms/browser/www/img/Madera.jpg → www/img/MADERA.jpg 查看文件


platforms/browser/www/img/Metal.jpg → www/img/METAL.jpg 查看文件


platforms/browser/www/img/Tabacos.jpg → www/img/TABACOS.jpg 查看文件


platforms/browser/www/img/Textiles.jpg → www/img/TEXTILES.jpg 查看文件


+ 0
- 711
www/index.html 查看文件

@@ -1,711 +0,0 @@
1
-<!DOCTYPE html>
2
-<!--
3
-    Licensed to the Apache Software Foundation (ASF) under one
4
-    or more contributor license agreements.  See the NOTICE file
5
-    distributed with this work for additional information
6
-    regarding copyright ownership.  The ASF licenses this file
7
-    to you under the Apache License, Version 2.0 (the
8
-    "License"); you may not use this file except in compliance
9
-    with the License.  You may obtain a copy of the License at
10
-
11
-    http://www.apache.org/licenses/LICENSE-2.0
12
-
13
-    Unless required by applicable law or agreed to in writing,
14
-    software distributed under the License is distributed on an
15
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
-     KIND, either express or implied.  See the License for the
17
-    specific language governing permissions and limitations
18
-    under the License.
19
--->
20
-<html>
21
-    <head>
22
-        <!--
23
-        Customize this policy to fit your own app's needs. For more guidance, see:
24
-            https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy
25
-        Some notes:
26
-            * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
27
-            * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
28
-            * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
29
-                * Enable inline JS: add 'unsafe-inline' to default-src
30
-        -->
31
-        <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' http://* 'unsafe-inline'; script-src 'self' http://* 'unsafe-inline' 'unsafe-eval'" />
32
-        <!--these three for the calendar-->
33
-        <link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
34
-        <link href="css/robotocondensed.css" rel="stylesheet">
35
-        <link rel="stylesheet" href="calendar_files/css/demo.css"/>
36
-        <link rel="stylesheet" href="css/file.css"/>
37
-        <link rel="stylesheet" href="calendar_files/css/theme1.css"/>
38
-        <!--this is for the search bar-->
39
-        <link rel = "stylesheet" href = "css/searchbar1.css">
40
-
41
-        <meta name="format-detection" content="telephone=no">
42
-        <meta name="msapplication-tap-highlight" content="no">
43
-        <meta name="viewport" content="initial-scale=1, width=device-width, height=device, heigth viewport-fit=cover">
44
-        <link rel="stylesheet" type="text/css" href="css/index.css">
45
-        <link rel="stylesheet" href="lib/OnsenUI/css/onsenui.css">
46
-        <link rel="stylesheet" href="lib/OnsenUI/css/onsen-css-components.min.css">
47
-        <script src="lib/OnsenUI/js/onsenui.min.js"></script>
48
-        <script src="js/jquery_.js"></script>
49
-
50
-
51
-    </head>
52
-    <body>
53
-
54
-      <script type="text/javascript" src="js/saveLocal.js">console.log("DATA: "+window.localStorage.getItem("DATE"));</script>
55
-
56
-
57
-        <ons-navigator swipeable animation="slide" id="myNavigator">
58
-           <ons-page>
59
-            <ons-toolbar>
60
-                <div class="center">Directorio Artesanal</div>
61
-                <div class="right"><img class="list-item__thumbnail" src="img/ICP.png"></div>
62
-            </ons-toolbar>
63
-            <ons-tabbar swipeable position="bottom" modifier="autogrow">
64
-                <ons-tab page="home.html" label="Hogar" active></ons-tab>
65
-                <ons-tab page="renglones.html" label="Artesanías"></ons-tab>
66
-                <ons-tab page ="search.html" label="Buscar"> </ons-tab>
67
-                <ons-tab page="ferias.html" label="Eventos"></ons-tab>
68
-                <ons-tab page="instituto.html" label="ICP"></ons-tab>
69
-            </ons-tabbar>
70
-        </ons-page>
71
-        </ons-navigator>
72
-
73
-
74
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
75
-
76
-        <template id="home.html">
77
-
78
-            <ons-page id="home" class="red">
79
-
80
-                <ons-card id="azar">
81
-
82
-                    <!--<div class="title" id="Title"></div>-->
83
-                    <div id="image"></div><br>
84
-                    <div class="content" id="Content"></div>
85
-
86
-                    <script type="text/javascript" src="js/azar.js"> </script>
87
-
88
-                </ons-card>
89
-
90
-
91
-            </ons-page>
92
-
93
-        </template>
94
-
95
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
96
-
97
-        <template id="artesanos.html">
98
-            <ons-page id="artesanos">
99
-
100
-                <ons-toolbar>
101
-                    <div class="left"><ons-back-button>Atrás</ons-back-button></div>
102
-                    <div class="center"></div>
103
-                </ons-toolbar>
104
-
105
-                <ons-pull-hook id="pull-hook" threshold-height="120px">
106
-                    <ons-icon id="pull-hook-icon" size="22px" class="pull-hook-content" icon="fa-arrow-down"></ons-icon>
107
-                </ons-pull-hook>
108
-
109
-                <ons-list id="artesanos-list" src="">
110
-                    <ons-list-header>Artesanos</ons-list-header>
111
-                </ons-list>
112
-
113
-                <script>
114
-
115
-                    ons.getScriptPage().onInit = function () {
116
-                        this.querySelector('ons-toolbar div.center').textContent = this.data.title;
117
-
118
-
119
-                        //var File = this.data.title.toUpperCase() + '.json' ;
120
-                        var Esp = this.data.esp.split(', ');
121
-                        var artesanos_json = this.data.json;
122
-                        console.log(artesanos_json);
123
-
124
-                        //Convertir en mayuscula primera letra del string.
125
-                        for(var i=0; i<Esp.length; i++) {
126
-                            Esp[i] = Esp[i].charAt(0).toUpperCase() + Esp[i].slice(1);
127
-                        };
128
-
129
-                        var pullHook = document.getElementById('pull-hook');
130
-                        var icon = document.getElementById('pull-hook-icon');
131
-                        pullHook.addEventListener('changestate', function (event) {
132
-                            switch (event.state) {
133
-                                case 'initial':
134
-                                    icon.setAttribute('icon', 'fa-arrow-down');
135
-                                    icon.removeAttribute('rotate');
136
-                                    icon.removeAttribute('spin');
137
-                                    break;
138
-                                case 'preaction':
139
-                                    icon.setAttribute('icon', 'fa-arrow-down');
140
-                                    icon.setAttribute('rotate', '180');
141
-                                    icon.removeAttribute('spin');
142
-                                    break;
143
-                                case 'action':
144
-                                    icon.setAttribute('icon', 'fa-spinner');
145
-                                    icon.removeAttribute('rotate');
146
-                                    icon.setAttribute('spin', true);
147
-                                    break;
148
-                            }
149
-                        });
150
-
151
-                        var getArtesania = function (num) {
152
-
153
-                            var Artesanos = ``;
154
-
155
-                            console.log('Filtrado de ',Esp[num])
156
-
157
-                            var results = [];
158
-                            var searchVal = "my Name";
159
-                            for (var i=0 ; i < artesanos_json.length ; i++)
160
-                            {
161
-                                if (artesanos_json[i].Especificaciones.includes(Esp[num])) {
162
-                                    results.push(artesanos_json[i]);
163
-                                }
164
-                            }
165
-
166
-          /*var arr1=artesanos_json.filter(function(item){
167
-              return item.Nombre=="Ana";
168
-          });*/
169
-
170
-                            for(var i=0; i<results.length; i++) {
171
-
172
-                                //if(Esp[num] in artesanos_json.) {}
173
-                                Artesanos=Artesanos+`<a id='home.html'>${results[i].Nombre} | ${results[i].Municipio}<br>`
174
-                                //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
175
-                            }
176
-
177
-
178
-                            return {
179
-                                name: Esp[num],
180
-                                artesan: Artesanos
181
-                            };
182
-                        };
183
-
184
-                        var getData = function () {
185
-                            const data = [];
186
-                            for (var i = 0; i < Esp.length; i++) {
187
-                                data.push(getArtesania(i));
188
-                            }
189
-                            return data;
190
-                        };
191
-
192
-
193
-                        var createArtesano = function (Artesano) {
194
-
195
-                            return ons.createElement(`
196
-              <ons-list-item expandable tappable>
197
-                <div class="center" >${Artesano.Nombre}</div>
198
-                <div class="expandable-content"> Municipio: ${Artesano.Municipio}<br>
199
-                                                 Tel\u00e9fono: ${Artesano["Tel\u00e9fono 1"]}<br>
200
-                                                 Correo Electr\u00f3nico: ${Artesano["E-mail"]}<br>
201
-                                                 </div>
202
-              </ons-list-item>`
203
-                                                    );
204
-                        };
205
-
206
-                        //var Artesanias = getData();
207
-                        //artesanos_json
208
-
209
-                        for (Artesano of artesanos_json) {
210
-
211
-                            var cont = 0;
212
-                            var lista = document.getElementById('artesanos-list');
213
-
214
-                            //Recopilar datos no vacios.
215
-                            if (Artesano.Municipio.trim().length != 0) {
216
-                                cont ++;
217
-                            }
218
-                            if (Artesano["Tel\u00e9fono 1"].trim().length != 0) {
219
-                                cont ++;
220
-                            }
221
-                            if (Artesano["E-mail"].trim().length != 0) {
222
-                                cont ++;
223
-                            }
224
-                            if (Artesano.Especificaciones.trim().length != 0) {
225
-                                cont ++;
226
-                            }
227
-
228
-
229
-                            //info a pasar
230
-                            //'title':'${Artesano.Nombre}','esp': '${info}'
231
-                            var item = ons.createElement(`<ons-list-item onclick="myNavigator.pushPage('artesano.html', { data: { title: '${Artesano.Nombre}', mun: '${Artesano.Municipio}', tel: '${Artesano["Tel\u00e9fono 1"]}', email: '${Artesano["E-mail"]}', esp: '${Artesano.Especificaciones}' } })" tappable>
232
-                        <div class="title">${Artesano.Nombre}</div>
233
-                    </ons-list-item>`);
234
-
235
-
236
-                            if(cont == 0){
237
-                                console.log(Artesano.Nombre+' no tiene ningun tipo de informacion.');
238
-                                //return ons.createElement(``);
239
-                            }
240
-                            else {
241
-                                lista.appendChild(item);
242
-                            }
243
-
244
-                        };
245
-
246
-                    };
247
-                </script>
248
-
249
-                <style>
250
-                    .pull-hook-content {
251
-                        color: #333;
252
-                        transition: transform .25s ease-in-out;
253
-                    }
254
-                </style>
255
-
256
-            </ons-page>
257
-
258
-        </template>
259
-
260
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
261
-
262
-         <template id="artesanias.html">
263
-             <ons-page id="artesanias">
264
-
265
-                 <ons-toolbar>
266
-                     <div class="left"><ons-back-button>Atrás</ons-back-button></div>
267
-                     <div class="center"></div>
268
-                 </ons-toolbar>
269
-
270
-                 <ons-pull-hook id="pull-hook" threshold-height="120px">
271
-                     <ons-icon id="pull-hook-icon" size="22px" class="pull-hook-content" icon="fa-arrow-down"></ons-icon>
272
-                 </ons-pull-hook>
273
-
274
-                 <ons-list id="artesania-list" src="">
275
-                     <ons-list-header>Artesanias</ons-list-header>
276
-                 </ons-list>
277
-
278
-                 <script>
279
-
280
-                     ons.getScriptPage().onInit = function () {
281
-                         this.querySelector('ons-toolbar div.center').textContent = this.data.title;
282
-
283
-                         //var File = this.data.title.toUpperCase() + '.json' ;
284
-                         var Esp = this.data.esp.split(', ');
285
-                         var artesanos_json = this.data.json;
286
-
287
-                         //Convertir en mayuscula primera letra del string.
288
-                         for(var i=0; i<Esp.length; i++) {
289
-                             Esp[i] = Esp[i].charAt(0).toUpperCase() + Esp[i].slice(1);
290
-                         };
291
-
292
-                         var pullHook = document.getElementById('pull-hook');
293
-                         var icon = document.getElementById('pull-hook-icon');
294
-                         pullHook.addEventListener('changestate', function (event) {
295
-                             switch (event.state) {
296
-                                 case 'initial':
297
-                                     icon.setAttribute('icon', 'fa-arrow-down');
298
-                                     icon.removeAttribute('rotate');
299
-                                     icon.removeAttribute('spin');
300
-                                     break;
301
-                                 case 'preaction':
302
-                                     icon.setAttribute('icon', 'fa-arrow-down');
303
-                                     icon.setAttribute('rotate', '180');
304
-                                     icon.removeAttribute('spin');
305
-                                     break;
306
-                                 case 'action':
307
-                                     icon.setAttribute('icon', 'fa-spinner');
308
-                                     icon.removeAttribute('rotate');
309
-                                     icon.setAttribute('spin', true);
310
-                                     break;
311
-                             }
312
-                         });
313
-
314
-                         var getArtesania = function (num) {
315
-
316
-                             var Artesanos = ``,
317
-                                 ArtesanosInfo = ``;
318
-
319
-                             //console.log('Filtrado de ',Esp[num])
320
-
321
-                             var results = [];
322
-                             var searchVal = "my Name";
323
-                             for (var i=0 ; i < artesanos_json.length ; i++)
324
-                             {
325
-                                 if (artesanos_json[i].Especificaciones.includes(Esp[num])) {
326
-                                     results.push(artesanos_json[i]);
327
-                                 }
328
-                             }
329
-
330
-                             /*var arr1=artesanos_json.filter(function(item){
331
-                             return item.Nombre=="Ana";
332
-                             });*/
333
-
334
-                             for(var i=0; i<results.length; i++) {
335
-
336
-                                 //if(Esp[num] in artesanos_json.) {}
337
-                                 Artesanos+=`${results[i].Nombre}|`
338
-                                 ArtesanosInfo+=`${results[i].Municipio}|${results[i]["Tel\u00e9fono 1"]}|${results[i]["E-mail"]}|${results[i].Especificaciones}&&`
339
-                                 //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
340
-                             }
341
-
342
-                             return {
343
-                                 name: Esp[num],
344
-                                 artesan: Artesanos,
345
-                                 info: ArtesanosInfo
346
-                             };
347
-                         };
348
-
349
-                         var getData = function () {
350
-                             const data = [];
351
-                             for (var i = 0; i < Esp.length; i++) {
352
-                                 data.push(getArtesania(i));
353
-                             }
354
-                             return data;
355
-                         };
356
-                         var createArtesania = function (Artesania) {
357
-
358
-                             //console.log('Devuelto elemento')
359
-                             var listaArt=``;
360
-                             var arts = Artesania.artesan.split('|');
361
-                             var artsInfo = Artesania.info.split('&&');
362
-
363
-                             for(var i=0; i<arts.length; i++) {
364
-                                 var lot = artsInfo[i].split('|'),
365
-                                     mun = lot[0],
366
-                                     tel = lot[1],
367
-                                     email = lot[2],
368
-                                     esp = lot[3];
369
-
370
-                                 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>`;
371
-                             }
372
-
373
-
374
-                             return ons.createElement(`
375
-              <ons-list-item expandable tappable>
376
-                <div class="center" >${Artesania.name}</div>
377
-                <div class="expandable-content">Artesanos que trabajan con ${Artesania.name}
378
-                <ons-card>${listaArt}</ons-card></div>
379
-                </ons-list-item>`
380
-                                                     );
381
-                         };
382
-
383
-                         var Artesanias = getData();
384
-
385
-                         for (Art of Artesanias) {
386
-
387
-                             var Artesania = createArtesania(Art);
388
-                             document.getElementById('artesania-list').appendChild(Artesania);
389
-                         };
390
-                         pullHook.onAction = function (done) {
391
-
392
-                             setTimeout(function() {
393
-                                 document.getElementById('artesania-list').appendChild(createArtesania(getArtesania()));
394
-                                 done();
395
-                             }, 400);
396
-                         }
397
-
398
-                     };
399
-                 </script>
400
-
401
-                 <style>
402
-                     .pull-hook-content {
403
-                         color: #333;
404
-                         transition: transform .25s ease-in-out;
405
-                     }
406
-                 </style>
407
-             </ons-page>
408
-        </template>
409
-
410
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
411
-
412
-        <template id="artesano.html">
413
-            <ons-page id="artesano">
414
-                <ons-toolbar>
415
-                    <div class="left"><ons-back-button>Atras</ons-back-button></div>
416
-                    <div class="center"></div>
417
-                </ons-toolbar>
418
-                <body>
419
-                    <ons-card id="all"></ons-card>
420
-                </body>
421
-                <script>
422
-                    ons.getScriptPage().onInit = function () {
423
-                        this.querySelector('ons-toolbar div.center').textContent = this.data.title;
424
-
425
-                        var info = ``,
426
-                            mun = this.data.mun,
427
-                            tel = this.data.tel,
428
-                            email = this.data.email,
429
-                            esp = this.data.esp;
430
-
431
-                        if(mun.trim() != '') {
432
-                            info = info + `Municipio: ` + mun + `<br>`;
433
-                        }
434
-                        if(tel.trim() != '') {
435
-                            info = info + `Tel\u00e9fono: <a href="tel:+1` + tel + `">` + tel + `</a><br>`;
436
-                        }
437
-                        if(email.trim() != '') {
438
-                            info = info + `Correo Electr\u00f3nico: ` + email + `<br>`;
439
-                        }
440
-                        if(esp.trim() != '') {
441
-                            info = info + `Trabaja con: ` + esp + `<br>`;
442
-                        }
443
-
444
-                        document.getElementById("all").innerHTML = `${info}`;
445
-
446
-                    }
447
-                </script>
448
-
449
-            </ons-page>
450
-        </template>
451
-
452
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
453
-
454
-        <script>
455
-            var Madera = JSON.parse(window.localStorage.getItem("TODOS"));
456
-            function filter(){
457
-
458
-
459
-                // var request = new XMLHttpRequest()
460
-                // request.open('GET','json/MADERA.json',true)
461
-                // request.onload = function(){
462
-                //   var Madera = JSON.parse(this.response)
463
-                // }
464
-                // request.send()
465
-                // var input = document.getElementById('searchbar').value
466
-                // var firstwood = Madera[0].Nombre
467
-                // ons.notification.alert('Searched for: ' + firstwood)
468
-                var input = document.getElementById('searchbar').value
469
-                var x = document.getElementsByClassName('artists');
470
-                input = input.trim().toLowerCase();
471
-                if (input.length == 0){
472
-                    for (i = 0; Madera.length; i++){
473
-                        x[i].style.display = "list-item";
474
-                    }
475
-                }
476
-                else{
477
-                    var foundesp = 0;
478
-                    for (i = 0; i < Madera.length; i++){
479
-                        console.log("damn")
480
-                        //try checking the especificacion first
481
-                        var especificaciones = Madera[i].Especificaciones1;
482
-                        especificaciones = especificaciones.split(';');
483
-                        for (var j = 0; j < especificaciones.length; j++){
484
-                            var especificacion = especificaciones[j];
485
-                            especificacion = especificacion.trim().toLowerCase();
486
-                            if (input == especificacion){
487
-                                x[i].style.display = "list-item";
488
-                                foundesp = 1;
489
-                                break;
490
-                            }
491
-                            else{
492
-                                x[i].style.display = "none";
493
-                            }
494
-                        }
495
-                    }
496
-                    if (foundesp != 1){
497
-                        input = input.trim().toLowerCase().split(' ')
498
-                        //changing the input into something that can be searched
499
-                        for (var i = 0; i < input.length; i++){
500
-                            input[i] = input[i].charAt(0).toUpperCase() + input[i].slice(1);
501
-                        }
502
-                        console.log(input);
503
-                        for(var i = 0; i < Madera.length; i++){
504
-                            count = 0;
505
-                            artist = Madera[i].Nombre.trim().split(' ');
506
-                            for (k = 0; k < input.length; k++){
507
-                                for (var l = 0; l < artist.length; l++){
508
-                                    if(artist[l] == input[k]){
509
-                                        x[i].style.display = "list-item";
510
-                                        break;
511
-                                    }
512
-                                    else{
513
-                                        x[i].style.display = "none";
514
-                                    }
515
-                                }
516
-                            }
517
-                        }
518
-                    }
519
-                }
520
-            }
521
-        </script>
522
-
523
-        <template id="search.html">
524
-            <ons-page id="Buscar">
525
-
526
-                <p style="text-align: center; margin-top: 10px;">
527
-                    <ons-search-input placeholder="Search" id = "searchbar"
528
-                                      onchange = "filter()"
529
-                                      ></ons-search-input>
530
-                </p>
531
-
532
-                <ons-list id="results" src="">
533
-                </ons-list>
534
-
535
-                <script>
536
-                    for (i = 0; i < Madera.length;i++){
537
-                        var artesano = ons.createElement(`<ons-list-item class = "artists"
538
-                        onclick="myNavigator.pushPage('artesano.html', { data: {title: '${Madera[i].Nombre}', mun: '${Madera[i].Municipio}', tel: '${Madera[i]["Telefono1"]}', email: '${Madera[i]["E-mail1"]}', esp: '${Madera[i].Especificaciones1}' } })" tappable>
539
-                        <div>${Madera[i].Nombre}</div>
540
-                    </ons-list-item>`);
541
-                        // var artesano = ons.createElement(`
542
-                        //   <ons-list-item class = "artists">
543
-                        //     <div class="center" >${Madera[i].Nombre}</div>
544
-                        //   </ons-list-item>`
545
-                        // );
546
-                        document.getElementById('results').appendChild(artesano);
547
-                    }
548
-                </script>
549
-
550
-            </ons-page>
551
-        </template>
552
-
553
-        <!-- ---------------------------------------------------------------------------------------------------------------------------------------- -->
554
-
555
-        <template id= "artesano.html">
556
-            <ons-page id = "artesano">
557
-                <ons-toolbar>
558
-                    <div class = "left"> <ons-back-button> Atras </ons-back-button></div>
559
-                    <div class = "center"></div>
560
-                </ons-toolbar>
561
-                <body>
562
-                    <ons-card id="all"></ons-card>
563
-                </body>
564
-                <script>
565
-                    ons.getScriptPage().onInit = function () {
566
-                        this.querySelector('ons-toolbar div.center').textContent = this.data.title;
567
-
568
-                        var info = ``,
569
-                            mun = this.data.mun,
570
-                            tel = this.data.tel,
571
-                            email = this.data.email,
572
-                            esp = this.data.esp;
573
-
574
-                        if(mun.trim() != '') {
575
-                            info = info + `Municipio: ` + mun + `<br>`;
576
-                        }
577
-                        if(tel.trim() != '') {
578
-                            info = info + `Tel\u00e9fono: <a href="tel:+1` + tel + `">` + tel + `</a><br>`;
579
-                        }
580
-                        if(email.trim() != '') {
581
-                            info = info + `Correo Electr\u00f3nico: ` + email + `<br>`;
582
-                        }
583
-                        if(esp.trim() != '') {
584
-                            info = info + `Trabaja con: ` + esp + `<br>`;
585
-                        }
586
-
587
-                        document.getElementById("all").innerHTML = `${info}`;
588
-
589
-                    }
590
-                </script>
591
-            </ons-page>
592
-        </template>
593
-
594
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
595
-
596
-        <template id="renglones.html">
597
-            <ons-page id="renglones">
598
-
599
-            <!--div class="search-bar">
600
-                 <p style="text-align: center; margin-top: 10px;">
601
-                    <ons-search-input placeholder="Search" onchange="ons.notification.alert('Searched for: ' + this.value)"
602
-           style="width: 96%; margin: 6px auto 6px auto;"></ons-search-input>
603
-                </p>
604
-            </div-->
605
-
606
-            <ons-card id="list">
607
-              <script type="text/javascript" src="js/renglones.js"></script>
608
-            </ons-card>
609
-
610
-                <!--Javascript function to hide other open expandables-->
611
-                <script>
612
-                    const hideAll = () => {
613
-                        Array.from(document.querySelector('#list').children)
614
-                            .forEach(item => {
615
-                                if (item.expanded) {
616
-                                    item.hideExpansion();
617
-                                }
618
-                            });
619
-                        };
620
-                </script>
621
-
622
-                <style>
623
-                    .intro {
624
-                        text-align: center;
625
-                        padding: 20px;
626
-                        margin-top: 30px;
627
-                    }
628
-
629
-                    ons-card {
630
-                        cursor: pointer;
631
-                        color: #333;
632
-                    }
633
-
634
-                    .card__title,
635
-                    .card--material__title {
636
-                        font-size: 15px;
637
-                    }
638
-                </style>
639
-            </ons-page>
640
-
641
-
642
-        </template>
643
-
644
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
645
-
646
-        <template id="ferias.html">
647
-            <ons-page id="ferias">
648
-                <!--<ons-card>
649
-
650
-                <div id = "caleandar" class = "calendar" style="margin-top: 20px;">
651
-                    <script type="text/javascript" src="calendar_files/js/caleandar.js"></script>
652
-                    <script type="text/javascript" src="calendar_files/js/events.js"></script>
653
-                </div>
654
-
655
-                </ons-card>-->
656
-                <br><br><br>
657
-                <button onclick="redirect()">Pasar a la pagina de eventos</button>
658
-
659
-              <script>
660
-              function redirect() {
661
-                location.replace("https://facebook.com/icppr")
662
-              }
663
-              </script>
664
-            </ons-page>
665
-        </template>
666
-
667
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
668
-
669
-        <template id="instituto.html">
670
-            <ons-page id="instituto">
671
-                <ons-card>
672
-
673
-                    <h1>Instituto de Cultura Puertorriqueña</h1>
674
-                    <h3>Ven, descubre lo que nuestra riqueza cultural puertorriqueña tiene para tí.<br> Disfrútala, es tu identidad.
675
-                    </h3>
676
-
677
-                    <body>
678
-                        <br>
679
-                        El Instituto de Cultura Puertorriqueña (ICP) tiene como misión investigar, conservar, promover y divulgar la cultura puertorriqueña en su diversidad y complejidad. Con la memoria y la promesa de la cultura, los distintos niveles, sectores, edades e intereses de la comunidad crean el conjunto de modos de vida, costumbres y manifestaciones artísticas que nos identifica como país. El ICP existe para preservar y divulgar estos saberes, difundir internacionalmente nuestro talento y enriquecer el amor a lo propio.
680
-                        <br><br>
681
-                        Nuestras tradiciones no son rígidos objetos de museo, sino actividades vivas en constante renovación y reapropiación, según van también desarrollándose nuevas tradiciones. El respeto a la diversidad, a lo híbrido, a lo apropiado y a lo replanteado también son parte esencial de esta institución que busca activamente la colaboración de todos en un quehacer que debe ser siempre compartido de la mano con su ingente diversidad.
682
-                        <br><br>
683
-                        Prof. Carlos R. Ruiz Cortés<br>
684
-                        Director Ejecutivo<br>
685
-                        Instituto de Cultura Puertorriqueña<br>
686
-                        Directorio Artesanal Cultural PR <img src="img/gobierno.png" style="width:35px;height:35px;border:0;">
687
-                        <br><br>
688
-                    </body>
689
-
690
-
691
-                    Visita nuestra <a href="https://www.icp.pr.gov/">Página Web</a> o síguenos en nuestras redes sociales: <br>
692
-                    <a href="https://twitter.com/icppr"><img src="img/twitter.png" alt="Twitter" style="width:35px;height:35px;border:0;">
693
-                    </a>
694
-                    <a href="https://facebook.com/icppr"><img src="img/facebook.png" alt="Facebook" style="width:35px;height:35px;border:0;">
695
-                    </a>
696
-                    <a href="https://youtube.com/user/icppr"><img src="img/youtube.png" alt="Youtube" style="width:35px;height:35px;border:0;">
697
-                    </a>
698
-                    <a href="https://instagram.com/icppr"><img src="img/instagram.png" alt="Instagram" style="width:35px;height:35px;border:0;">
699
-                    </a>
700
-                    <!--</div>
701
-                <!--</p>-->
702
-                </ons-card>
703
-            </ons-page>
704
-        </template>
705
-
706
-  <script src="js/load.js"></script>
707
-
708
-        <script type="text/javascript" src="cordova.js"></script>
709
-        <script type="text/javascript" src="js/index.js"></script>
710
-    </body>
711
-</html>

+ 2
- 1
www/js/saveLocal.js 查看文件

@@ -28,9 +28,10 @@ try {
28 28
   if (checkDate() == false) {
29 29
 
30 30
     window.localStorage.setItem("RENGLONES", loadFile("https://136.145.181.12/renglones.json"));
31
+    window.localStorage.setItem("TODOS", loadFile("https://136.145.181.12/artesanias.json"))
31 32
 
32 33
     var renglones = JSON.parse(window.localStorage.getItem("RENGLONES"));
33
-    console.log(renglones);
34
+
34 35
     for (var i = 0; i < renglones.length; i++) {
35 36
       window.localStorage.setItem(renglones[i].Renglones, loadFile("https://136.145.181.12/" + renglones[i].Renglones + ".json"));
36 37
     }