update the update cell;-)
This commit is contained in:
parent
41ac1cdee1
commit
1e5d51b1f4
|
@ -68,16 +68,15 @@ block content
|
|||
|
||||
socket.on('gotstream', function(data) {
|
||||
console.log("gotstream " + data.id);
|
||||
$("div#stream-" + data.id + " h3").text(data.title);
|
||||
$("div#stream-" + data.id + " td.location").text(data.location);
|
||||
$("div#stream-" + data.id + " td.latitude").text(data.lat);
|
||||
$("div#stream-" + data.id + " td.longitude").text(data.lon);
|
||||
var now = new Date();
|
||||
$("div#stream-" + data.id + " td.update").text(now);
|
||||
$("#stream-" + data.id + " h3").text(data.title);
|
||||
$("#stream-" + data.id + " td.location").text(data.location);
|
||||
$("#stream-" + data.id + " td.latitude").text(data.lat);
|
||||
$("#stream-" + data.id + " td.longitude").text(data.lon);
|
||||
$("#stream-" + data.id + " td.update").text(new Date().toLocaleString());
|
||||
if (data.id != 43573) {
|
||||
loadMap($('div#map-' + data.id)[0], data.lat, data.lon);
|
||||
loadMap($('#map-' + data.id)[0], data.lat, data.lon);
|
||||
} else {
|
||||
loadMap($('div#map-' + data.id)[0], 34.737596,135.341564);
|
||||
loadMap($('#map-' + data.id)[0], 34.737596, 135.341564);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -87,6 +86,7 @@ block content
|
|||
console.log('searching for "#feed-' + data.feed + '"')
|
||||
var row = $('#stream-' + data.stream + '-feed-' + data.feed).html();
|
||||
if (row === undefined) {
|
||||
$("#stream-" + data.stream + " td.update").text(new Date().toLocaleString());
|
||||
var tmp = '<tr id="stream-' + data.stream + '-feed-' + data.feed + '" class="value"><td>' + data.displayname + '</td><td class="value">' + data.value + "</td></tr>";
|
||||
console.log("new tmp: " + tmp);
|
||||
$("#stream-" + data.stream + " table > tbody").append(tmp);
|
||||
|
@ -98,6 +98,7 @@ block content
|
|||
console.dir(data);
|
||||
console.log('searching for "#feed-' + data.feed + '"')
|
||||
var row = $('#stream-' + data.stream + '-feed-' + data.feed).html();
|
||||
$("#stream-" + data.stream + " td.update").text(new Date().toLocaleString());
|
||||
if (row === undefined) {
|
||||
var tmp = '<tr id="stream-' + data.stream + '-feed-' + data.feed + '" class="value"><td>' + data.displayname + '</td><td class="value">' + data.value + "</td></tr>";
|
||||
console.log("new tmp: " + tmp);
|
||||
|
|
Loading…
Reference in New Issue