Last modified: 2011-06-24 19:55:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31567, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29567 - mw.util.addPortletLink should only wrap link in <span> for "vectorTabs" portlets
mw.util.addPortletLink should only wrap link in <span> for "vectorTabs" portlets
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.20.x
All All
: Normal minor (vote)
: ---
Assigned To: Krinkle
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-24 16:43 UTC by Erwin Dokter
Modified: 2011-06-24 19:55 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch for mediawiki.util.js (836 bytes, patch)
2011-06-24 16:47 UTC, Erwin Dokter
Details
Patch for mediawiki.util.js (842 bytes, patch)
2011-06-24 19:21 UTC, Erwin Dokter
Details

Description Erwin Dokter 2011-06-24 16:43:54 UTC
By default, the function mw.util.addPortletLink wraps a link in <li><span></span></li>, when in fact, the only place where this is needed is in a vector tab.

Attached patch only wraps a link inside a span when it as placed in a menu with a vectorTabs class, resulting in a consistent DOM structure amongst different portlet in a menu section.
Comment 1 Erwin Dokter 2011-06-24 16:47:00 UTC
Created attachment 8699 [details]
Patch for mediawiki.util.js
Comment 2 Erwin Dokter 2011-06-24 19:21:26 UTC
Created attachment 8700 [details]
Patch for mediawiki.util.js

Optimized code to only call .wrap once.
Comment 3 Erwin Dokter 2011-06-24 19:30:06 UTC
Changing back to need-review because I changed the code while Krinkle reviewed the patch. Just going by the book...
Comment 4 Krinkle 2011-06-24 19:40:31 UTC
Looks good, I'll adjust the test suite first to test for this, then apply the patch.
Comment 5 Krinkle 2011-06-24 19:55:04 UTC
Tests introduced in r90728.

Bug fixed in r90729.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links