Bug Tracker

Opened 14 years ago

Closed 12 years ago

#901 closed feature (fixed)

Sorting the plugins page by plugin name — at Version 2

Reported by: Andrea Ercolino Owned by:
Priority: minor Milestone:
Component: site Version: 1.1
Keywords: plugins page Cc:
Blocked by: Blocking:

Description (last modified by kswedberg)

I've written a little jquery sorter for the plugins page (you can test it in Firebug, through the console):

var a = $("#bodyContent ul > li");
$( "#bodyContent" ).html( $( a.get().sort( function( x, y ) {

    tx = $( "> b > a", x ).text();
    tx = tx ? tx.toUpperCase() : " ";
    ty = $( "> b > a", y ).text();
    ty = ty ? ty.toUpperCase() : " ";
    return tx < ty ? -1 : tx > ty ? +1 : 0;

} ) ).wrap( "<ul></ul>" ) );

I made it sort the whole page because the HTML generated for the plugins page lacks a containment structure. In fact, plugins sections aren't really sections, neither list items are really items. Sections are only headers, between unordered lists, and list items are one item per list, ie one separate list per plugin.

It should be relatively simple for you to (1) fix the containment structure, (2) adapt the above snippet to work on sections, and (3) add a button with that code to each section.

Change History (1)

comment:2 Changed 12 years ago by kswedberg

Description: modified (diff)
need: Review
Resolution: fixed
Status: newclosed

We've have moved the plugins page to an entire plugins site at http://plugins.jquery.com/

Note: See TracTickets for help on using tickets.