2014-02-19 16:45:36 +01:00
|
|
|
jQuery.fn.updateWithText = function(text, speed)
|
|
|
|
{
|
|
|
|
var dummy = $('<div/>').html(text);
|
|
|
|
|
|
|
|
if ($(this).html() != dummy.html())
|
|
|
|
{
|
|
|
|
$(this).fadeOut(speed/2, function() {
|
|
|
|
$(this).html(text);
|
|
|
|
$(this).fadeIn(speed/2, function() {
|
|
|
|
//done
|
2014-05-22 19:48:46 +02:00
|
|
|
});
|
2014-02-19 16:45:36 +01:00
|
|
|
});
|
|
|
|
}
|
2014-05-22 19:48:46 +02:00
|
|
|
}
|
2014-02-19 16:45:36 +01:00
|
|
|
|
|
|
|
jQuery.fn.outerHTML = function(s) {
|
|
|
|
return s
|
|
|
|
? this.before(s).remove()
|
|
|
|
: jQuery("<p>").append(this.eq(0).clone()).html();
|
|
|
|
};
|
|
|
|
|
2014-02-25 16:34:20 +01:00
|
|
|
function roundVal(temp)
|
2014-02-24 16:35:48 +01:00
|
|
|
{
|
|
|
|
return Math.round(temp * 10) / 10;
|
|
|
|
}
|
|
|
|
|
2014-02-19 16:45:36 +01:00
|
|
|
jQuery(document).ready(function($) {
|
|
|
|
|
2014-02-26 14:14:29 +01:00
|
|
|
var eventList = [];
|
|
|
|
|
2014-02-19 17:19:54 +01:00
|
|
|
var lastCompliment;
|
|
|
|
var compliment;
|
2014-02-24 16:35:48 +01:00
|
|
|
|
2015-10-18 22:16:45 -04:00
|
|
|
moment.locale(config.lang);
|
2014-02-24 16:35:48 +01:00
|
|
|
|
2014-04-21 17:15:08 +02:00
|
|
|
//connect do Xbee monitor
|
2015-04-05 11:44:40 +02:00
|
|
|
// var socket = io.connect('http://rpi-alarm.local:8082');
|
|
|
|
// socket.on('dishwasher', function (dishwasherReady) {
|
|
|
|
// if (dishwasherReady) {
|
|
|
|
// $('.dishwasher').fadeIn(2000);
|
|
|
|
// $('.lower-third').fadeOut(2000);
|
|
|
|
// } else {
|
|
|
|
// $('.dishwasher').fadeOut(2000);
|
|
|
|
// $('.lower-third').fadeIn(2000);
|
|
|
|
// }
|
|
|
|
// });
|
2014-04-21 16:51:21 +02:00
|
|
|
|
2015-10-19 01:22:00 -04:00
|
|
|
version.init();
|
2014-02-19 17:02:17 +01:00
|
|
|
|
2015-10-18 22:16:45 -04:00
|
|
|
time.init();
|
2014-02-24 11:19:51 +01:00
|
|
|
|
2015-10-19 02:15:44 -04:00
|
|
|
calendar.init();
|
2014-02-26 14:14:29 +01:00
|
|
|
|
2015-10-18 16:03:20 -04:00
|
|
|
compliments.init();
|
2014-02-19 16:45:36 +01:00
|
|
|
|
2015-10-18 21:28:58 -04:00
|
|
|
weather.init();
|
2014-02-19 16:45:36 +01:00
|
|
|
|
2015-10-19 00:42:34 -04:00
|
|
|
news.init();
|
2014-05-22 19:48:46 +02:00
|
|
|
|
2014-02-20 19:23:59 +01:00
|
|
|
});
|