ui/assets/stack_tracy.js in stack_tracy-0.1.6 vs ui/assets/stack_tracy.js in stack_tracy-0.1.7

- old
+ new

@@ -1,9 +1,9 @@ if (typeof(StackTracy) == "undefined") { StackTracy = (function() { - var sortation = []; + var sortation = {cumulatives: [], realtime_cumulatives: []}; var toggle = function(event) { var group = $(event.target).closest("div").next("div.group"); var comments = group.comments(); if (comments.length) { @@ -20,15 +20,15 @@ $(this).tab("show"); }); }); return { - version: "0.1.6", - sort: function(column) { - sortation[column] = sortation[column] == "asc" ? "desc" : "asc"; - $("#cumulatives>.body>div").tsort("span:eq(" + column + ")[abbr]", { + version: "0.1.7", + sort: function(section, column) { + sortation[section][column] = sortation[section][column] == "asc" ? "desc" : "asc"; + $("#" + section + ">.body>div").tsort("span:eq(" + column + ")[abbr]", { sortFunction: function(a, b) { - var order = (sortation[column] == "asc") ? 1 : -1; + var order = (sortation[section][column] == "asc") ? 1 : -1; var av = column == 3 ? a.s : parseFloat(a.s); var bv = column == 3 ? b.s : parseFloat(b.s); if (av === bv) { return 0; } else { \ No newline at end of file