mirror of https://github.com/calzoneman/sync.git
Add Total row to channellist
This commit is contained in:
parent
0f2c17b828
commit
aba806018c
|
@ -98,6 +98,7 @@
|
||||||
}
|
}
|
||||||
return y - x;
|
return y - x;
|
||||||
});
|
});
|
||||||
|
var total = 0;
|
||||||
for(var i = 0; i < data.length; i++) {
|
for(var i = 0; i < data.length; i++) {
|
||||||
var d = data[i];
|
var d = data[i];
|
||||||
var tr = $("<tr/>").appendTo($("#channeldata"));
|
var tr = $("<tr/>").appendTo($("#channeldata"));
|
||||||
|
@ -106,8 +107,15 @@
|
||||||
.text(d.name)
|
.text(d.name)
|
||||||
.appendTo(name);
|
.appendTo(name);
|
||||||
$("<td/>").text(d.usercount || 0).appendTo(tr);
|
$("<td/>").text(d.usercount || 0).appendTo(tr);
|
||||||
|
total += (d.usercount || 0);
|
||||||
$("<td/>").text(d.title || "-").appendTo(tr);
|
$("<td/>").text(d.title || "-").appendTo(tr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var tr = $("<tr/>").appendTo($("#channeldata"));
|
||||||
|
$("<td/>").text("Total").appendTo(tr);
|
||||||
|
$("<td/>").text(total).appendTo(tr);
|
||||||
|
$("<td/>").appendTo(tr);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function createCookie(name,value,days) {
|
function createCookie(name,value,days) {
|
||||||
|
|
Loading…
Reference in New Issue