Cleaned up extraneous <tr>s
This commit is contained in:
@ -40,9 +40,6 @@ Module.register("MMM-ScreenLogic",{
|
|||||||
|
|
||||||
var contents = [];
|
var contents = [];
|
||||||
|
|
||||||
var row = document.createElement('tr');
|
|
||||||
table.appendChild(row);
|
|
||||||
|
|
||||||
if (this.config.showPoolTemp) {
|
if (this.config.showPoolTemp) {
|
||||||
var className = "";
|
var className = "";
|
||||||
if (poolData.status.currentTemp[0] <= this.config.coldTemp) {
|
if (poolData.status.currentTemp[0] <= this.config.coldTemp) {
|
||||||
@ -100,13 +97,19 @@ Module.register("MMM-ScreenLogic",{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var headerRow = document.createElement('tr');
|
var headerRow = null;
|
||||||
var contentRow = document.createElement('tr');
|
var contentRow = null;
|
||||||
table.appendChild(headerRow);
|
|
||||||
table.appendChild(contentRow);
|
|
||||||
|
|
||||||
var cols = 0;
|
var cols = -1;
|
||||||
for (var item in contents) {
|
for (var item in contents) {
|
||||||
|
cols++;
|
||||||
|
if (cols % this.config.columns === 0) {
|
||||||
|
var headerRow = document.createElement('tr');
|
||||||
|
var contentRow = document.createElement('tr');
|
||||||
|
table.appendChild(headerRow);
|
||||||
|
table.appendChild(contentRow);
|
||||||
|
}
|
||||||
|
|
||||||
var headerCell = document.createElement('th');
|
var headerCell = document.createElement('th');
|
||||||
headerCell.innerHTML = contents[item].header;
|
headerCell.innerHTML = contents[item].header;
|
||||||
headerRow.appendChild(headerCell);
|
headerRow.appendChild(headerCell);
|
||||||
@ -115,14 +118,6 @@ Module.register("MMM-ScreenLogic",{
|
|||||||
contentCell.innerHTML = contents[item].data;
|
contentCell.innerHTML = contents[item].data;
|
||||||
contentCell.className = contents[item].class;
|
contentCell.className = contents[item].class;
|
||||||
contentRow.appendChild(contentCell);
|
contentRow.appendChild(contentCell);
|
||||||
|
|
||||||
cols++;
|
|
||||||
if (cols % this.config.columns === 0) {
|
|
||||||
headerRow = document.createElement('tr');
|
|
||||||
contentRow = document.createElement('tr');
|
|
||||||
table.appendChild(headerRow);
|
|
||||||
table.appendChild(contentRow);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return table;
|
return table;
|
||||||
|
Reference in New Issue
Block a user