From f55d1f7ce75e605c94e5258c51cee5b6e8f0bf53 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Fri, 26 Aug 2016 17:56:23 +1200 Subject: [PATCH] Make new columns sortable --- scripts/system/html/entityList.html | 12 ++++++------ scripts/system/html/js/entityList.js | 28 ++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/scripts/system/html/entityList.html b/scripts/system/html/entityList.html index db4e7b04d4..8de77dc707 100644 --- a/scripts/system/html/entityList.html +++ b/scripts/system/html/entityList.html @@ -56,12 +56,12 @@ File - Verts - Texts - T Size - ' - Draws - Q + Verts + Texts + T Size + ' + Draws + Q diff --git a/scripts/system/html/js/entityList.js b/scripts/system/html/js/entityList.js index ba21825058..bc3d5d75bc 100644 --- a/scripts/system/html/js/entityList.js +++ b/scripts/system/html/js/entityList.js @@ -57,7 +57,25 @@ function loaded() { document.getElementById("entity-visible").onclick = function () { setSortColumn('visible'); }; - + document.getElementById("entity-verticesCount").onclick = function () { + setSortColumn('verticesCount'); + }; + document.getElementById("entity-texturesCount").onclick = function () { + setSortColumn('texturesCount'); + }; + document.getElementById("entity-texturesSize").onclick = function () { + setSortColumn('texturesSize'); + }; + document.getElementById("entity-hasTransparent").onclick = function () { + setSortColumn('hasTransparent'); + }; + document.getElementById("entity-drawCalls").onclick = function () { + setSortColumn('drawCalls'); + }; + document.getElementById("entity-hasScript").onclick = function () { + setSortColumn('hasScript'); + }; + function onRowClicked(clickEvent) { var id = this.dataset.entityId; var selection = [this.dataset.entityId]; @@ -156,7 +174,13 @@ function loaded() { type: document.querySelector('#entity-type .sort-order'), url: document.querySelector('#entity-url .sort-order'), locked: document.querySelector('#entity-locked .sort-order'), - visible: document.querySelector('#entity-visible .sort-order') + visible: document.querySelector('#entity-visible .sort-order'), + verticesCount: document.querySelector('#entity-verticesCount .sort-order'), + texturesCount: document.querySelector('#entity-texturesCount .sort-order'), + texturesSize: document.querySelector('#entity-texturesSize .sort-order'), + hasTransparent: document.querySelector('#entity-hasTransparent .sort-order'), + drawCalls: document.querySelector('#entity-drawCalls .sort-order'), + hasScript: document.querySelector('#entity-hasScript .sort-order'), } function setSortColumn(column) { if (currentSortColumn == column) {