--- a/templates/results.html Mon Feb 08 01:20:57 2016 +0800
+++ b/templates/results.html Wed Apr 06 11:10:23 2016 +0800
+<a href="{{ setmarks(add=mark) }}" title="{{ desc }}">{{ mark }}</a>
*<a href="{{ setmarks() }}">all</a>
+ *<a href="{{ setmarks('') }}">none</a>
--- a/viewer.py Mon Feb 08 01:20:57 2016 +0800
+++ b/viewer.py Wed Apr 06 11:10:23 2016 +0800
return 'W/"{},{}"'.format(dbmt, repomt)
- chosen = self.get_argument('marks', '')
+ chosen = self.get_argument('marks', None)
chosen = chosen.split(',')
marks = OrderedDict((mark, MARKS[mark]) for mark in chosen if mark in MARKS)
moremarks = OrderedDict((mark, desc) for mark, desc in MARKS.items() if mark not in chosen)
def fn(value=None, add=None, remove=None):
kwargs = self.request.arguments.copy()
- kwargs['marks'] = kwargs['marks'] + [add]
+ kwargs['marks'] = marks.keys() + [add]
kwargs['marks'] = [mark for mark in marks if mark != remove]