cross
Foswiki General Assembly will be held on 28th November 2019, 1200 UTC on Freenode IRC channel #foswiki-association. See AgendaTenthGeneralAssembly

Item12609: TablePlugin does not generate unique CSS row number

pencil
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release:
Applies To: Extension
Component: TablePlugin
Branches:
Reported By: JulianLevens
Waiting For:
Last Change By: MichaelDaum
Extract from the docs:

CSS written by TablePlugin

.foswikiTableCol + column number Unique column identifier, for instance: foswikiTableCol0
.foswikiTableRow + type + row number Unique row identifier, for instance: foswikiTableRowdataBg0

The columns are indeed number 0, 1, 2, 3 ...

The rows are actually numbered 0, 1, 0, 1, 0, 1 ...

At the very least, the docs and code do not agree. I suspect fixing docs is the immediate option as quite a bit of time has lapsed and backwards compatibility comes into play.

Is generating a css class with a unique row-id actually useful? Certainly nobody has complained for years about this issue suggesting nobody has required this feature.

I now have a need to control the style of different rows which is why I came across this, but I am not sure that controllong css is the best approach, what are the alternative approaches?

-- JulianLevens - 22 Oct 2013

The 0/1 row numbering is used I suspect to change the background color for alternating rows. Changing this to actually be an incrementing row number would need to be thought through how to handle the even/odd highlighting.

-- GeorgeClark - 29 May 2014

Both classes for enumerating rows and cols are not required anymore nowadays as all browsers support nth-child. Actually those classes should be removed all together as it inflates the page size for large tables in a non-trivial way.

-- MichaelDaum - 23 Oct 2019
 

ItemTemplate edit

Summary TablePlugin does not generate unique CSS row number
ReportedBy JulianLevens
Codebase 1.1.9, 1.1.8, 1.0.8, trunk
SVN Range
AppliesTo Extension
Component TablePlugin
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r3 - 23 Oct 2019, MichaelDaum - This page was cached on 20 Nov 2019 - 10:51.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy