Module: check_mk
Branch: master
Commit: 42722125750b9e5292bcc548b47b17695a8099f0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=42722125750b9e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Aug 24 12:17:25 2011 +0200
Only highlighting the primary sorter column title
---
web/htdocs/views.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index f80bcf6..9b81ea0 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -2192,14 +2192,14 @@ def get_sorter_name_of_painter(painter):
elif painter['name'] in multisite_sorters:
return painter['name']
-def sorted_by_painter(painter):
+def get_primary_sorter_order(painter):
sorter_name = get_sorter_name_of_painter(painter)
this_asc_sorter = (sorter_name, False)
this_desc_sorter = (sorter_name, True)
user_sort = parse_url_sorters(html.var('sort'))
- if this_asc_sorter in user_sort:
+ if user_sort and this_asc_sorter == user_sort[0]:
return 'asc'
- elif this_desc_sorter in user_sort:
+ elif user_sort and this_desc_sorter == user_sort[0]:
return 'desc'
else:
return ''
@@ -2267,7 +2267,7 @@ def paint_header(view, p):
# - Keep the _body_class variable (e.g. for dashlets)
if view.get('user_sortable', True) and get_sorter_name_of_painter(painter) is
not None:
t = "<a class=\"%s\" href=\"%s\"
title=\"%s\" target=\"_self\">%s</a>" % \
- (sorted_by_painter(painter),
+ (get_primary_sorter_order(painter),
html.makeuri([
('sort', sort_url(view['sorters'],
view['group_painters'], painter)),
('display_options', html.display_options),