MCPcopy Create free account
hub / github.com/RocketMap/RocketMap / tableSort

Function tableSort

static/js/status.js:207–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

205})
206
207function tableSort () {
208 var table = $(this).parents('.status_table').eq(0)
209 var rows = table.find('.status_row:gt(0)').toArray().sort(compare($(this).index()))
210 this.asc = !this.asc
211 if (!this.asc) {
212 rows = rows.reverse()
213 }
214 for (var i = 0; i < rows.length; i++) {
215 table.append(rows[i])
216 }
217}
218
219function compare (index) {
220 return function (a, b) {

Callers

nothing calls this directly

Calls 2

compareFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected