summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlpha <ngcoder@live.com>2016-07-23 14:43:23 -0400
committerAlpha <ngcoder@live.com>2016-07-23 14:43:23 -0400
commitc4c37d5e3dd35bbb29fd297e04aed997971bd11f (patch)
tree9649deb903c35600bd6dd54a2d08aa12908bd914
parent6db5ad3dc55162e53e653f379301754ba1a71ddb (diff)
downloadwebgrind-c4c37d5e3dd35bbb29fd297e04aed997971bd11f.zip
webgrind-c4c37d5e3dd35bbb29fd297e04aed997971bd11f.tar.gz
webgrind-c4c37d5e3dd35bbb29fd297e04aed997971bd11f.tar.bz2
Remember last column sorted on
-rw-r--r--templates/index.phtml7
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/index.phtml b/templates/index.phtml
index cacd890..1fb43f2 100644
--- a/templates/index.phtml
+++ b/templates/index.phtml
@@ -73,8 +73,12 @@
break;
}
}
+ $maxCol = 3 + count(Webgrind_Config::$tableFields);
?>
- $("#function_table").trigger("sorton",[[[<?php echo $sortCol?>,1]]]);
+ var sortCol = parseInt(document.cookie.split("=")[1]);
+ if ( isNaN(sortCol) || sortCol < 3 || sortCol > <?php echo $maxCol?> )
+ sortCol = <?php echo $sortCol?>;
+ $("#function_table").trigger("sorton",[[[sortCol,1]]]);
$('#callfilter').trigger('keyup');
if (window.location.hash.length > 2)
@@ -241,6 +245,7 @@
function sortBlock() {
$.blockUI('<div class="block_box"><h1>Sorting...</h1></div>');
+ document.cookie = "webgrind=" + this.config.sortList[0][0];
}
function loadBlock() {