diff options
author | Johannes Krampf <johannes.krampf@gmail.com> | 2011-12-03 11:59:46 +0100 |
---|---|---|
committer | Johannes Krampf <johannes.krampf@gmail.com> | 2011-12-03 11:59:46 +0100 |
commit | c6deca08fa2a4a71483ad5d7ba9f16e0795bcf02 (patch) | |
tree | 49123983cc2150dc232a966a124dc9e5d98cef68 /media/archweb.js | |
parent | ce034483ab02eca8921fe3441012b48a646de47b (diff) | |
parent | 4d02cd5b5d4437dd1543e2d45044db72da1989f4 (diff) |
Merge https://projects.archlinux.org/git/archweb
Diffstat (limited to 'media/archweb.js')
-rw-r--r-- | media/archweb.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/media/archweb.js b/media/archweb.js index 4f098c7d..151d0f81 100644 --- a/media/archweb.js +++ b/media/archweb.js @@ -55,6 +55,19 @@ if (typeof $.tablesorter !== 'undefined') { type: 'numeric' }); $.tablesorter.addParser({ + id: 'epochdate', + is: function(s) { return false; }, + format: function(s, t, c) { + /* TODO: this assumes our magic class is the only one */ + var epoch = $(c).attr('class'); + if (!epoch.indexOf('epoch-') == 0) { + return 0; + } + return epoch.slice(6); + }, + type: 'numeric' + }); + $.tablesorter.addParser({ id: 'longDateTime', re: /^(\d{4})-(\d{2})-(\d{2}) ([012]\d):([0-5]\d)(:([0-5]\d))?( (\w+))?$/, is: function(s) { |