Emmanuel 3 years ago
parent
commit
56d8c273dc

BIN
platforms/android/app/src/main/assets/www/.index.html.swp View File


+ 0
- 823
platforms/android/app/src/main/assets/www/index.html View File

@@ -1,823 +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' 'unsafe-inline'; script-src 'self' '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-height, viewport-fit=cover">
44
-        <meta charset="UTF-8">
45
-        <link rel="stylesheet" type="text/css" href="css/index.css">
46
-        <link rel="stylesheet" href="lib/OnsenUI/css/onsenui.css">
47
-        <link rel="stylesheet" href="lib/OnsenUI/css/onsen-css-components.min.css">
48
-        <script src="lib/OnsenUI/js/onsenui.min.js"></script>
49
-        <script src="js/jquery_.js"></script>
50
-        <script type="text/javascript" src="js/saveLocal.js"></script>
51
-
52
-
53
-    </head>
54
-    <body>
55
-
56
-        <script> 
57
-        
58
-        
59
-        
60
-        </script>
61
-
62
-            <!--the toolbar is where it will have the main name of the app and the ICP logo (top center)-->
63
-           <ons-page>
64
-            <ons-toolbar>
65
-                <div class="center">ArtesaníasICP</div>
66
-                <div class="right"><img class="list-item__thumbnail" src="img/ICP.png"></div>
67
-            </ons-toolbar>
68
-            <!--The tabbar is the place where the user can get acces to the different sections of the app-->
69
-            <!--Each tab will hace a page name (which we use to reference and define them later one), then we have a laber, this is what will be used as a name for that page in the tabbar-->
70
-            <ons-tabbar swipeable position="bottom" modifier="autogrow">
71
-                <ons-tab page="home.html" label="Hogar" icon = "md-home" active></ons-tab>
72
-                <ons-tab page="renglones.html" label="Artesanías" icon = "fa-paint-brush"></ons-tab>
73
-                <ons-tab page ="search.html" label="Buscar" icon = "fa-search"> </ons-tab>
74
-                <ons-tab page ="ferias.html" label="Eventos" icon = "fa-calendar-alt"> </ons-tab>
75
-                <ons-tab page="colaboradores.html" label="Colab" icon = "fa-users"></ons-tab>
76
-            </ons-tabbar>
77
-        </ons-page>
78
-
79
-
80
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
81
-
82
-        <template id="home.html">
83
-
84
-            <ons-page id="home" class="red">
85
-
86
-                <ons-card id="azar"><!--style="height: 100%"-->
87
-
88
-                    <!--<div class="title" id="Title"></div>-->
89
-                    <div id="image" style= "max-height:500px"></div><br>
90
-                    <div class="content" id="Content"></div>
91
-                    <!--This javascript will randomly choose an image and information of a certain type of artesania used by a certain artists-->
92
-                    <!--For now all this information is stored inside a .csv file-->
93
-                    <script type="text/javascript" src="js/azar.js"> </script>
94
-
95
-                </ons-card>
96
-
97
-
98
-            </ons-page>
99
-
100
-        </template>
101
-
102
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
103
-        <!-- This is the page that's accesed when someone clicks on a renglon (tipo de material usado) and then artesanos, it will show a list of all theartists that work with that type of material
104
-        -->
105
-        <template id="artesanos.html">
106
-            <ons-page id="artesanos">
107
-                <!-- This button lets the user go back to the previous page of the artesanias tab-->
108
-                <ons-toolbar>
109
-                    <div class="left"><ons-back-button>Atrás</ons-back-button></div>
110
-                    <div class="center"></div>
111
-                </ons-toolbar>
112
-
113
-                <!--Not sure what this does....-->
114
-                <!-- when you pull down and are already at the top of the artesanos list then you see that fa-arrow-down on the top-->
115
-                <ons-pull-hook id="pull-hook" threshold-height="120px">
116
-                    <ons-icon id="pull-hook-icon" size="22px" class="pull-hook-content" icon="fa-arrow-down"></ons-icon>
117
-                </ons-pull-hook>
118
-
119
-                <!--This is where it will make the list, so the function that puts the artists here should reference this -->
120
-                <ons-list id="artesanos-list" src="">
121
-                    <ons-list-header>Artesanos</ons-list-header>
122
-                </ons-list>
123
-
124
-                <script>
125
-
126
-                    ons.getScriptPage().onInit = function () {
127
-                        //not sure what this does, because I dont really know what this.data.title have inside
128
-                        //But I think what it has is the renglon that the user chose in the previous tab, and then using it as the title on this page
129
-                        this.querySelector('ons-toolbar div.center').textContent = this.data.title;
130
-
131
-
132
-                        //var File = this.data.title.toUpperCase() + '.json' ;
133
-                        //seperates all different types of especificaciones
134
-                        var Esp = this.data.esp.split(', ');
135
-                        //Puts the json file of all the artesanos into this variable
136
-                        var artesanos_json = this.data.json;
137
-
138
-                        //Turns the first character into an upper case
139
-                        //Convertir en mayuscula primera letra del string.
140
-                        for(var i=0; i<Esp.length; i++) {
141
-                            Esp[i] = Esp[i].charAt(0).toUpperCase() + Esp[i].slice(1);
142
-                        };
143
-
144
-                        //This is what happens when you scroll the list of names down when its already at the top
145
-                        //First the arrow faces down, at some point it spins and points to the top, right before the user's finger stops touching the screen
146
-                        //or if their finger goes back down.
147
-                        var pullHook = document.getElementById('pull-hook');
148
-                        var icon = document.getElementById('pull-hook-icon');
149
-                        pullHook.addEventListener('changestate', function (event) {
150
-                            switch (event.state) {
151
-                                case 'initial':
152
-                                    icon.setAttribute('icon', 'fa-arrow-down');
153
-                                    icon.removeAttribute('rotate');
154
-                                    icon.removeAttribute('spin');
155
-                                    break;
156
-                                case 'preaction':
157
-                                    icon.setAttribute('icon', 'fa-arrow-down');
158
-                                    icon.setAttribute('rotate', '180');
159
-                                    icon.removeAttribute('spin');
160
-                                    break;
161
-                                case 'action':
162
-                                    icon.setAttribute('icon', 'fa-spinner');
163
-                                    icon.removeAttribute('rotate');
164
-                                    icon.setAttribute('spin', true);
165
-                                    break;
166
-                            }
167
-                        });
168
-
169
-                        //This function recieves a number that is tied to a specific Especificacion (type of artesania that artist make like: boligrafos,figuras...) in the variable Esp declared beforehand
170
-                        //Then it finds and copies all the information of the artists that work on that type of artesania
171
-                        //It ends up returning the especificacion in 'name' and retuns all the names and municipios of the artists that it found in 'artesan'
172
-                        var getArtesania = function (num) {
173
-                            //First it empty in case we dont find anyone, this is the variable where the information of the artist's name and municipio will be sent
174
-                            var Artesanos = ``;
175
-
176
-                            console.log('Filtrado de ',Esp[num])
177
-
178
-                            //results: This variable will have all the information about the artists who work with that especificacion, it will look for this in the artesanos_json that has the whole json file of artesanos.
179
-                            //I dont think its using 'searchVal' for anything....
180
-                            var results = [];
181
-                            var searchVal = "my Name";
182
-                            for (var i=0 ; i < artesanos_json.length ; i++)
183
-                            {
184
-                                if (artesanos_json[i].Especificaciones.includes(Esp[num])) {
185
-                                    results.push(artesanos_json[i]);
186
-                                }
187
-                            }
188
-
189
-          /*var arr1=artesanos_json.filter(function(item){
190
-              return item.Nombre=="Ana";
191
-          });*/
192
-                            //After going through the whole json file
193
-                            //It adds the names and municipios of the ones found and later stored in 'results' to the 'Artesanos' variable
194
-                            for(var i=0; i<results.length; i++) {
195
-
196
-                                //if(Esp[num] in artesanos_json.) {}
197
-                                Artesanos=Artesanos+`<a id='home.html'>${results[i].Nombre} | ${results[i].Municipio}<br>`
198
-                                //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
199
-                            }
200
-
201
-
202
-                            return {
203
-                                name: Esp[num],
204
-                                artesan: Artesanos
205
-                            };
206
-                        };
207
-
208
-                        //Then this function returns the name of the Especificacion that was searched in 'name'
209
-                        //And it also returns all the names and municipios of the artesanos that work with that especificacion
210
-                        var getData = function () {
211
-                            const data = [];
212
-                            for (var i = 0; i < Esp.length; i++) {
213
-                                data.push(getArtesania(i));
214
-                            }
215
-                            return data;
216
-                        };
217
-
218
-                        //not sure what this does because the element is also created later on, with even more information so idk if this one is just wrong
219
-                        //This will create a new tab with the information of the arteanos?
220
-                        var createArtesano = function (Artesano) {
221
-
222
-                            return ons.createElement(`
223
-              <ons-list-item expandable tappable>
224
-                <div class="center" >${Artesano.Nombre}</div>
225
-                <div class="expandable-content"> Municipio: ${Artesano.Municipio}<br>
226
-                                                 Tel\u00e9fono: ${Artesano["Telefono 1"]}<br>
227
-                                                 Correo Electr\u00f3nico: ${Artesano["Email"]}<br>
228
-                                                 </div>
229
-              </ons-list-item>`
230
-                                                    );
231
-                        };
232
-
233
-                        //var Artesanias = getData();
234
-                        //artesanos_json
235
-
236
-                        for (Artesano of artesanos_json) {
237
-
238
-                            var cont = 0;
239
-                            var lista = document.getElementById('artesanos-list');
240
-
241
-                            //Recopilar datos no vacios.
242
-                            //Counts all the tyoes of data that the artists don't have
243
-                            //Later on, if you discover that they didn't have 'municipios', telephone numbers, emails and especificaciones then you wont display it.
244
-                            if (Artesano.Municipio.trim().length != 0) {
245
-                                cont ++;
246
-                            }
247
-                            if (Artesano["Telefono 1"].trim().length != 0) {
248
-                                cont ++;
249
-                            }
250
-                            if (Artesano["Email"].trim().length != 0 & Artesano["Email"].toUpperCase().trim() != "NO TIENE") {
251
-                                cont ++;
252
-                            }
253
-                            if (Artesano.Especificacion.trim().length != 0) {
254
-                                cont ++;
255
-                            }
256
-                            
257
-                            Artesano.Nombre = Artesano.Nombre + " " + Artesano["Apellido Paterno"] + " " + Artesano["Apellido Materno"];
258
-
259
-                            //info a pasar
260
-                            //'title':'${Artesano.Nombre}','esp': '${info}'
261
-                            //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)
262
-                            //And puts this into the 'item' variable
263
-                            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"]}', tecnicas: '${Artesano["Tecnica 1"]}' } })" tappable>
264
-                        <div class="title">${Artesano.Nombre}</div>
265
-                    </ons-list-item>`);
266
-
267
-                            //If it didn't find 'municipios', telephone numbers, emails and 'especificaciones' of that artists then it wont include it on the 'artesanos-list' (variable: 'lista')
268
-                            //If it found that it has at least one of them then it will include it into the list.
269
-                            if(cont == 0){
270
-                                //console.log(Artesano.Nombre+' no tiene ningun tipo de informacion.');
271
-                                //return ons.createElement(``);
272
-                            }
273
-                            else {
274
-                                lista.appendChild(item);
275
-                            }
276
-
277
-                        };
278
-
279
-                    };
280
-                </script>
281
-
282
-                <style>
283
-                    .pull-hook-content {
284
-                        color: #333;
285
-                        transition: transform .25s ease-in-out;
286
-                    }
287
-                </style>
288
-
289
-            </ons-page>
290
-
291
-        </template>
292
-
293
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
294
-
295
-         <template id="artesanias.html">
296
-             <ons-page id="artesanias">
297
-
298
-                 <ons-toolbar>
299
-                     <div class="left"><ons-back-button>Atrás</ons-back-button></div>
300
-                     <div class="center"></div>
301
-                 </ons-toolbar>
302
-
303
-                 <ons-pull-hook id="pull-hook" threshold-height="120px">
304
-                     <ons-icon id="pull-hook-icon" size="22px" class="pull-hook-content" icon="fa-arrow-down"></ons-icon>
305
-                 </ons-pull-hook>
306
-
307
-                 <ons-list id="artesania-list" src="">
308
-                     <ons-list-header>Artesanias</ons-list-header>
309
-                 </ons-list>
310
-
311
-                 <script>
312
-
313
-                     ons.getScriptPage().onInit = function () {
314
-                         this.querySelector('ons-toolbar div.center').textContent = this.data.title;
315
-
316
-                         //var File = this.data.title.toUpperCase() + '.json' ;
317
-                         var Esp = this.data.esp.split(', ');
318
-                         var artesanos_json = this.data.json;
319
-
320
-                         //Convertir en mayuscula primera letra del string.
321
-                         for(var i=0; i<Esp.length; i++) {
322
-                             Esp[i] = Esp[i].charAt(0).toUpperCase() + Esp[i].slice(1);
323
-                         };
324
-
325
-                         var pullHook = document.getElementById('pull-hook');
326
-                         var icon = document.getElementById('pull-hook-icon');
327
-                         pullHook.addEventListener('changestate', function (event) {
328
-                             switch (event.state) {
329
-                                 case 'initial':
330
-                                     icon.setAttribute('icon', 'fa-arrow-down');
331
-                                     icon.removeAttribute('rotate');
332
-                                     icon.removeAttribute('spin');
333
-                                     break;
334
-                                 case 'preaction':
335
-                                     icon.setAttribute('icon', 'fa-arrow-down');
336
-                                     icon.setAttribute('rotate', '180');
337
-                                     icon.removeAttribute('spin');
338
-                                     break;
339
-                                 case 'action':
340
-                                     icon.setAttribute('icon', 'fa-spinner');
341
-                                     icon.removeAttribute('rotate');
342
-                                     icon.setAttribute('spin', true);
343
-                                     break;
344
-                             }
345
-                         });
346
-
347
-                         var getArtesania = function (num) {
348
-
349
-                             var Artesanos = ``,
350
-                                 ArtesanosInfo = ``;
351
-
352
-                             //console.log('Filtrado de ',Esp[num])
353
-
354
-                             var results = [];
355
-                             var searchVal = "my Name";
356
-                             for (var i=0 ; i < artesanos_json.length ; i++)
357
-                             {
358
-                                 if (artesanos_json[i].Especificacion.includes(Esp[num])) {
359
-                                     results.push(artesanos_json[i]);
360
-                                 }
361
-                             }
362
-
363
-                             /*var arr1=artesanos_json.filter(function(item){
364
-                             return item.Nombre=="Ana";
365
-                             });*/
366
-
367
-                             for(var i=0; i<results.length; i++) {
368
-
369
-                                 //if(Esp[num] in artesanos_json.) {}
370
-                                 results[i].Nombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
371
-                                 Artesanos+=`${results[i].Nombre}|`
372
-                                 ArtesanosInfo+=`${results[i].Municipio}|${results[i]["Telefono 1"]}|${results[i]["E-mail"]}|${results[i].Especificacion}|${results[i]["Tecnica 1"]}&&`
373
-                                 //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
374
-                             }
375
-
376
-                             return {
377
-                                 name: Esp[num],
378
-                                 artesan: Artesanos,
379
-                                 info: ArtesanosInfo
380
-                             };
381
-                         };
382
-
383
-                         var getData = function () {
384
-                             const data = [];
385
-                             for (var i = 0; i < Esp.length; i++) {
386
-                                 data.push(getArtesania(i));
387
-                             }
388
-                             return data;
389
-                         };
390
-                         var createArtesania = function (Artesania) {
391
-
392
-                             //console.log('Devuelto elemento')
393
-                             var listaArt=``;
394
-                             var arts = Artesania.artesan.split('|');
395
-                             var artsInfo = Artesania.info.split('&&');
396
-
397
-                             for(var i=0; i<arts.length; i++) {
398
-                                 var lot = artsInfo[i].split('|'),
399
-                                     mun = lot[0],
400
-                                     tel = lot[1],
401
-                                     email = lot[2],
402
-                                     esp = lot[3],
403
-                                     redes = lot[4],
404
-                                     tecnicas = lot[5];
405
-
406
-                                 listaArt += `<ons-item tappable onclick="myNavigator.pushPage('artesano.html', {data: {title:'${arts[i]}', mun: '${mun}', tel: '${tel}', email: '${email}', esp: '${esp}', redes: '${redes}', tecnicas: '${tecnicas}' }} )" ><div class="center">`+ arts[i] +`</div></ons-item><br>`;
407
-                             }
408
-
409
-                             if (Artesania.name == "Figuras y simbolos indigenas") {
410
-                                 Artesania.name = "Figuras y símbolos indígenas";
411
-                             } 
412
-
413
-                             console.log(Artesania.name);
414
-
415
-                             return ons.createElement(`
416
-              <ons-list-item expandable tappable>
417
-                <div class="center" >${Artesania.name}</div>
418
-                <div class="expandable-content">Artesanos que trabajan con ${Artesania.name}
419
-                <ons-card>${listaArt}</ons-card></div>
420
-                </ons-list-item>`
421
-                                                     );
422
-                         };
423
-
424
-                         var Artesanias = getData();
425
-
426
-                         for (Art of Artesanias) {
427
-
428
-                             var Artesania = createArtesania(Art);
429
-                             document.getElementById('artesania-list').appendChild(Artesania);
430
-                         };
431
-                         pullHook.onAction = function (done) {
432
-
433
-                             setTimeout(function() {
434
-                                 document.getElementById('artesania-list').appendChild(createArtesania(getArtesania()));
435
-                                 done();
436
-                             }, 400);
437
-                         }
438
-
439
-                     };
440
-                 </script>
441
-
442
-                 <style>
443
-                     .pull-hook-content {
444
-                         color: #333;
445
-                         transition: transform .25s ease-in-out;
446
-                     }
447
-                 </style>
448
-             </ons-page>
449
-        </template>
450
-
451
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
452
-<!----------------------------------------------------------------------------------->
453
-        <!--
454
-            The searchfunctions.js file is just a file that has all the definitions of the functions used later on in the switch
455
-        -->
456
-        <script src = "js/searchfunctions.js"></script>
457
-        <script>
458
-            //'all_artesanos' is the variable containing the JSON file that has all the artesanos with their data
459
-
460
-
461
-            var all_artesanos = JSON.parse(window.localStorage.getItem('TODOS'));
462
-            function filter(){
463
-                //finds the values of the search bar which are sent from the block of code after this script
464
-                //input is the one you use to filter by any parameter
465
-                //inputarte is the one you use to filter by the type of art the artists make
466
-                //inputmuni is the one you use to filter by municipio
467
-                //informacion is the variable that has all the information that will be sent to this tab, what we're going to use here is just to declare which artists are seen (informacion[i].style.display = "list-item") and which are not seen (informacion[i].style.display = "none")
468
-                var input = document.getElementById('searchbar').value;
469
-                var inputarte = document.getElementById('searchartesania').value;
470
-                var inputmuni = document.getElementById('searchbarmunicipio').value;
471
-                var x = document.getElementsByClassName('artists');
472
-                //just making sure everything is at the same format by taking out special characters, trimming it and putting it in lowercase (same thing will be done to the arguments it's being compared to later on)
473
-                //acento_replace(): it's a function I made that takes out any special characters of a word and changes them back to the plain ones (quitar acentos o cosas asi)
474
-                input = input.trim().toLowerCase();
475
-                inputarte = inputarte.trim().toLowerCase();
476
-                inputmuni = inputmuni.trim().toLowerCase();
477
-                input = acento_replace(input);
478
-                inputarte = acento_replace(inputarte);
479
-                inputmuni = acento_replace(inputmuni);
480
-                //default case is where evey one of them has nothing or less than 3 characters (displays every artist until it passes that length)
481
-                if (input.length <= 3 && inputarte.length <= 3 && inputmuni.length <= 3){
482
-                    for (var i = 0; all_artesanos.length; i++){
483
-                        x[i].style.display = "list-item";
484
-                    }
485
-                }
486
-                else{
487
-                    var cases = 0;
488
-                    cases = getcasenum(input,inputarte,inputmuni);
489
-                    //take every one of them out first (dont display any)
490
-                    for (var i = 0; i < all_artesanos.length; i++){
491
-                        x[i].style.display = "none";
492
-                    }
493
-                    switch(cases){
494
-                        //cases == 1 when only inputmuni has been writen on
495
-                        case 1:
496
-                            filter_municipios(inputmuni);
497
-                            break;
498
-                        //cases == 2 when only inputarte has been written on
499
-                        case 2:
500
-                            filter_artesanias(inputarte);
501
-                            break;
502
-                        //cases == 3 when inputarte and inputmuni has been written on
503
-                        case 3:
504
-                            search_art_mun(inputarte,inputmuni);
505
-                            break;
506
-                        //cases == 4 when input has been writen on
507
-                        case 4:
508
-                            filter_any(input);
509
-                            break;
510
-                        //cases == 5 when input and inputmuni has been written on
511
-                        case 5:
512
-                            search_any_mun(input,inputmuni);
513
-                            break;
514
-                        //cases == 6 when input and inputart has been written on
515
-                        case 6:
516
-                            search_any_art(input,inputarte);
517
-                            break;
518
-                        //cases == 7 when input, inputart and inputmuni has been writen on
519
-                        case 7:
520
-                            search_any_art_mun(input,inputarte,inputmuni);
521
-                            break;
522
-                    }
523
-                }
524
-            }
525
-        </script>
526
-
527
-        <template id="search.html">
528
-          <ons-navigator swipeable animation="slide" id="SNavigator">
529
-            <ons-page id="Buscar">
530
-                <!--
531
-                    This is the search bars, each time you type a character into any of the search bars, they will run the filter() function with what they all have as arguments (even if the other search bars have nothing in them)
532
-                    The first search bar is to find by any information related to the artist
533
-                    The second searchbar is to find by the type of artwork they work on
534
-                    The third searchbar is to find by the municipio where the artists works or lives
535
-                -->
536
-                <p style="text-align: center; margin-top: 10px;">
537
-                    <ons-search-input placeholder="Búsqueda con cualquier término" id = "searchbar"
538
-                        onkeyup = "filter()" style = "width: 300px;" ></ons-search-input>
539
-                    <ons-search-input placeholder="Búsqueda por artesanias" id = "searchartesania"
540
-                        onkeyup = "filter()" style = "width: 300px;"></ons-search-input>
541
-                    <ons-search-input placeholder = "Búsqueda por municipio" id = "searchbarmunicipio"
542
-                        onkeyup = "filter()" style = "width: 300px;"></ons-search-input>
543
-                </p>
544
-
545
-                <ons-list id="results" src="">
546
-                </ons-list>
547
-
548
-                <script>
549
-                    //This is basically declaring what we refer to as informacion in the filter() function
550
-                    //It iterates though each artists in the all_artesanos json file from before, it displays their name in the "Buscar" page, and it gets prepared so that when its clicked it redirects to the "artesano.html" page with the other aditional information that we have other than the name.
551
-                    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"];
553
-                        var artesano = ons.createElement(`<ons-list-item class = "artists"
554
-                        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"]}', tecnicas: '${all_artesanos[i]["Tecnica 1"]}' } })" tappable>
555
-                        <div>${all_artesanos[i].Nombre}</div>
556
-                    </ons-list-item>`);
557
-                        document.getElementById('results').appendChild(artesano);
558
-                    }
559
-                </script>
560
-
561
-            </ons-page>
562
-            </ons-navigator>
563
-        </template>
564
-
565
-        <!-- ---------------------------------------------------------------------------------------------------------------------------------------- -->
566
-        <!--This page is used so that we can display the information of a specific artists, and whenever the artists is missing information then we just dont include that in the page-->
567
-        <template id= "artesano.html">
568
-            <ons-page id = "artesano">
569
-                <ons-toolbar>
570
-                    <!-- Pretty self explanatory, its a button that goes back to the previous page -->
571
-                    <div class = "left"> <ons-back-button> Atras </ons-back-button></div>
572
-                    <div class = "center"></div>
573
-                </ons-toolbar>
574
-                <body>
575
-                    <!-- This is where we'll put all the information of that artsts -->
576
-                    <ons-card id="all"></ons-card>
577
-                </body>
578
-                <script>
579
-                    //when it opens this page this function starts to run, it first recieves the information that was sent to "artesano.html"
580
-                    ons.getScriptPage().onInit = function () {
581
-                        this.querySelector('ons-toolbar div.center').textContent = this.data.title;
582
-
583
-                        var data = '',
584
-                            mun = this.data.mun,
585
-                            tel = this.data.tel,
586
-                            em = this.data.email,
587
-                            esp = this.data.esp,
588
-                            redes = this.data.redes,
589
-                            tecnicas = this.data.tecnicas;
590
-
591
-                        //here the email is the string made from the start to where the '#' is.
592
-                        
593
-
594
-                        //Here it's dividing all the especificaciones and writing them into the page (data) and then goes to the next line
595
-                        //if it has many especificaciones then it will replace all the ';' in it with ',' and writes it into the page
596
-                        //but if theres only one then you just write it into the page
597
-                        if(esp.trim() != ""){
598
-                            if(esp.includes(";", 0)){
599
-                                esp=esp.replace(/;/g,", ");
600
-                                data+='Tipos de artesanías: '+esp+'<br>';
601
-                            }
602
-                            else {
603
-                                data+='Tipo de artesanía: '+esp+'<br>';
604
-                            }
605
-                        }
606
-
607
-                        if(tecnicas.trim() != ''){
608
-                            if(tecnicas.includes(";", 0)){
609
-                                tecnicas = tecnicas.replace(/;/g,", ");
610
-                                data+='Técnicas que usan: '+tecnicas+'<br>';
611
-                            }
612
-                            else {
613
-                                data+='Técnicas que usan: '+tecnicas+'<br>';
614
-                            }
615
-                        }
616
-                        //console.log("Las redes son..."+this.data.redes);
617
-                        //Here it's making sure theres something in municipio and writing their municipio into the page
618
-                        if(mun.trim() != ""){
619
-                            data+='Municipio: '+ mun +'<br>';
620
-                        }
621
-
622
-                        //Here it's writing their email, in blue color and its used as a link to send one when it's clicked, then it goes to the next line
623
-                        //Whenever the variable is empty or if it has "NO TIENE" then it doesnt write anything
624
-                        if(em.trim() != "" & em.toUpperCase().trim() != "NO TIENE"){
625
-                            data+='Correo Electr\u00f3nico: <a style="color:blue" href="mailto: '+em+'"><u>'+em+'</u></a><br>';
626
-                        }
627
-
628
-                        //Here it's writing their phone number into the page,its in blue and whenever its clicked the app will redirect the user to call them, then it goes to the next line
629
-                        if(tel.trim() != "" ){
630
-                            data+='Tel\u00e9fono: <a style="color:blue" href="tel: '+ tel +'"><u>'+ tel +'</u></a><br>';
631
-                        }
632
-
633
-                        console.log("Redes: "+redes);
634
-
635
-                        //Here it has to decide what to do depending on the links they give to their social media pages
636
-                        //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.
637
-                        //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
638
-                        //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.
639
-                        //If it's none of them then it will not display anything
640
-                        if(redes.includes("facebook")){
641
-
642
-                            console.log(redes.substring(1,redes.length-2));
643
-                            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>';
644
-                        }
645
-                        else if(redes.includes("instagram")){
646
-                            console.log(redes.substring(1,redes.length-2));
647
-                            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>';
648
-                        }
649
-                        else if(redes.includes("myspace")){
650
-                            console.log(redes.substring(1,redes.length-2));
651
-                            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>';
652
-                        }
653
-                        else if((redes.includes(".org") || redes.includes(".com")) && !redes.includes("mailto")){
654
-                            redes = redes.substr(redes.indexOf("#")+1,redes.length);
655
-                            redes = redes.substr(0, redes.length-1);
656
-                            console.log(redes);
657
-                            data+='<br><a href="'+ redes + '"><img src="img/internet.jpg" style="width:35px;height:35px;border:0;"><br>';
658
-                        }
659
-                        else if(redes.includes("#") || redes.includes("mailto")){
660
-                            console.log("tiene un disparate");
661
-                        } else {
662
-                            console.log("no tiene nada");
663
-                        }
664
-
665
-                        //This is the part that allows eveything (data) to be displayed
666
-                        document.getElementById("all").innerHTML = `${data}`;
667
-
668
-                    }
669
-                </script>
670
-            </ons-page>
671
-        </template>
672
-
673
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
674
-
675
-        <template id="renglones.html">
676
-          <ons-navigator swipeable animation="slide" id="myNavigator">
677
-            <ons-page id="renglones">
678
-
679
-            <!--div class="search-bar">
680
-                 <p style="text-align: center; margin-top: 10px;">
681
-                    <ons-search-input placeholder="Search" onchange="ons.notification.alert('Searched for: ' + this.value)"
682
-           style="width: 96%; margin: 6px auto 6px auto;"></ons-search-input>
683
-                </p>
684
-            </div-->
685
-
686
-            <ons-card id="list">
687
-              <script type="text/javascript" src="js/renglones.js"></script>
688
-            </ons-card>
689
-
690
-                <!--Javascript function to hide other open expandables-->
691
-                <script>
692
-                    const hideAll = () => {
693
-                        Array.from(document.querySelector('#list').children)
694
-                            .forEach(item => {
695
-                                if (item.expanded) {
696
-                                    item.hideExpansion();
697
-                                }
698
-                            });
699
-                        };
700
-                </script>
701
-
702
-                <style>
703
-                    .intro {
704
-                        text-align: center;
705
-                        padding: 20px;
706
-                        margin-top: 30px;
707
-                    }
708
-
709
-                    ons-card {
710
-                        cursor: pointer;
711
-                        color: #333;
712
-                    }
713
-
714
-                    .card__title,
715
-                    .card--material__title {
716
-                        font-size: 15px;
717
-                    }
718
-                </style>
719
-            </ons-page>
720
-            </ons-navigator>
721
-
722
-        </template>
723
-
724
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
725
-
726
-        <template id="ferias.html">
727
-            <ons-page id="ferias">
728
-                <!--<ons-card>
729
-
730
-                <div id = "caleandar" class = "calendar" style="margin-top: 20px;">
731
-                    <script type="text/javascript" src="calendar_files/js/caleandar.js"></script>
732
-                    <script type="text/javascript" src="calendar_files/js/events.js"></script>
733
-                </div>
734
-
735
-                </ons-card>--
736
-                <br><br><br>-->
737
-                <ons-card>
738
-                <div id="logo" style="text-align: center">
739
-                    <img src="img/culturalpr1800x3200-2-01.png" style="width:150px;height:100px">
740
-                </div>
741
-                <br><br>
742
-                <div id="button" style="text-align: center">
743
-                <button onclick="redirect()">Pasar a la página de eventos</button>
744
-                </div>
745
-                <br><br>
746
-                <div id="Mensaje">
747
-                    El Instituto de Cultura Puertorriqueña, el Gobierno de Puerto Rico, los Colaboradores de esta aplicación, así como los funcionarios, empleados y contratistas de los anteriores, no se hacen responsables de los mensajes, imágenes, opiniones, servicios, declaraciones, representaciones o cualquier forma de contenido incluido en cualquiera de los enlaces accesibles, vinculados o referidos a través de ArtesaníasICP.
748
-                </div>
749
-                </ons-card>
750
-
751
-              <script>
752
-              function redirect() {
753
-                location.replace("https://facebook.com/icppr")
754
-              }
755
-              </script>
756
-            </ons-page>
757
-        </template>
758
-
759
-<!-- ------------------------------------------------------------------------------------------------------------------------------------------------------- -->
760
-
761
-        <template id="colaboradores.html">
762
-            <ons-page id="colaboradores">
763
-                <ons-card>
764
-
765
-                    <h1>Colaboradores</h1>
766
-                    
767
-                    <style>
768
-                        .column {
769
-                            float: left;
770
-                            width: 50%;
771
-                        }
772
-                        .row {
773
-                            width: 100%;
774
-                        }
775
-                    </style>
776
-                    <h2>SINFINESPR</h2>
777
-                    <div class = "column">
778
-                        SINFINESPR es un programa de Titín Foundation que responde a nuestro interés y compromiso con el fortalecimiento del tercer sector.
779
-                        <br><br>
780
-                        En esta plataforma agrupamos herramientas que permitirán que tu organización adquiera mayor visibilidad, recursos, conexiones, capacidad para una operación más eficiente y efectiva.
781
-                        <br><br>
782
-                        Saludos Cordiales,
783
-                                Aziria
784
-                    </div>   
785
-                    <div class = "column"> 
786
-                        <img src="img/sfpr.svg" style="width:150px;height:100px">
787
-                    </div>
788
-                    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
789
-                    Visita nuesta Página Web o siguenos en nuestras redes sociales <br> <br>
790
-                    <a href="https://twitter.com/SINFINESPR"><img src="img/twitter.png" alt="Twitter" style="width:35px;height:35px;border:0;">
791
-                    </a>
792
-                    <a href="https://www.facebook.com/sinfinespr"><img src="img/facebook.png" alt="Facebook" style="width:35px;height:35px;border:0;">
793
-                    </a>
794
-                    <a href="https://www.linkedin.com/company/sinfinespr/"><img src="img/linkedin.png" alt="Linkedin" style="width:35px;height:35px;border:0;">
795
-                    </a>
796
-                    <a href="https://www.instagram.com/sinfinespr/"><img src="img/instagram.png" alt="Instagram" style="width:35px;height:35px;border:0;">
797
-                    </a>
798
-                    <br><br>
799
-                    <h2>Centro de Desarrollo y Consultoría Computacional</h2>
800
-                    El Centro de Desarrollo y Consultoría Computacional está compuesto por profesores y estudiantes del departamento de Ciencia de Cómputos de la Universidad de Puerto Rico Recinto de Río Piedras. Nuestra meta es aportar al desarrollo computacional de la Universidad y de Puerto Rico al proveer servicios al día, de calidad y con precios accesibles, a la misma vez que se le ofrece experiencias prácticas a los estudiantes del departamento de Ciencia de Cómputos.
801
-                    <br><br>
802
-                    
803
-                    <img src="img/logo_cdcc.png" style="width: 150px; height: 100px">
804
-                    
805
-                    <br><br>
806
-                    Si tiene alguna duda nos puede contactar por:
807
-                    <br>
808
-                    Teléfono: 787-764-0000 Ext. 88341, 88349
809
-                    <br>
810
-                    o
811
-                    <br>
812
-                    Correo electrónico: <a href = "mailto:carlos.corrada2@upr.edu" style ="color:#0000EE;text-decoration: underline;">carlos.corrada2@upr.edu</a>
813
-
814
-                </ons-card>
815
-            </ons-page>
816
-        </template>
817
-  <script src="js/load.js"></script>
818
-
819
-
820
-        <script type="text/javascript" src="cordova.js"></script>
821
-        <script type="text/javascript" src="js/index.js"></script>
822
-    </body>
823
-</html>

+ 2
- 2
platforms/android/app/src/main/assets/www/js/searchfunctions.js View File

@@ -123,7 +123,7 @@ function find_artesania(i,input){
123 123
 
124 124
 
125 125
 function find_tecnicas(i,input){
126
-    var tecnicas = all_artesanos[i]["Tecnica 1"];
126
+    var tecnicas = all_artesanos[i]["Tecnica"];
127 127
     tecnicas = tecnicas.trim().toLowerCase();
128 128
     tecnicas = acento_replace(tecnicas);
129 129
     if(tecnicas.search(input) != -1){
@@ -170,7 +170,7 @@ function find_telefono(i,input){
170 170
 //trata de ver si el input es parte del email del artista i
171 171
 //Mayuscula and acento proof
172 172
 function find_email(i,input){
173
-    var email = all_artesanos[i]["E-mail"];
173
+    var email = all_artesanos[i]["Email"];
174 174
     email = email.trim().toLowerCase();
175 175
     email = acento_replace(email);
176 176
     if(email.search(input) != -1){

BIN
platforms/android/app/src/main/res/mipmap-xhdpi-v26/ic_launcher_background.png View File


BIN
platforms/browser/www/.index.html.swp View File


BIN
www/.index.html.swp View File


+ 6
- 5
www/index.html View File

@@ -260,7 +260,7 @@
260 260
                             //'title':'${Artesano.Nombre}','esp': '${info}'
261 261
                             //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)
262 262
                             //And puts this into the 'item' variable
263
-                            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"]}', tecnicas: '${Artesano["Tecnica 1"]}' } })" tappable>
263
+                            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["Email"]}', esp: '${Artesano.Especificacion}', redes: '${Artesano["E-Commerce 1"]}', tecnicas: '${Artesano["Tecnica"]}' } })" tappable>
264 264
                         <div class="title">${Artesano.Nombre}</div>
265 265
                     </ons-list-item>`);
266 266
 
@@ -367,9 +367,10 @@
367 367
                              for(var i=0; i<results.length; i++) {
368 368
 
369 369
                                  //if(Esp[num] in artesanos_json.) {}
370
-                                 results[i].Nombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
371
-                                 Artesanos+=`${results[i].Nombre}|`
372
-                                 ArtesanosInfo+=`${results[i].Municipio}|${results[i]["Telefono 1"]}|${results[i]["E-mail"]}|${results[i].Especificacion}|${results[i]["Tecnica 1"]}&&`
370
+                                 //results[i].Nombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
371
+                                 ANombre = results[i].Nombre + " " + results[i]["Apellido Paterno"] + " " + results[i]["Apellido Materno"]
372
+                                 Artesanos+=`${ANombre}|`
373
+                                 ArtesanosInfo+=`${results[i].Municipio}|${results[i]["Telefono 1"]}|${results[i]["Email"]}|${results[i].Especificacion}|${results[i]["Tecnica"]}&&`
373 374
                                  //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
374 375
                              }
375 376
 
@@ -551,7 +552,7 @@
551 552
                     for (i = 0; i < all_artesanos.length;i++){
552 553
                         all_artesanos[i].Nombre = all_artesanos[i].Nombre +  " " + all_artesanos[i]["Apellido Paterno"] + " " + all_artesanos[i]["Apellido Materno"];
553 554
                         var artesano = ons.createElement(`<ons-list-item class = "artists"
554
-                        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"]}', tecnicas: '${all_artesanos[i]["Tecnica 1"]}' } })" tappable>
555
+                        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]["Email"]}', esp: '${all_artesanos[i].Especificacion}', redes: '${all_artesanos[i]["E-Commerce 1"]}', tecnicas: '${all_artesanos[i]["Tecnica"]}' } })" tappable>
555 556
                         <div>${all_artesanos[i].Nombre}</div>
556 557
                     </ons-list-item>`);
557 558
                         document.getElementById('results').appendChild(artesano);

+ 2
- 2
www/js/searchfunctions.js View File

@@ -123,7 +123,7 @@ function find_artesania(i,input){
123 123
 
124 124
 
125 125
 function find_tecnicas(i,input){
126
-    var tecnicas = all_artesanos[i]["Tecnica 1"];
126
+    var tecnicas = all_artesanos[i]["Tecnica"];
127 127
     tecnicas = tecnicas.trim().toLowerCase();
128 128
     tecnicas = acento_replace(tecnicas);
129 129
     if(tecnicas.search(input) != -1){
@@ -170,7 +170,7 @@ function find_telefono(i,input){
170 170
 //trata de ver si el input es parte del email del artista i
171 171
 //Mayuscula and acento proof
172 172
 function find_email(i,input){
173
-    var email = all_artesanos[i]["E-mail"];
173
+    var email = all_artesanos[i]["Email"];
174 174
     email = email.trim().toLowerCase();
175 175
     email = acento_replace(email);
176 176
     if(email.search(input) != -1){