Item12609: TablePlugin does not generate unique CSS row number

Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release:
Applies To: Extension
Component: TablePlugin
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
ReleasedIn n/a
Topic revision: r3 - 23 Oct 2019, MichaelDaum - This page was cached on 14 May 2020 - 06:14.

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