[BUGFIX] Hide statistic onclick header
This commit is contained in:
parent
57e06a0c59
commit
ec3cce9173
@ -8,21 +8,11 @@ define(['chroma-js', 'virtual-dom', 'filters/genericnode', 'helper'],
|
||||
|
||||
var statusTable = document.createElement('table');
|
||||
statusTable.classList.add('proportion');
|
||||
|
||||
var fwTable = document.createElement('table');
|
||||
fwTable.classList.add('proportion');
|
||||
|
||||
var hwTable = document.createElement('table');
|
||||
hwTable.classList.add('proportion');
|
||||
|
||||
var geoTable = document.createElement('table');
|
||||
geoTable.classList.add('proportion');
|
||||
|
||||
var autoTable = document.createElement('table');
|
||||
autoTable.classList.add('proportion');
|
||||
|
||||
var siteTable = document.createElement('table');
|
||||
siteTable.classList.add('proportion');
|
||||
var fwTable = statusTable.cloneNode(false);
|
||||
var hwTable = statusTable.cloneNode(false);
|
||||
var geoTable = statusTable.cloneNode(false);
|
||||
var autoTable = statusTable.cloneNode(false);
|
||||
var siteTable = statusTable.cloneNode(false);
|
||||
|
||||
function showStatGlobal(o) {
|
||||
return helper.showStat(o);
|
||||
@ -53,7 +43,6 @@ define(['chroma-js', 'virtual-dom', 'filters/genericnode', 'helper'],
|
||||
function addFilter(filter) {
|
||||
return function () {
|
||||
filterManager.addFilter(filter);
|
||||
|
||||
return false;
|
||||
};
|
||||
}
|
||||
@ -63,12 +52,9 @@ define(['chroma-js', 'virtual-dom', 'filters/genericnode', 'helper'],
|
||||
table.last = V.h('table');
|
||||
}
|
||||
|
||||
var max = 0;
|
||||
data.forEach(function (d) {
|
||||
if (d[1] > max) {
|
||||
max = d[1];
|
||||
}
|
||||
});
|
||||
var max = Math.max.apply(Math, data.map(function (o) {
|
||||
return o[1];
|
||||
}));
|
||||
|
||||
var items = data.map(function (d) {
|
||||
var v = d[1] / max;
|
||||
@ -181,11 +167,11 @@ define(['chroma-js', 'virtual-dom', 'filters/genericnode', 'helper'],
|
||||
};
|
||||
|
||||
self.renderSingle = function renderSingle(el, heading, table) {
|
||||
var h2;
|
||||
h2 = document.createElement('h2');
|
||||
var h2 = document.createElement('h2');
|
||||
h2.classList.add('proportion-header');
|
||||
h2.textContent = _.t(heading);
|
||||
h2.onclick = function onclick() {
|
||||
table.classList.toggle('hidden');
|
||||
table.classList.toggle('hide');
|
||||
};
|
||||
el.appendChild(h2);
|
||||
el.appendChild(table);
|
||||
|
@ -1,3 +1,7 @@
|
||||
.proportion-header {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.proportion {
|
||||
th {
|
||||
font-size: .95em;
|
||||
|
Loading…
Reference in New Issue
Block a user