diff options
author | Dan McGee <dan@archlinux.org> | 2012-12-28 07:27:20 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-12-28 21:48:29 +0100 |
commit | c8ece67cec9c421ac0c711554edd34f022623b45 (patch) | |
tree | a894e1e82df91fda22807efbc3519bd18e12f321 /sitestatic | |
parent | c7658ca4cd0f89969086fed172519ca2097270ba (diff) | |
download | archweb-c8ece67cec9c421ac0c711554edd34f022623b45.tar.gz archweb-c8ece67cec9c421ac0c711554edd34f022623b45.tar.xz |
Convert to using new todolist models everywhere
This is a rather widespread set of changes converting usage to the new
todo list and todo list package model recently introduced. The data
migration is not included in this commit. After this commit, the old
model should no longer be referenced anywhere.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'sitestatic')
-rw-r--r-- | sitestatic/archweb.css | 5 | ||||
-rw-r--r-- | sitestatic/archweb.js | 17 |
2 files changed, 14 insertions, 8 deletions
diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css index 6d6e156..cfa30f5 100644 --- a/sitestatic/archweb.css +++ b/sitestatic/archweb.css @@ -999,6 +999,11 @@ ul.admin-actions { .todo-table .incomplete { color: red; } + +.todo-table .inprogress { + color: darkorange; +} + .todo-info { margin: 0; color: #999; } diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index 42efb3f..4a02fb6 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -15,7 +15,12 @@ if (typeof $ !== 'undefined' && typeof $.tablesorter !== 'undefined') { id: 'todostatus', is: function(s) { return false; }, format: function(s) { - return s.match(/incomplete/i) ? 1 : 0; + if (s.match(/incomplete/i)) { + return 1; + } else if (s.match(/in-progress/i)) { + return 0.5; + } + return 0; }, type: 'numeric' }); @@ -304,13 +309,9 @@ function todolist_flag() { // TODO: fix usage of this var link = this; $.getJSON(link.href, function(data) { - if (data.complete) { - $(link).text('Complete').addClass( - 'complete').removeClass('incomplete'); - } else { - $(link).text('Incomplete').addClass( - 'incomplete').removeClass('complete'); - } + $(link).text(data.status).removeClass( + 'complete inprogress incomplete').addClass( + data.css_class.toLowerCase()); /* let tablesorter know the cell value has changed */ $('.results').trigger('updateCell', [$(link).closest('td')[0], false, null]); }); |