Commit 8a271312 authored by Philipp's avatar Philipp

Added temperature toggle: outside/inside

parent 8acbead1
......@@ -21,7 +21,7 @@ module.exports = function (grunt) {
main: {
files: {
//'src/assets/css/complete.min.css': [ 'src/bower_components/bootstrap/dist/css/bootstrap.css', 'src/bower_components/ie10-viewport-bug-workaround/dist/ie10-viewport-bug-workaround.css', 'src/bower_components/devextreme/css/dx.common.css', 'src/bower_components/devextreme/css/dx.light.css', 'src/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.css', 'src/assets/css/main.css' ],
'src/assets/css/complete.min.css': [ 'src/bower_components/bootstrap/dist/css/bootstrap.css', 'src/bower_components/ie10-viewport-bug-workaround/dist/ie10-viewport-bug-workaround.css', 'src/bower_components/devextreme/css/dx.common.css', 'src/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.css', 'src/assets/css/main.css' ],
'src/assets/css/complete.min.css': [ 'src/bower_components/bootstrap/dist/css/bootstrap.css', 'src/bower_components/ie10-viewport-bug-workaround/dist/ie10-viewport-bug-workaround.css', 'src/bower_components/devextreme/css/dx.common.css', 'src/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.css', 'src/bower_components/bootstrap-toggle/css/bootstrap2-toggle.css', 'src/assets/css/main.css' ],
'src/assets/css/incomplete.min.css': [ 'src/bower_components/bootstrap/dist/css/bootstrap.css', 'src/bower_components/ie10-viewport-bug-workaround/dist/ie10-viewport-bug-workaround.css', 'src/assets/css/main.css' ]
}
}
......@@ -32,7 +32,7 @@ module.exports = function (grunt) {
},
main: {
files: {
'src/assets/js/complete.min.js': ['src/bower_components/jquery/dist/jquery.js', 'src/bower_components/bootstrap/dist/js/bootstrap.js', 'src/devextreme_bundler/dx.custom.js', 'src/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.js', 'bower_components/bootstrap-datepicker/dist/locales/bootstrap-datepicker.de.min.js', 'src/bower_components/jquery-zoom/jquery.zoom.min.js', 'src/bower_components/jquery-fullscreen/jquery.fullscreen.js', 'src/bower_components/ie10-viewport-bug-workaround/dist/ie10-viewport-bug-workaround.js', 'src/assets/js/main.js' ],
'src/assets/js/complete.min.js': ['src/bower_components/jquery/dist/jquery.js', 'src/bower_components/bootstrap/dist/js/bootstrap.js', 'src/devextreme_bundler/dx.custom.js', 'src/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.js', 'bower_components/bootstrap-datepicker/dist/locales/bootstrap-datepicker.de.min.js', 'src/bower_components/jquery-zoom/jquery.zoom.min.js', 'src/bower_components/jquery-fullscreen/jquery.fullscreen.js', 'src/bower_components/bootstrap-toggle/js/bootstrap2-toggle.js', 'src/bower_components/ie10-viewport-bug-workaround/dist/ie10-viewport-bug-workaround.js', 'src/assets/js/main.js' ],
'src/assets/js/incomplete.min.js': ['src/bower_components/jquery/dist/jquery.js', 'src/bower_components/bootstrap/dist/js/bootstrap.js', 'src/bower_components/jquery-zoom/jquery.zoom.min.js', 'src/bower_components/ie10-viewport-bug-workaround/dist/ie10-viewport-bug-workaround.js', 'src/assets/js/main.js' ],
'src/assets/js/iecompat.min.js': ['src/bower_components/html5shiv/dist/html5shiv.min.js', 'src/bower_components/respond/dest/respond.min.js' ]
}
......
......@@ -15,7 +15,8 @@
"ie10-viewport-bug-workaround": "1.0.4",
"jquery-zoom": "1.7.20",
"bootstrap-datepicker": "1.8.0",
"jquery-fullscreen": "1.1.4"
"jquery-fullscreen": "1.1.4",
"bootstrap-toggle": "2.2.2"
},
"devDependencies": {}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -2,8 +2,6 @@
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/W:/template_rabenwetter/src/assets/js/main.js</file>
</group>
<group/>
</open-files>
</project-private>
......@@ -14,14 +14,17 @@ auxiliary.org-netbeans-modules-web-clientproject-api.js_2e_libs_2e_folder=js/lib
browser.autorefresh.Chrome.INTEGRATED=true
browser.highlightselection.Chrome.INTEGRATED=true
browser.run=true
file.reference.template_rabenwetter-dist=dist
file.reference.template_rabenwetter-src=src
file.reference.template_rabenwetter-test=test
file.reference.website_rabenwetter-dist=dist
file.reference.website_rabenwetter-public_html=public_html
file.reference.website_rabenwetter-src=src
file.reference.website_rabenwetter-test=test
files.encoding=UTF-8
project.license=default
site.root.folder=${file.reference.website_rabenwetter-dist}
source.folder=${file.reference.website_rabenwetter-src}
site.root.folder=${file.reference.template_rabenwetter-dist}
source.folder=${file.reference.template_rabenwetter-src}
start.file=index.html
test.folder=${file.reference.website_rabenwetter-test}
test.folder=${file.reference.template_rabenwetter-test}
web.context.root=/website_rabenwetter
......@@ -177,7 +177,7 @@
<div class="row">
<div class="col-xs-8">
<div class="whitebg current_temp">
<h4>Temperatur</h4>
<h4>Temperatur <span>Außen</span></h4>
<span id="we_temp-value">$current.outTemp.formatted</span><span class="sup we_tempunit">$unit.label.outTemp</span>
</div>
</div>
......
This diff is collapsed.
......@@ -108,6 +108,10 @@ body.info .whitebg.cams .whitebg {
font-size: 4em;
line-height: 60px;
}
.we_current .whitebg.current_temp h4 span {
font-size: .8em;
line-height: 1em;
}
.we_current .whitebg.current_temp span.sup {
font-size: 2em;
line-height: 100%;
......@@ -188,6 +192,9 @@ body.info .whitebg.cams .whitebg {
box-shadow: 0 0 1px #cccccc;
position: relative;
}
.gauge_container.circular {
padding: 15px 15px 65px 15px;
}
.datetime_container {
text-align: right;
}
......@@ -428,6 +435,13 @@ h5 {
.fullscreen .camdescription {
display: none;
}
.dummy_checkbox,
.temp_checkbox {
height: 50px;
width: 100%;
text-align: center;
}
/* Small devices (tablets, 768px and up) */
@media (min-width: 768px) {
body > .container,
......
var now = new Date();
var mode = 'day';
var temp = 'out';
//var dst = false;
(function($) {
......@@ -76,7 +77,11 @@ var mode = 'day';
if ( msg.outTemp >= 0 ) { color = '#208420'; }
if ( msg.outTemp >= 15 ) { color = '#ddaf2f'; }
if ( msg.outTemp >= 30 ) { color = '#7f2f2f'; }
drawLinearGauge( 'temp', msg.outTemp, msg.outTempTL, msg.outTempTH, color, -30, 50 );
if ( temp === 'out' ) {
drawLinearGauge( 'temp', msg.outTemp, msg.outTempTL, msg.outTempTH, color, -30, 50 );
} else {
drawLinearGauge( 'temp', msg.inTemp, msg.inTempTL, msg.inTempTH, color, -30, 50 );
}
color = '#297589';
if ( msg.outHumidity >= 25 ) { color = '#208420'; }
......@@ -162,8 +167,9 @@ var mode = 'day';
$('#datetime').val( d.getUTCFullYear().toString() );
}
var series = [ { valueField: "outTemp", name: "Temperatur" },
{ valueField: "windChill", name: "Wind Chill" } ];
var series = [ { valueField: "windChill", name: "Wind Chill" },
{ valueField: "outTemp", name: "Außen" },
{ valueField: "inTemp", name: "Innen" } ];
drawChart( 'chart_temp', msg, series, '°C');
series = [ { valueField: "outHumidity", name: "Luftfeuchte" } ];
drawChart( 'chart_hum', msg, series, '%');
......@@ -363,7 +369,11 @@ var mode = 'day';
url: "archive/current.json",
cache: false
}).done(function(msg) {
$('#we_temp-value').html(msg.outTemp);
if ( temp === 'out' ) {
$('#we_temp-value').html(msg.outTemp);
} else {
$('#we_temp-value').html(msg.inTemp);
}
$('#we_barometer-value').html(msg.pressure);
$('#we_windspeed-value').html(msg.windSpeed);
$('#we_humidity-value').html(msg.outHumidity);
......@@ -474,7 +484,10 @@ var mode = 'day';
e.preventDefault();
scrollDate($(this).val());
});
/* $('#tempInOut').bootstrapToggle({
on: 'Außen',
off: 'Innen'
});*/
$('#datetime').datepicker({
language: "de",
startDate: "05/01/2012",
......@@ -486,6 +499,19 @@ var mode = 'day';
updateGraphs(mode, now);
});
}
if ( $('body').hasClass('current') ) {
$('#tempInOut').change(function() {
if ( $(this).prop('checked') ) {
temp = 'in';
$('.we_current .current_temp h4 span').html('Innen');
} else {
temp = 'out';
$('.we_current .current_temp h4 span').html('Außen');
}
updateGauges();
updateCurrent();
});
}
if ( $('body').hasClass('current') || $('body').hasClass('archive') ) {
$('.lapses .input-group.date.day').datepicker({
language: "de",
......
......@@ -35,6 +35,7 @@
<link href="bower_components/ie10-viewport-bug-workaround/dist/ie10-viewport-bug-workaround.css" rel="stylesheet" type="text/css"/>
<link href="bower_components/devextreme/css/dx.common.css" rel="stylesheet" type="text/css"/>
<link href="bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.css" rel="stylesheet" type="text/css"/>
<link href="bower_components/bootstrap-toggle/css/bootstrap2-toggle.css" rel="stylesheet" type="text/css"/>
<link href="assets/css/main.css" rel="stylesheet" type="text/css"/>
<!-- /build -->
<style>
......@@ -151,6 +152,9 @@
<div>
<div id="gauge_temp"></div>
<div class="value_container"><span id="value_temp" class="value">$current.outTemp.formatted</span><span class="sup">$unit.label.outTemp</span></div>
<div class="temp_checkbox">
<input type="checkbox" id="tempInOut" data-toggle="toggle" data-on="Innen" data-off="Außen" data-size="large" data-height="35" data-width="100">
</div>
</div>
</div>
</div>
......@@ -160,6 +164,9 @@
<div>
<div id="gauge_rain"></div>
<div class="value_container"><span id="value_rain" class="value">$day.rain.sum.formatted</span><span class="sup">$unit.label.rain</span></div>
<div class="dummy_checkbox">
&nbsp;
</div>
</div>
</div>
</div>
......@@ -238,7 +245,7 @@
<div class="row">
<div class="col-xs-8">
<div class="whitebg current_temp">
<h4>Temperatur</h4>
<h4>Temperatur <span>Außen</span></h4>
<span id="we_temp-value">$current.outTemp.formatted</span><span class="sup we_tempunit">$unit.label.outTemp</span>
</div>
</div>
......@@ -431,6 +438,7 @@
<script src="bower_components/bootstrap-datepicker/dist/locales/bootstrap-datepicker.de.min.js" type="text/javascript"></script>
<script src="bower_components/jquery-zoom/jquery.zoom.min.js" type="text/javascript"></script>
<script src="bower_components/jquery-fullscreen/jquery.fullscreen.js" type="text/javascript"></script>
<script src="bower_components/bootstrap-toggle/js/bootstrap2-toggle.js" type="text/javascript"></script>
<script src="bower_components/ie10-viewport-bug-workaround/dist/ie10-viewport-bug-workaround.js" type="text/javascript"></script>
<script src="assets/js/main.js" type="text/javascript"></script>
<!-- /build -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment