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