Index: trunk/extensions/CategoryTree/CategoryTree.php |
— | — | @@ -139,10 +139,12 @@ |
140 | 140 | /** |
141 | 141 | * Register ResourceLoader modules |
142 | 142 | */ |
143 | | -$wgResourceModules['ext.categoryTree'] = array( |
| 143 | +$commonModuleInfo = array( |
144 | 144 | 'localBasePath' => dirname( __FILE__ ) . '/modules', |
145 | 145 | 'remoteExtPath' => 'CategoryTree/modules', |
146 | | - 'styles' => 'ext.categoryTree.css', |
| 146 | +); |
| 147 | + |
| 148 | +$wgResourceModules['ext.categoryTree'] = array( |
147 | 149 | 'scripts' => 'ext.categoryTree.js', |
148 | 150 | 'messages' => array( |
149 | 151 | 'categorytree-collapse', |
— | — | @@ -158,8 +160,12 @@ |
159 | 161 | 'categorytree-error', |
160 | 162 | 'categorytree-retry', |
161 | 163 | ), |
162 | | -); |
| 164 | +) + $commonModuleInfo; |
163 | 165 | |
| 166 | +$wgResourceModules['ext.categoryTree.css'] = array( |
| 167 | + 'styles' => 'ext.categoryTree.css', |
| 168 | +) + $commonModuleInfo; |
| 169 | + |
164 | 170 | /** |
165 | 171 | * Hook it up |
166 | 172 | */ |
Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php |
— | — | @@ -161,7 +161,8 @@ |
162 | 162 | * @param OutputPage $outputPage |
163 | 163 | */ |
164 | 164 | static function setHeaders( $outputPage ) { |
165 | | - # Add the module |
| 165 | + # Add the modules |
| 166 | + $outputPage->addModuleStyles( 'ext.categoryTree.css' ); |
166 | 167 | $outputPage->addModules( 'ext.categoryTree' ); |
167 | 168 | } |
168 | 169 | |