diff options
author | Dan McGee <dan@archlinux.org> | 2012-07-09 00:40:17 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-07-28 17:52:52 -0500 |
commit | 2a221fa72fd8491ca1a0633ba62b6a846267b4fc (patch) | |
tree | 5768f0af4e3ca1c55df498ff552c03663862e261 /sitestatic/archweb.js | |
parent | 280c53eec5661252b5692fa374292c4d421e3bd8 (diff) |
Upgrade to jQuery 1.7.2 and a maintained tablesorterrelease_2012-07-28
This touches a wide variety of files as well as makes updates to some of
our own code to be fully compatible. We also use some of the newer
locale/accent sorting features of tablesorter to make tables with
developer names sort in a more sane fashion.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'sitestatic/archweb.js')
-rw-r--r-- | sitestatic/archweb.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index 6586d312..9e9bddf6 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -26,11 +26,11 @@ if (typeof $.tablesorter !== 'undefined') { var c = table.config; return ($.inArray(s, this.special) > -1) || $.tablesorter.isDigit(s, c); }, - format: function(s) { + format: function(s, t) { if ($.inArray(s, this.special) > -1) { return Number.MAX_VALUE; } - return $.tablesorter.formatFloat(s); + return $.tablesorter.formatFloat(s, t); }, type: 'numeric' }); @@ -73,7 +73,7 @@ if (typeof $.tablesorter !== 'undefined') { is: function(s) { return this.re.test(s); }, - format: function(s) { + format: function(s, t) { var matches = this.re.exec(s); if (!matches) { return 0; @@ -86,7 +86,7 @@ if (typeof $.tablesorter !== 'undefined') { * between 0-11, because things have to be difficult. */ var date = new Date(matches[1], matches[2] - 1, matches[3], matches[4], matches[5], matches[7]); - return $.tablesorter.formatFloat(date.getTime()); + return $.tablesorter.formatFloat(date.getTime(), t); }, type: 'numeric' }); @@ -253,7 +253,7 @@ function filter_packages() { all_rows.hide(); rows.show(); /* make sure we update the odd/even styling from sorting */ - $('.results').trigger('applyWidgets'); + $('.results').trigger('applyWidgets', [false]); } function filter_packages_reset() { $('#id_archonly').val('both'); @@ -274,7 +274,7 @@ function todolist_flag() { 'incomplete').removeClass('complete'); } /* let tablesorter know the cell value has changed */ - $('.results').trigger('updateCell', $(link).closest('td')); + $('.results').trigger('updateCell', [$(link).closest('td')[0], false, null]); }); return false; } @@ -303,7 +303,7 @@ function filter_todolist() { rows.show(); $('#filter-count').text(rows.length); /* make sure we update the odd/even styling from sorting */ - $('.results').trigger('applyWidgets'); + $('.results').trigger('applyWidgets', [false]); } function filter_todolist_reset() { $('#id_incomplete').removeAttr('checked'); @@ -360,7 +360,8 @@ function signoff_package() { link.text('Revoke Signoff'); link.attr('href', base_href + '/signoff/revoke/'); } - $('.results').trigger('updateCell', approved); + /* let tablesorter know the cell value has changed */ + $('.results').trigger('updateCell', [approved[0], false, null]); }); return false; } @@ -385,7 +386,7 @@ function filter_signoffs() { rows.show(); $('#filter-count').text(rows.length); /* make sure we update the odd/even styling from sorting */ - $('.results').trigger('applyWidgets'); + $('.results').trigger('applyWidgets', [false]); } function filter_signoffs_reset() { $('#signoffs_filter .arch_filter').attr('checked', 'checked'); |