r87750 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87749‎ | r87750 | r87751 >
Date:18:04, 9 May 2011
Author:krinkle
Status:ok
Tags:
Comment:
ArticleFeedback fixes for legacy skins
* CologneBlue skin ('cologneblue'): Previously absent (no #catlinks), now appended to mw.util.$content
* Nostalgia skin ('nostalgia'): Previously absent (no #catlinks), now appended to mw.util.$content
* Classic skin ('standard') is an exception, it has #catlinks on top, now forced appending to mw.util.$content
* In all other cases, the bottom of the article, _before_ #catlinks is fine and is kept as-is.
Modified paths:
  • /trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.js
@@ -311,8 +311,17 @@
312312 };
313313
314314 /* Load at the bottom of the article */
315 -$( '<div id="mw-articlefeedback"></div>' ).articleFeedback( config ).insertBefore( '#catlinks' );
 315+var $aftDiv = $( '<div id="mw-articlefeedback"></div>' ).articleFeedback( config );
316316
 317+// Put on bottom of article before #catlinks (if it exists)
 318+// Except in Classic, which has #catlinks above the article but inside content-div.
 319+if ( $( '#catlinks' ).length && mw.config.get( 'skin' ) != 'standard' ) {
 320+ $aftDiv.insertBefore( '#catlinks' );
 321+} else {
 322+ // CologneBlue, Nostalgia, ...
 323+ mw.util.$content.append( $aftDiv );
 324+}
 325+
317326 /* Add link so users can navigate to the feedback tool from the toolbox */
318327 var $tbAft = $( '<li id="t-articlefeedback"><a href="#mw-articlefeedback"></a></li>' )
319328 .find( 'a' )

Status & tagging log