-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
100 lines (100 loc) · 5.02 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href="resources/fonts.css" rel="stylesheet">
<link href="resources/style.css" rel="stylesheet">
<link href="resources/nouislider.min.css" rel="stylesheet">
<title>Frigorifico</title>
</head>
<body>
<header>
<a href="javascript:void(0)" onclick="toogleIco('wifi')" class="tooltip tooltip-bottom" title="WiFi"><i class="ico material-icons" id="ico_wifi">wifi</i></a>
<a href="javascript:void(0)" onclick="toogleIco('volume')" class="tooltip tooltip-bottom" title="Volumen"><i class="ico material-icons" id="ico_volume">volume_up</i></a>
<a href="javascript:void(0)" onclick="" class="tooltip tooltip-bottom" title="Ver estadisticas"><i class="ico material-icons" id="ico_stadistics">assessment</i></a>
<a href="javascript:void(0)"><i class="ico material-icons" id="ico_notifications" style="cursor: default">notifications_none</i></a>
</header>
<section id="changelayer">
<div class="legible">
<div class="col t2">
<div class="row temperature">
<span id="ext_temp"></span><span class="simbol">˚C</span>
</div>
<div class="row">
<div id="time"></div><div id="date"></div>
</div>
</div>
<div class="col first">
<h3 class="title"><i class="material-icons medium" id="ico_wifi">invert_colors</i><br>Frigorifico</h3>
<div class="content"><span id="frig_temp"></span><span class="simbol">˚C</span></div>
</div>
<div class="col">
<h3 class="title"><i class="material-icons medium" id="ico_wifi">ac_unit</i><br>Congelador</h3>
<div class="content"><span id="cong_temp"></span><span class="simbol">˚C</span></div>
</div>
<div class="col">
<h3 class="title"><i class="material-icons medium" id="ico_wifi">flash_on</i><br>Consumo</h3>
<div class="content"><span id="energy"></span><span id="energysimbol" class="simbol">W</span></div>
</div>
<div id="clear" style="clear:both;"></div>
</div>
</section>
<footer>
<div class="foo-container">
<a href="javascript:void(0)" class="button" id="frigo-btn" onclick="toggleFrigo()"><i class="material-icons b-large">invert_colors</i><div class="infotext">OFF</div></a>
<a href="javascript:void(0)" class="button" id="conge-btn" onclick="toggleCong()"><i class="material-icons b-large">ac_unit</i><div class="infotext">OFF</div></a>
<a href="javascript:void(0)" class="button" id="eco-btn" onclick="toggleEco()"><i class="material-icons b-large">kitchen</i><div class="infotext">ECO OFF</div></a>
<a href="javascript:void(0)" class="button" id="frigotermo-btn" onclick="frigo_bubble()"><i class="material-icons b-large">invert_colors</i><div class="infotext">TEMP</div></a>
<a href="javascript:void(0)" class="button" id="congetermo-btn" onclick="conge_bubble()"><i class="material-icons b-large">ac_unit</i><div class="infotext">TEMP</div></a>
<a href="javascript:void(0)" class="button" id="lang-btn" onclick="toogleCooler()"><i class="material-icons b-large">language</i><div class="infotext">IDIOMA</div></a>
</div>
</footer>
<div id="bubble"><div id="frigotermo-range" class="range"></div><div id="congetermo-range" class="range"></div></div>
<div id="toast-container"></div>
<div class="dialog-background"><div class="dialog"><div class="dialog-close"><i class="material-icons medium">close</i></div><div id="dialog-content"></div></div></div>
<script type="text/javascript" src="resources/jquery.min.js"></script>
<script type="text/javascript" src="resources/nouislider.min.js"></script>
<script type="text/javascript" src="resources/electro.js"></script>
<script type="text/javascript" src="resources/functions.js"></script>
<script>
//ToDo: Estadisticas
//ToDo?: Bubble cambiar idioma
//¿ToDo?: Sistema celsius a farengheit
//¿ToDo?: Integrar twitter
$(document).ready(function(){
$(document).click(function(event){
if(prevTermo != "" && !$(event.target).is('#bubble') && !$(event.target).parents("#bubble").is("#bubble") && !$(event.target).is('.button') && !$(event.target).parents(".button").is(".button")) {
$("#bubble").hide();
prevTermo = "";
}
});
$(".dialog-close").click(function(event){
$(".dialog-background").hide();
electro.alarma(false);
});
$(".dialog-background").click(function(event){
if (!$(event.target).is('.dialog') && !$(event.target).parents(".dialog").is(".dialog")){
$(this).hide();
electro.alarma(false);
}
});
$( window ).resize(function() {
$("#bubble").hide();
prevTermo = "";
});
electro.puertaFrigorifico(changeFrigDoorStatus);
electro.puertaCongelador(changeCongDoorStatus);
electro.consumoFrigorifico(changeFrigEnergy);
electro.consumoCongelador(changeCongEnergy);
electro.tempExterior(changeExtTemp);
electro.tempFrigorifico(changeFrigTemp);
electro.tempCongelador(changeCongTemp);
electro.hora(digiDateTime);
toggleFrigo();
toggleCong();
range("frigotermo", 4, 2, 8);
range("congetermo", -18, -24, -16);
});
</script>
</body>
</html>