Json BG loader Readet and working

This commit is contained in:
JonatanRek 2019-09-21 16:35:52 +02:00
parent 5bb42132e2
commit 5e2af0fdbc

View File

@ -182,36 +182,36 @@ $( '[name="room"]' ).change(function (e) {
}); });
// var windowLoc = $(location).attr('pathname'); var windowLoc = $(location).attr('pathname');
// windowLoc = windowLoc.substring(windowLoc.lastIndexOf("/")); windowLoc = windowLoc.substring(windowLoc.lastIndexOf("/"));
// console.log(); console.log();
// if (windowLoc == "/") { if (windowLoc == "/") {
// var autoUpdate = setInterval(function(){ var autoUpdate = setInterval(function(){
// $.ajax({ $.ajax({
// url: 'ajax', url: 'ajax',
// type: 'POST', type: 'POST',
// dataType: 'json', dataType: 'json',
// data: { data: {
// "action": 'getState' "action": 'getState'
// }, },
// success: function(data){ success: function(data){
// // console.log('DATA: ', data); console.log(data);
// for (const key in data) { for (const key in data) {
// if (data.hasOwnProperty(key)) { if (data.hasOwnProperty(key)) {
// const device = data[key]; const device = data[key];
// $('[data-sub-device-id="'+key+'"]') $('[data-sub-device-id="'+key+'"]')
// .find('.device-button-value') .find('.device-button-value')
// .text(device['value']) .text(device['value'])
// .attr('title',device['time']) .attr('title',device['time'])
// } }
// } }
// }, },
// error: function (request, status, error) { error: function (request, status, error) {
// console.log("ERROR ajaxChart():", request, error); console.log("ERROR ajaxChart():", request, error);
// } }
// }); });
// },2000); },2000);
// } }