https://bugzilla.wikimedia.org/show_bug.cgi?id=38911

       Web browser: ---
             Bug #: 38911
           Summary: [Tablesorter] Headers with rowspan should be
                    considered for all rows
           Product: MediaWiki
           Version: 1.20-git
          Platform: All
               URL: https://commons.wikimedia.org/w/index.php?title=Common
                    s:Sandbox&oldid=75246712
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: JavaScript
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---


This is hard to describe. I hope the example at
https://commons.wikimedia.org/w/index.php?title=Commons:Sandbox&oldid=75246712
explains, what I want to say.

As far as I understand currently the code looks for the header row with most
cells, to decide which cells can be clicked to sort the table (function
buildHeaders). But it should look at the row with the most *columns*, i.e.
count cells after considering rowspan (which is somewhat contrary to bug
31420).

With a header like

{| class="wikitable sortable"
!rowspan="2" | Jahr!!rowspan="2" | Gewinner!!rowspan="2" | 
Nationalität!!colspan=5|Score
|-
! R1 !! R2 !! R3 !! R4 !! Total
|-

not only the columns labeled R1 to Total (in the second row) should be
sortable, but also the first three columns, which span over two rows and
currently aren't considered as there cells belong to the first row.

My example shows a workaround for this:

{| class="wikitable sortable"
! style="border-bottom: hidden;" | !! style="border-bottom: hidden;" | !!
style="border-bottom: hidden;" | !! colspan=5|Score
|-
! Jahr !! Gewinner !! Nationalität !! R1 !! R2 !! R3 !! R4 !! Total
|-

which just adds an invisible cell in the first row, and moves the header in the
second row. But the text should be centered vertically, and the whole header
(both rows) should be clickable.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to