Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.3

Request #4709 add <thead>, <tfoot>, <tbody> to HTMLTable renderer
Submitted: 2005-06-29 20:31 UTC
From: wiesemann Assigned: olivierg
Status: Closed Package: Structures_DataGrid
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2005-06-29 20:31 UTC] wiesemann
Description: ------------ Please add in the output of the HTMLTable renderer the tags <thead>, <tfoot> and <tbody> (in this order!). This allows to do something like in example on http://validweb.nl/artikelen/javascript/better-zebra-tables/example1.html where you can see a hover effect on the table rows (the "zebra style" itself is already implement in the renderer and has nothing to do with this request). One could have this effect without the addition of these tages but then the effect also applies to the header and footer rows (see my other request on SDG_Header) where you don't know how many of such rows exist in the table (optional table header, optional column headers, optional table footer). All current browsers know how to handle <thead>, <tfoot> and <tbody>, they especially also won't get confused with the "wrong" order (which is this way specified in the (X)HTML standard). I can provide a patch if this request is accepted.

Comments

 [2005-06-29 20:41 UTC] asnagy
The Table tags are generated by HTML_Table. Does HTML_Table offer these tags? If not, this bug should be forwarded to that package.
 [2005-06-29 21:10 UTC] wiesemann
Sorry, I have not thought about HTML_Table. HTML_Table does not offer these tags currently. I will open a feature request for that package. Feel free to set this request to "Closed" or "Suspended" or something else.
 [2005-07-13 15:48 UTC] asnagy
This bug is for HTML_Table
 [2005-10-11 19:54 UTC] wiesemann
Reopening this feature request, as HTML_Table has now support for <thead>, <tfoot> and <tbody>. It's in the CVS repository, and it should be released in the next few weeks. This is not an urgent request, but a nice addition to SDG. After all the other bugs and requests (especially with change in the HTMLTable renderer) are closed, you might think about adding support for these tags. As usual, I can provide code for this request.
 [2005-11-01 22:30 UTC] olivierg at php dot net
Agreed. Please provide a patch against the current CVS.
 [2005-11-02 13:05 UTC] wiesemann
Before I make the patch, there are two important questions: (1) Can we add a dependency on HTML_Table >= 1.6.1? The other opinion would be to do a function_exists("getHeader") on the table object, to check whether the thead/tfoot/tbody stuff is available. (2) Should the grouping into <thead> (for the column headers) and <tbody> (for the data rows; <tfoot> is not needed here) be the default case or should there be a method like setUseTGroups(boolean) with default value false? ($useTGroups is the name of the constructor parameter in HTML_Table, so this name could be also used here)
 [2005-11-02 22:02 UTC] at php dot net
HTML_Table 1.6.1 is stable, so that's okay for the new dependency. I prefer the new <thead> and <tbody> grouping to be enabled by default. AFAICS (basic CSS tests) it is harmless and will give users layout ideas when they simply look at SDG's output. I don't see how this new grouping feature could disturb anyone, so we'll think about a setUseTGroups() method if a user ever complains.
 [2005-11-02 22:05 UTC] olivierg at php dot net
I forgot to login before posting this last comment. That was me ;-)
 [2005-11-03 15:24 UTC] wiesemann
Here is the diff (including - as special service just for you *g* - the needed changes in package.xml): www.markwiesemann.de/php/Structures_DataGrid/tgroup.diff
 [2005-11-03 15:41 UTC] olivierg at php dot net
Patched! Thanks :-)