r102964 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102963‎ | r102964 | r102965 >
Date:10:33, 14 November 2011
Author:catrope
Status:ok
Tags:
Comment:
Fix $ aliasing in CentralNotice
Modified paths:
  • /trunk/extensions/CentralNotice/special/SpecialBannerController.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/special/SpecialBannerController.php
@@ -70,7 +70,7 @@
7171 "' + bannerPage + '\"></script>';\n";
7272 $js .= <<<JAVASCRIPT
7373 if ( document.cookie.indexOf( 'centralnotice_'+bannerType+'=hide' ) == -1 ) {
74 - $( '#siteNotice' ).prepend( '<div id="centralNotice" class="' +
 74+ jQuery( '#siteNotice' ).prepend( '<div id="centralNotice" class="' +
7575 ( wgNoticeToggleState ? 'expanded' : 'collapsed' ) +
7676 ' cn-' + bannerType + '">'+bannerScript+'</div>' );
7777 }
@@ -137,7 +137,7 @@
138138 }
139139 }
140140 }
141 - $( document ).ready( function () {
 141+ jQuery( document ).ready( function ( $ ) {
142142 // Initialize the query string vars
143143 $.centralNotice.fn.getQueryStringVariables();
144144 if( $.centralNotice.data.getVars['banner'] ) {
@@ -184,7 +184,7 @@
185185 }
186186 }
187187 function hideBanner() {
188 - $( '#centralNotice' ).hide(); // Hide current banner
 188+ jQuery( '#centralNotice' ).hide(); // Hide current banner
189189 var bannerType = $.centralNotice.data.bannerType;
190190 if ( bannerType === undefined ) bannerType = 'default';
191191 setBannerHidingCookie( bannerType ); // Hide future banners of the same type

Follow-up revisions

RevisionCommit summaryAuthorDate
r1029661.18wmf1: MFT r102962, r102964catrope10:35, 14 November 2011

Status & tagging log