Followup r98500, fixes flash of unstyled content

This commit is contained in:
John Du Hart 2012-02-08 14:07:10 +00:00
parent c842a0e190
commit 4383d6d598
Notes: John Du Hart 2012-02-08 14:07:10 +00:00
2 changed files with 11 additions and 4 deletions

View file

@ -139,10 +139,12 @@ $wgAjaxExportList[] = 'efCategoryTreeAjaxWrapper';
/**
* Register ResourceLoader modules
*/
$wgResourceModules['ext.categoryTree'] = array(
$commonModuleInfo = array(
'localBasePath' => dirname( __FILE__ ) . '/modules',
'remoteExtPath' => 'CategoryTree/modules',
'styles' => 'ext.categoryTree.css',
);
$wgResourceModules['ext.categoryTree'] = array(
'scripts' => 'ext.categoryTree.js',
'messages' => array(
'categorytree-collapse',
@ -158,7 +160,11 @@ $wgResourceModules['ext.categoryTree'] = array(
'categorytree-error',
'categorytree-retry',
),
);
) + $commonModuleInfo;
$wgResourceModules['ext.categoryTree.css'] = array(
'styles' => 'ext.categoryTree.css',
) + $commonModuleInfo;
/**
* Hook it up

View file

@ -161,7 +161,8 @@ class CategoryTree {
* @param OutputPage $outputPage
*/
static function setHeaders( $outputPage ) {
# Add the module
# Add the modules
$outputPage->addModuleStyles( 'ext.categoryTree.css' );
$outputPage->addModules( 'ext.categoryTree' );
}