summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-01-14 15:18:36 -0600
committerDan McGee <dan@archlinux.org>2011-01-14 15:18:36 -0600
commitd3e1b867e4262ad044a683678adf75cd72b79912 (patch)
tree078141e4b04d1c536f7e6940bed4b450cb21d4b5
parentd666cf4aaf5e23ecbc5c61fdd5fe63b9e96657e8 (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>
-rw-r--r--media/archweb.js5
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;
}