jenkins-bot has submitted this change and it was merged.

Change subject: Make $wgNoticeCloseButton not load closeWindow19x19.png from 
upload.wikimedia.org
......................................................................


Make $wgNoticeCloseButton not load closeWindow19x19.png from 
upload.wikimedia.org

Put CloseWindow19x19.png into the resources/subscribing/ folder. 
The image is embedded now in CSS instead of the previous use in javascript.

Bug: T72462
Change-Id: Ia61b18a83dbab9540c2d9068a10eab31805403cb
---
M CentralNotice.hooks.php
M CentralNotice.php
M resources/infrastructure/bannereditor.js
A resources/subscribing/CloseWindow19x19.png
M resources/subscribing/ext.centralNotice.display.css
5 files changed, 16 insertions(+), 10 deletions(-)

Approvals:
  Krinkle: Looks good to me, but someone else must approve
  Ejegg: Looks good to me, but someone else must approve
  AndyRussG: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index 7a09271..ee966fe 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -296,8 +296,8 @@
  */
 function efResourceLoaderGetConfigVars( &$vars ) {
        global $wgNoticeFundraisingUrl, $wgContLang, $wgNoticeXXCountries,
-                  $wgNoticeInfrastructure, $wgNoticeCloseButton,
-                  $wgCentralBannerRecorder, $wgNoticeNumberOfBuckets, 
$wgNoticeBucketExpiry,
+                  $wgNoticeInfrastructure, $wgCentralBannerRecorder, 
+                  $wgNoticeNumberOfBuckets, $wgNoticeBucketExpiry,
                   $wgNoticeNumberOfControllerBuckets, 
$wgNoticeCookieDurations, $wgScript,
                   $wgNoticeHideUrls, $wgNoticeOldCookieEpoch, 
$wgCentralNoticeSampleRate,
                   $wgCentralSelectedBannerDispatcher,
@@ -349,8 +349,6 @@
        $vars[ 'wgCentralNoticePerCampaignBucketExtension' ] = 
$wgCentralNoticePerCampaignBucketExtension;
 
        if ( $wgNoticeInfrastructure ) {
-               $vars[ 'wgNoticeCloseButton' ] = $wgNoticeCloseButton;
-
                // Add campaign mixin defs for use in admin interface
                $vars[ 'wgCentralNoticeCampaignMixins' ] = 
$wgCentralNoticeCampaignMixins;
        }
diff --git a/CentralNotice.php b/CentralNotice.php
index d25a50c..5868f6b 100644
--- a/CentralNotice.php
+++ b/CentralNotice.php
@@ -103,9 +103,6 @@
 $wgNoticeCounterSource = 
'http://wikimediafoundation.org/wiki/Special:ContributionTotal?action=raw';
 $wgNoticeDailyCounterSource = 
'http://wikimediafoundation.org/wiki/Special:DailyTotal?action=raw';
 
-// URL for a banner close button
-$wgNoticeCloseButton = 
'//upload.wikimedia.org/wikipedia/foundation/2/20/CloseWindow19x19.png';
-
 // URL prefix where banner screenshots are stored. False if this feature is 
disabled.
 // meta.wikimedia.org CentralNotice banners are archived at 
'http://fundraising-archive.wmflabs.org/banner/'
 $wgNoticeBannerPreview = false;
diff --git a/resources/infrastructure/bannereditor.js 
b/resources/infrastructure/bannereditor.js
index 5d56399..1847f1b 100644
--- a/resources/infrastructure/bannereditor.js
+++ b/resources/infrastructure/bannereditor.js
@@ -171,9 +171,8 @@
                                buttonValue = '<a href="#" title="'
                                        + mw.msg( 'centralnotice-close-title' )
                                        + '" 
onclick="mw.centralNotice.hideBanner();return false;">'
-                                       + '<img border="0" src="' + 
mw.config.get( 'wgNoticeCloseButton' )
-                                       + '" alt="' + mw.msg( 
'centralnotice-close-title' )
-                                       + '" /></a>';
+                                       + '<div class="cn-closeButton">' + 
mw.msg( 'centralnotice-close-title' )
+                                       + '</div></a>';
                        }
                        if ( document.selection ) {
                                // IE support
diff --git a/resources/subscribing/CloseWindow19x19.png 
b/resources/subscribing/CloseWindow19x19.png
new file mode 100644
index 0000000..c96d9ff
--- /dev/null
+++ b/resources/subscribing/CloseWindow19x19.png
Binary files differ
diff --git a/resources/subscribing/ext.centralNotice.display.css 
b/resources/subscribing/ext.centralNotice.display.css
index 300f96b..6d41096 100644
--- a/resources/subscribing/ext.centralNotice.display.css
+++ b/resources/subscribing/ext.centralNotice.display.css
@@ -3,3 +3,15 @@
                display: none;
        }
 }
+
+.cn-closeButton {
+       display: inline-block;
+       zoom: 1;
+       /* @embed */
+       background: url(CloseWindow19x19.png);
+       width: 19px;
+       height: 19px;
+       text-indent: 19px;
+       white-space: nowrap;
+       overflow: hidden;
+}
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/247990
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia61b18a83dbab9540c2d9068a10eab31805403cb
Gerrit-PatchSet: 12
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Rosalieper <rosaliepers...@gmail.com>
Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com>
Gerrit-Reviewer: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: Cdentinger <cdentin...@wikimedia.org>
Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Ssmith <ssm...@wikimedia.org>
Gerrit-Reviewer: XenoRyet <dkozlow...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to