From e7b857aa74f59f8e680b0fa52989f1e81c683fd0 Mon Sep 17 00:00:00 2001 From: David Ashby Date: Sat, 4 Apr 2015 21:32:26 -0400 Subject: [PATCH] sort the table by name by default --- index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 23d511b..ca9d2b5 100644 --- a/index.html +++ b/index.html @@ -104,8 +104,11 @@ // so long, so messy function showInfo(gData) { + tableData = gData.slice(0).sort( + function(a, b){ return a.name == b.name ? 0 : +(a.name > b.name) || -1; } + ); tableOptions = { - "data": gData, + "data": tableData, "tableDiv": "#hackSpotsTable", "filterDiv": "#tableFilter" }