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

           Summary: Implement collapsible tables in core javascript
           Product: MediaWiki
           Version: 1.15-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: need-review, patch
          Severity: enhancement
          Priority: Normal
         Component: User interface
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: happy_me...@hotmail.co.uk


Created an attachment (id=5806)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=5806)
Against r47169, implements CollapsibleTables from en.wiki in wikibits.js

This functionality is very much taken for granted, we forget that it's not
actually available in core, and must be ported to every wiki that wishes to use
it (which is a large number).  I've rewritten the code from en.wiki to remove
the external dependencies, it should now run on a clean MW installation using
only the getElementsByClassName() function that's already in wikibits.js.  The
show/hide link titles are translatable (they use the same values by default as
the show/hide links in the expanded watchlist, although of course the JS
variables can be overwritten for more specific customisation).  

Only thing that I'm not sure about is how pages will appear when this code is
deployed if a wiki already has an implementation in their Common.js.  I suspect
double show/hide links will appear; but since AFAIK core JS executes before
site JS before user JS, there's nothing that can be added to the core code to
prevent the site code from acting (short of removing the "collapsible" classes,
which might be a *little* extreme :D). 

Patch needs thorough review (I've tested the JavaScript, but not the
implementation).


-- 
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
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to