Page MenuHomePhabricator

apc.css should be loaded with ResourceLoader
Closed, ResolvedPublic

Description

Well, the title basicly tells the entire story. The apc.css file should be loaded with ResourceLoader.


Version: unspecified
Severity: minor

Details

Reference
bz32662

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:01 AM
bzimport set Reference to bz32662.

Created attachment 9558
Add ResourceLoader support

attachment patch.diff ignored as obsolete

Comment on attachment 9558
Add ResourceLoader support

Index: APC.php

  • APC.php (revision 104292)

+++ APC.php (working copy)
@@ -32,3 +32,7 @@
$wgSpecialPageGroups['APC'] = 'wiki';

$wgAvailableRights[] = 'apc';
+
+$wgResourceModules['ext.apc'] = array(
+ 'styles' => 'apc.css',
+ 'localBasePath' => dirname(FILE),
+ 'remoteExtPath' => 'APC'
+);

Index: SpecialAPC.php

  • SpecialAPC.php (revision 104292)

+++ SpecialAPC.php (working copy)
@@ -100,9 +100,7 @@

			}
		}
  • $wgOut->addLink( array( 'rel' => 'stylesheet', 'type' => 'text/css',
  • 'href' => "$wgScriptPath/extensions/APC/apc.css?$wgStyleVersion", )
  • );

+ $wgOut->addModuleStyles( 'ext.apc' );

		$this->getLogo();
		$this->mainMenu();

Created attachment 9559
?debug=1 works

attachment patch(1).diff ignored as obsolete

john wrote:

Comment on attachment 9559
?debug=1 works

+ 'styles' => 'apc.css',

Spaces, otherwise I'll apply it.

Created attachment 9560
Adds ResourceLoader support for apc.css (fix previous patch errors)

Fix spacing.

Attached:

Well done Lewis! Thanks for the patch 8-)