Skip to content

Commit

Permalink
Item13688: fixed css precedence for table css
Browse files Browse the repository at this point in the history
- removed hard-coded vertical alignment
- up'ed plugin version
- some perl tidy
  • Loading branch information
MichaelDaum committed Sep 9, 2015
1 parent 982bf89 commit 4f23f56
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion TablePlugin/data/System/TablePlugin.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1426439233" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1441799782" format="1.1" version="1"}%
%META:TOPICPARENT{name="Plugins"}%
---+ Table Plugin

Expand Down Expand Up @@ -193,6 +193,7 @@ Sort icons in the header are read from %SYSTEMWEB%.DocumentGraphics.

%TABLE{columnwidths="10%,90%"}%
| Change History: | <!-- specify latest version first -->&nbsp; |
| 09 Sep 2015 | 1.150: Foswikitask:Item13688 - fixed css precedence for table css emitted by !TablePlugin; removed hard-coded vertical alignment |
| 28 May 2013 | 1.142: Foswikitask:Item12480 - memory leak amasses css styles from all visited pages |
| 28 Nov 2012 | 1.141: Foswikitask:Item12233 - Don't generate table sort links when rendering static html. |
| 06 Apr 2012 | 1.140: Arthur Clemens: Foswikitask:Item11354 adds warning message when =include= parameter fails. |
Expand Down
4 changes: 2 additions & 2 deletions TablePlugin/lib/Foswiki/Plugins/TablePlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ BEGIN {
}

# Simple decimal version, use parse method, no leading "v"
our $VERSION = '1.142';
our $RELEASE = '1.142';
our $VERSION = '1.150';
our $RELEASE = '09 Sep 2015';
our $SHORTDESCRIPTION =
'Control attributes of tables and sorting of table columns';
our $NO_PREFS_IN_TOPIC = 1;
Expand Down
10 changes: 5 additions & 5 deletions TablePlugin/lib/Foswiki/Plugins/TablePlugin/Core.pm
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ sub _parseAttributes {
_storeAttribute( 'columnWidthsListRef',
_arrayRefFromParam( $inParams->{columnwidths} ),
$inCollection );
_storeAttribute( 'vAlign', $inParams->{valign} || 'top', $inCollection );
_storeAttribute( 'vAlign', $inParams->{valign}, $inCollection );
_storeAttribute( 'dataVAlign', $inParams->{datavalign}, $inCollection );
_storeAttribute( 'headerVAlign', $inParams->{headervalign}, $inCollection );
_storeAttribute( 'headerBgSorted',
Expand Down Expand Up @@ -673,8 +673,8 @@ sub _processTableRow {
my $nRows = scalar(@curTable);
my $rspan = $rowspan[$col] + 1;
if ( $rspan > 1 ) {
$curTable[ $nRows - $rspan ][$col]->{attrs}->{rowspan} =
$rspan;
$curTable[ $nRows - $rspan ][$col]->{attrs}->{rowspan}
= $rspan;
}
undef( $rowspan[$col] );
}
Expand Down Expand Up @@ -1307,10 +1307,10 @@ sub _createCssStyles {
$selector =~ s/xhover/hover/go; # remove sorting hack
# TODO: optimize by combining identical rules
if ( $selector eq '#' ) {
push @styles, "$tableSelector {$selectors}";
push @styles, "body $tableSelector {$selectors}";
}
else {
push @styles, "$tableSelector $selector {$selectors}";
push @styles, "body $tableSelector $selector {$selectors}";
}
}
}
Expand Down

0 comments on commit 4f23f56

Please sign in to comment.