Skip to content

Commit 299532d

Browse files
committed
first commit
0 parents  commit 299532d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+116752
-0
lines changed

404.html

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Page Not Found</title>
7+
8+
<style media="screen">
9+
body { background: #ECEFF1; color: rgba(0,0,0,0.87); font-family: Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; }
10+
#message { background: white; max-width: 360px; margin: 100px auto 16px; padding: 32px 24px 16px; border-radius: 3px; }
11+
#message h3 { color: #888; font-weight: normal; font-size: 16px; margin: 16px 0 12px; }
12+
#message h2 { color: #ffa100; font-weight: bold; font-size: 16px; margin: 0 0 8px; }
13+
#message h1 { font-size: 22px; font-weight: 300; color: rgba(0,0,0,0.6); margin: 0 0 16px;}
14+
#message p { line-height: 140%; margin: 16px 0 24px; font-size: 14px; }
15+
#message a { display: block; text-align: center; background: #039be5; text-transform: uppercase; text-decoration: none; color: white; padding: 16px; border-radius: 4px; }
16+
#message, #message a { box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); }
17+
#load { color: rgba(0,0,0,0.4); text-align: center; font-size: 13px; }
18+
@media (max-width: 600px) {
19+
body, #message { margin-top: 0; background: white; box-shadow: none; }
20+
body { border-top: 16px solid #ffa100; }
21+
}
22+
</style>
23+
</head>
24+
<body>
25+
<div id="message">
26+
<h2>404</h2>
27+
<h1>Page Not Found</h1>
28+
<p>The specified file was not found on this website. Please check the URL for mistakes and try again.</p>
29+
<h3>Why am I seeing this?</h3>
30+
<p>This page was generated by the Firebase Command-Line Interface. To modify it, edit the <code>404.html</code> file in your project's configured <code>public</code> directory.</p>
31+
</div>
32+
</body>
33+
</html>

admin/charts.js

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
var xValues = ["Italy", "France", "Spain", "USA", "Argentina"];
2+
var yValues = [55, 49, 44, 24, 15];
3+
var barColors = ["red", "green","blue","orange","brown"];
4+
5+
colors=[];
6+
7+
for(let i=0;i<this.yValues.length;i++){
8+
this.colors.push('#'+Math.floor(Math.random()*16777215).toString(16));
9+
}
10+
11+
var myPieChart = new Chart("myPieChart", {
12+
type: "doughnut",
13+
data: {
14+
datasets: [{
15+
hoverBorderColor: "rgba(234, 236, 244, 1)",
16+
}]
17+
},
18+
options: {
19+
maintainAspectRatio: false,
20+
responsive: true,
21+
plugins: {
22+
legend: {
23+
position: 'bottom',
24+
}
25+
},
26+
tooltips: {
27+
backgroundColor: "rgb(255,255,255)",
28+
bodyFontColor: "#858796",
29+
borderColor: '#dddfeb',
30+
borderWidth: 1,
31+
xPadding: 15,
32+
yPadding: 15,
33+
displayColors: false,
34+
caretPadding: 10,
35+
},
36+
cutoutPercentage: 80,
37+
}
38+
});
39+
40+
var myPieChart2 = new Chart("myPieChart2", {
41+
type: "doughnut",
42+
data: {
43+
datasets: [{
44+
hoverBorderColor: "rgba(234, 236, 244, 1)",
45+
}]
46+
},
47+
options: {
48+
maintainAspectRatio: false,
49+
responsive: true,
50+
plugins: {
51+
legend: {
52+
position: 'bottom',
53+
}
54+
},
55+
tooltips: {
56+
backgroundColor: "rgb(255,255,255)",
57+
bodyFontColor: "#858796",
58+
borderColor: '#dddfeb',
59+
borderWidth: 1,
60+
xPadding: 15,
61+
yPadding: 15,
62+
displayColors: false,
63+
caretPadding: 10,
64+
},
65+
cutoutPercentage: 80,
66+
}
67+
});
68+
69+
// Set new default font family and font color to mimic Bootstrap's default styling
70+
Chart.defaults.family = 'Nunito', '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
71+
Chart.defaults.font.color = '#858796';

admin/geoFilter.js

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
2+
// Inicializador
3+
4+
$(function () {
5+
$('.selectpicker').selectpicker();
6+
});
7+
8+
getAllData();
9+
var datos;
10+
var localidades;
11+
12+
function getAllData() {
13+
$.ajax({
14+
url: '../sections/datos.json',
15+
async: false,
16+
dataType: 'json',
17+
success: function (json) {
18+
datos = json.localidades;
19+
}
20+
});
21+
}
22+
23+
24+
function getFilteredByKey(array, key, value, value2, value3) {
25+
return array.filter(function (e) {
26+
return e[key] == value && e["provincia"].nombre == value2 && e["localidad_censal"].nombre == value3;
27+
});
28+
}
29+
30+
function getLocalidades(array, value) {
31+
return array.filter(function (e) {
32+
var array_filtrado = {};
33+
array_filtrado = e["provincia"].nombre == value;
34+
return array_filtrado;
35+
});
36+
}
37+
38+
async function cambiarLocalidades() {
39+
var itemSelectorOption = $('#select-localidad option');
40+
itemSelectorOption.remove();
41+
var provincia = document.getElementById('select-provincia').value;
42+
43+
array = await getLocalidades(datos, provincia);
44+
45+
select = document.getElementById('select-localidad');
46+
47+
array.forEach(element => {
48+
49+
optionText = element.nombre;
50+
optionValue = element.nombre;
51+
52+
$('#select-localidad').append(`<option value="${optionValue}">
53+
${optionText}
54+
</option>`);
55+
});
56+
$('#select-localidad').selectpicker('refresh');
57+
58+
}
59+
60+
async function cambiarLocalidadesAgro() {
61+
var itemSelectorOption = $('#select-localidad2 option');
62+
itemSelectorOption.remove();
63+
var provincia = document.getElementById('select-provincia2').value;
64+
65+
array = await getLocalidades(datos, provincia);
66+
67+
select = document.getElementById('select-localidad2');
68+
69+
array.forEach(element => {
70+
71+
optionText = element.nombre;
72+
optionValue = element.nombre;
73+
74+
$('#select-localidad2').append(`<option value="${optionValue}">
75+
${optionText}
76+
</option>`);
77+
});
78+
$('#select-localidad2').selectpicker('refresh');
79+
80+
}
81+
82+
async function cambiarLocalidadesAgroEdit() {
83+
var itemSelectorOption = $('#select-localidad3 option');
84+
itemSelectorOption.remove();
85+
var provincia = document.getElementById('select-provincia3').value;
86+
87+
array = await getLocalidades(datos, provincia);
88+
89+
select = document.getElementById('select-localidad3');
90+
91+
array.forEach(element => {
92+
93+
optionText = element.nombre;
94+
optionValue = element.nombre;
95+
96+
$('#select-localidad3').append(`<option value="${optionValue}">
97+
${optionText}
98+
</option>`);
99+
});
100+
$('#select-localidad3').selectpicker('refresh');
101+
102+
}
103+
104+
cambiarLocalidades();
105+
cambiarLocalidadesAgro();
106+
cambiarLocalidadesAgroEdit();

0 commit comments

Comments
 (0)