Active
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
table style
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2009 at 15:42 UTC
Updated:
3 Jan 2013 at 15:19 UTC
i would like to have a css class for the link which has the current sorted header.
This is a rather simple change
before:
<a class="active"></a>
after:
<a class="active-sort active"></a>
| Comment | File | Size | Author |
|---|---|---|---|
| views_style_table_active_sort_class.patch | 1.13 KB | dawehner |
Comments
Comment #1
merlinofchaos commentedIn Drupal, 'active' has a slightly different meaning, though, which is why this is using active-sort. I'm not sure if this is really a good idea.
Comment #2
dawehnerperhaps it could be current-sort
in the current status, there is no way to use css for the current sort header in views tables
Comment #3
merlinofchaos commentedWhat's wrong with th.active a and td.active a?
Comment #4
dawehnerpuh thats long ago :)
i think the problem was, that every normal active link on the site has this class too, for example the menu item from the current page.
Comment #5
merlinofchaos commentedYes, though that's also the default for tablesort. I try not to have Views diverge too much from that so that Views tables don't look different from normal Drupal system tables.
Comment #6
BarisW commented@merlinofchaos: I believe this is still a valid issue in 7.x. It is not possible to style the current sorted column header differently, as all links have the class 'active'. IF the th or td has a class 'active' (as suggested in #3) this would be fine too, but as far as I can see, no th/td has the class 'active'.
Any thoughts?
Comment #7
dawehnerFor me the table itself has the needed active class on the right column, so this seems to be a fixed for me.