• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

The table header in SitePermissions renders incorrectly: The second header row has an extra empty second cell, shifting all others to the right. This happens if the first column is a multispan.

Test case with multispan and without:

| *Web* | *Sitemap* | *VIEW* || *CHANGE* || *RENAME* ||
|^| *Listed* | *DENY* | *ALLOW* | *DENY* | *ALLOW* | *DENY* | *ALLOW* |

| *Web* | *Sitemap* | *VIEW* || *CHANGE* || *RENAME* ||
|*(without)*| *Listed* | *DENY* | *ALLOW* | *DENY* | *ALLOW* | *DENY* | *ALLOW* |

Renders as:

Web Sitemap VIEW CHANGE RENAME
Listed DENY ALLOW DENY ALLOW DENY ALLOW

Web Sitemap VIEW CHANGE RENAME
(without) Listed DENY ALLOW DENY ALLOW DENY ALLOW
Same with classic skin.

-- PTh

This does not happen with Beta4, and apparently now it happens with every rowspan. Looks like rev. 7554 as a response to Item878 didn't hit the nail. CC tried to make sure that a correct function is called instead of the bogus CGI::Y, whereas it seems that no function should be called at all in the case of a rowspan.

Here's another attempt to fix it:

Index: twikiplugins/TablePlugin/lib/TWiki/Plugins/TablePlugin/Core.pm
===================================================================
--- twikiplugins/TablePlugin/lib/TWiki/Plugins/TablePlugin/Core.pm      (Revision 7647)
+++ twikiplugins/TablePlugin/lib/TWiki/Plugins/TablePlugin/Core.pm      (Arbeitskopie)
@@ -435,6 +435,7 @@
         foreach my $fcell ( @$row ) {
             $arrow = '';
             next if( $fcell->{type} eq 'X' ); # data was there so sort could work with col spanning
+            next if( $fcell->{type} eq 'Y' ); # skip this element, was rowspan above
             my $type = $fcell->{type};
             my $cell = $fcell->{text};
             my $attr = $fcell->{attrs} || {};
@@ -519,7 +520,6 @@
                     $cell = CGI::font({ color=>$color }, $cell)
                       unless $color =~ /^(|none)$/i;
                 }
-                $type = 'td';
             }
             my $fn = 'CGI::'.$type;
             no strict 'refs';

I'm setting the state to "Waiting for Feedback" because I have two questions:

  1. Where is the syntax |^| documented? I had to grep the code for rowspan to find it.
  2. Where are the testcases for plugins? I can't believe that there aren't any...

-- TWiki:Main.HaraldJoerg

  1. If it's documented, it'll be in TablePlugin
  2. Hah ha ha ha ha ROTFL - that's a good one.
    • A few plugins (mainly mine) do have testcases; where they do, unit tests are in twikiplugins/pluginname/test/unit/pluginname/pluginnameSuite.pm. They are not installed in a release.
    • Most plugins rely on a following wind and a few basic sanity checks in the plugin topic.
CC

ItemTemplate
Summary Table multirow rendering issue
ReportedBy PeterThoeny
Codebase

SVN Range

AppliesTo Extension
Component TablePlugin
Priority Urgent
CurrentState Closed
WaitingFor

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2005-11-30 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback