sorttable.js breaks too much

Bug #345139 reported by Brian Murray
10
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Eleanor Berger

Bug Description

In sorttable.js the following code exists:

        if ((' ' + cell.className + ' ').indexOf(" default-sort ") != -1) {
            ts_arrowDown(img);
            break;
        }
        if ((' ' + cell.className + ' ').indexOf(" default-revsort ") != -1) {
            ts_arrowUp(img);
            break;
        }
        if ((' ' + cell.className + ' ').indexOf(" initial-sort ") != -1) {
            ts_resortTable(lnk);
            break;
        }

However, the break statements make it so that you can't use something like 'class="initial-sort default-sort"' in an page that utilizes sorttable.js.

Revision history for this message
Brian Murray (brian-murray) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

I'm using this in the following the report:

http://qa.ubuntu.com/reports/bugnumbers/bugs-since-2009-03-26.html

which I'd like sorted by bug gravity in descending order which isn't possible. I've already added the necessary formatting to the report:

<th class="default-sort initial-sort">Gravity</th>

so if sorttable.js is fixed the report should be correctly sorted.

visibility: private → public
Changed in launchpad:
assignee: nobody → intellectronica
importance: Undecided → Medium
milestone: none → 2.2.4
status: New → Triaged
tags: added: javascript
affects: launchpad → malone
Changed in malone:
milestone: 2.2.4 → none
milestone: none → 2.2.4
Revision history for this message
Eleanor Berger (intellectronica) wrote :

Actually, this is more a foundations bug (though i'm still happy to get this merged myself).

affects: malone → launchpad-foundations
Changed in launchpad-foundations:
milestone: 2.2.4 → none
milestone: none → 2.2.4
Changed in launchpad-foundations:
milestone: 2.2.4 → 2.2.5
assignee: Tom Berger (intellectronica) → nobody
Changed in launchpad-foundations:
assignee: nobody → Tom Berger (intellectronica)
milestone: 2.2.5 → 2.2.6
Revision history for this message
Eleanor Berger (intellectronica) wrote :

Fixed in devel r8514

Changed in launchpad-foundations:
status: Triaged → Fix Committed
Changed in launchpad-foundations:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.