mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-12-03 12:36:26 +00:00
Followup r98500, fixes flash of unstyled content
This commit is contained in:
parent
c842a0e190
commit
4383d6d598
Notes:
John Du Hart
2012-02-08 14:07:10 +00:00
|
@ -139,10 +139,12 @@ $wgAjaxExportList[] = 'efCategoryTreeAjaxWrapper';
|
||||||
/**
|
/**
|
||||||
* Register ResourceLoader modules
|
* Register ResourceLoader modules
|
||||||
*/
|
*/
|
||||||
$wgResourceModules['ext.categoryTree'] = array(
|
$commonModuleInfo = array(
|
||||||
'localBasePath' => dirname( __FILE__ ) . '/modules',
|
'localBasePath' => dirname( __FILE__ ) . '/modules',
|
||||||
'remoteExtPath' => 'CategoryTree/modules',
|
'remoteExtPath' => 'CategoryTree/modules',
|
||||||
'styles' => 'ext.categoryTree.css',
|
);
|
||||||
|
|
||||||
|
$wgResourceModules['ext.categoryTree'] = array(
|
||||||
'scripts' => 'ext.categoryTree.js',
|
'scripts' => 'ext.categoryTree.js',
|
||||||
'messages' => array(
|
'messages' => array(
|
||||||
'categorytree-collapse',
|
'categorytree-collapse',
|
||||||
|
@ -158,7 +160,11 @@ $wgResourceModules['ext.categoryTree'] = array(
|
||||||
'categorytree-error',
|
'categorytree-error',
|
||||||
'categorytree-retry',
|
'categorytree-retry',
|
||||||
),
|
),
|
||||||
);
|
) + $commonModuleInfo;
|
||||||
|
|
||||||
|
$wgResourceModules['ext.categoryTree.css'] = array(
|
||||||
|
'styles' => 'ext.categoryTree.css',
|
||||||
|
) + $commonModuleInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hook it up
|
* Hook it up
|
||||||
|
|
|
@ -161,7 +161,8 @@ class CategoryTree {
|
||||||
* @param OutputPage $outputPage
|
* @param OutputPage $outputPage
|
||||||
*/
|
*/
|
||||||
static function setHeaders( $outputPage ) {
|
static function setHeaders( $outputPage ) {
|
||||||
# Add the module
|
# Add the modules
|
||||||
|
$outputPage->addModuleStyles( 'ext.categoryTree.css' );
|
||||||
$outputPage->addModules( 'ext.categoryTree' );
|
$outputPage->addModules( 'ext.categoryTree' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue