Page MenuHomePhabricator

Wikibits patch #10 - handling multiple colspans in sortable table headers
Closed, DeclinedPublic

Description

Author: bluehairedlawyer

Description:
unified diff file

This patch allows users to use use headers which span more than one column in sortable tables.

Currently MediaWiki used .cellIndex to identify the column number that doesn't take account to cells which span more than one column.

In any colspan'ed block of columns, the rows would be sorted by the leftmost column with the rest behaving as unsortable columns.

For an example where this patch would be useful, see http://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)_per_capita my intent would be to have four headers (Country, IMF, World Bank, Cia) over seven columns (Country, IMF rank, IMF figure, World Bank rank, etc...). Rather than the current more confusing layout.


Version: unspecified
Severity: enhancement

attachment diff.txt ignored as obsolete

Details

Reference
bz15591

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:20 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz15591.
bzimport added a subscriber: Unknown Object (MLST).

bluehairedlawyer wrote:

To perhaps better explain this patch in the hope of getting some attention. This patch would allow me to do this on the GDP article table, and similar tables...

+-------------+----------------+----------------+----------------+

CountryIMFWorld BankC.I.A.

+-------------+------+---------+------+---------+------+---------+

France135,000230,000133,000
Ireland520,000317,000321,000
Bangalore2565,0001006,00013080,000
...

(I'm not sure if this will display correctly.)

sumanah wrote:

Adding the "need-review" keyword for patches that need review by developers. bluehairedlawyer, thank you for your patch, and sorry it's taken so long for a response on this!

sumanah wrote:

Hey Sam, am I right in inferring that you marked this patch as obsolete because it does not currently apply cleanly to trunk?

bluehairedlawyer, if you're interested in revising your patch to work with MediaWiki's current codebase, please visit us in MediaWiki-General on IRC https://www.mediawiki.org/wiki/MediaWiki_on_IRC and talk about it. Thanks.

It won't apply as the table sorter code isn't in wikibits now

As well as being pretty obsolete. The code has been rebuilt on jquery, so is completely deprecated