Skip to content

Commit

Permalink
Item1496: TableTmplPlugin now using logical class 'sorted'.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/TableTmplPlugin@3660 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
StephaneLenclud authored and StephaneLenclud committed Apr 24, 2009
1 parent e38adb4 commit 8c2cc3d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Foswiki/Plugins/TableTmplPlugin/Core.pm
Expand Up @@ -84,7 +84,7 @@ BEGIN {
my $conf=$Foswiki::cfg{Plugins}{CssPlugin};
%cssClasses = (
'table', (defined $conf->{'table'}?$conf->{'table'}:'foswikiTable'),
'primary', (defined $conf->{'primary'}?$conf->{'primary'}:'foswikiSortedCol'),
'sorted', (defined $conf->{'sorted'}?$conf->{'sorted'}:'foswikiSortedCol'),
'tr', (defined $conf->{'tr'}?$conf->{'tr'}:''),
'th', (defined $conf->{'th'}?$conf->{'th'}:''),
'td', (defined $conf->{'td'}?$conf->{'td'}:''),
Expand All @@ -105,7 +105,7 @@ BEGIN {
#Original table plugin style
%cssClasses = (
'table', 'foswikiTable',
'primary', 'foswikiSortedCol',
'sorted', 'foswikiSortedCol',
'tr', '',
'th', '',
'td', '',
Expand Down Expand Up @@ -891,7 +891,7 @@ sub _appendToClassList {
sub _appendSortedCssClass {
my ($classList) = @_;

return _appendToClassList( $classList, $cssClasses{'primary'} );
return _appendToClassList( $classList, $cssClasses{'sorted'} );
}

sub _appendRowNumberCssClass {
Expand Down Expand Up @@ -1102,7 +1102,7 @@ sub _addStylesToHead {
if ( defined $cssAttrs{headerBgSorted} ) {
unless ( $cssAttrs{headerBgSorted} =~ /none/i ) {
my $attr = 'background-color:' . $cssAttrs{headerBgSorted} . ';';
push( @styles, "$selector th.$cssClasses{primary} {$attr}" );
push( @styles, "$selector th.$cssClasses{sorted} {$attr}" );
}
}

Expand Down Expand Up @@ -1152,7 +1152,7 @@ sub _addStylesToHead {
$rowSelector .= $count;
my $attr = 'background-color:' . $color . ';';
push( @styles,
"$selector tr.$rowSelector td.$cssClasses{primary} {$attr}" );
"$selector tr.$rowSelector td.$cssClasses{sorted} {$attr}" );
$count++;
}
}
Expand Down

0 comments on commit 8c2cc3d

Please sign in to comment.