diff options
author | Dan McGee <dan@archlinux.org> | 2011-01-14 15:18:36 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-01-14 15:18:36 -0600 |
commit | d3e1b867e4262ad044a683678adf75cd72b79912 (patch) | |
tree | 078141e4b04d1c536f7e6940bed4b450cb21d4b5 /media | |
parent | d666cf4aaf5e23ecbc5c61fdd5fe63b9e96657e8 (diff) |
Update tablesorter cache after clicking todo list status
We didn't update this before, so sorting the last after checking off a
few todos didn't work right, as it was using the old values. Fix it by
adding a call to update; this can eventually be changed to the
updateCell call commented out once I upgrade the minified tablesorter.js
file.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'media')
-rw-r--r-- | media/archweb.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/media/archweb.js b/media/archweb.js index cf8acd15..7a0d1dcc 100644 --- a/media/archweb.js +++ b/media/archweb.js @@ -14,7 +14,7 @@ if (typeof $.tablesorter !== 'undefined') { id: 'todostatus', is: function(s) { return false; }, format: function(s) { - return s.match(/incomplete/) ? 1 : 0; + return s.match(/incomplete/i) ? 1 : 0; }, type: 'numeric' }); @@ -149,6 +149,9 @@ function todolist_flag() { $(link).text('Incomplete').addClass( 'incomplete').removeClass('complete'); } + /* let tablesorter know the cell value has changed */ + /* newer version of tablesorter: $('.results').trigger('updateCell', $(link).parent('td')); */ + $('.results').trigger('update'); }); return false; } |