summaryrefslogtreecommitdiff
path: root/sitestatic
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-26 09:59:34 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-26 09:59:34 -0400
commit5bfa5b7eee551c14ecee616f1830dc4603497311 (patch)
tree53917036e3a7b515c6c794aa7d1c127d61c15508 /sitestatic
parent9d3cb6e783603d4991f7e610912ba5665fd43260 (diff)
parent55b776d58999412cd6bf0787a41d6ab00bf80fb6 (diff)
Merge branch 'archweb-generic2'
Conflicts: main/fixtures/arches.json settings.py templates/public/index.html templates/public/svn.html
Diffstat (limited to 'sitestatic')
-rw-r--r--sitestatic/archweb.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js
index f7be50d8..be6f5256 100644
--- a/sitestatic/archweb.js
+++ b/sitestatic/archweb.js
@@ -31,6 +31,7 @@ if (typeof $ !== 'undefined' && typeof $.tablesorter !== 'undefined') {
},
type: 'numeric'
});
+
$.tablesorter.addParser({
id: 'todostatus',
is: function(s) { return false; },
@@ -44,6 +45,7 @@ if (typeof $ !== 'undefined' && typeof $.tablesorter !== 'undefined') {
},
type: 'numeric'
});
+
$.tablesorter.addParser({
/* sorts numeric, but put '', 'unknown', and '∞' last. */
id: 'mostlydigit',
@@ -60,6 +62,7 @@ if (typeof $ !== 'undefined' && typeof $.tablesorter !== 'undefined') {
},
type: 'numeric'
});
+
$.tablesorter.addParser({
/* sorts duration; put '', 'unknown', and '∞' last. */
id: 'duration',
@@ -93,6 +96,7 @@ if (typeof $ !== 'undefined' && typeof $.tablesorter !== 'undefined') {
},
type: 'numeric'
});
+
$.tablesorter.addParser({
id: 'longDateTime',
re: /^(\d{4})-(\d{2})-(\d{2}) ([012]\d):([0-5]\d)(:([0-5]\d))?( (\w+))?$/,
@@ -116,6 +120,7 @@ if (typeof $ !== 'undefined' && typeof $.tablesorter !== 'undefined') {
},
type: 'numeric'
});
+
$.tablesorter.addParser({
id: 'filesize',
re: /^(\d+(?:\.\d+)?) (bytes?|[KMGTPEZY]i?B)$/,
@@ -161,6 +166,17 @@ if (typeof $ !== 'undefined' && typeof $.tablesorter !== 'undefined') {
},
type: 'numeric'
});
+
+ $.tablesorter.removeParser = function(id) {
+ $.tablesorter.parsers = $.grep($.tablesorter.parsers,
+ function(ele, i) {
+ return ele.id !== id;
+ });
+ };
+
+ // We don't use currency, and the parser is over-zealous at deciding it
+ // matches. Kill it from the parser selection.
+ $.tablesorter.removeParser('currency');
}
(function($) {