Index: branches/resourceloader/phase3/includes/AutoLoader.php |
— | — | @@ -198,6 +198,7 @@ |
199 | 199 | 'ReplacementArray' => 'includes/StringUtils.php', |
200 | 200 | 'Replacer' => 'includes/StringUtils.php', |
201 | 201 | 'ResourceLoader' => 'includes/ResourceLoader.php', |
| 202 | + 'ResourceLoaderFileModule' => 'includes/ResourceLoaderModule.php', |
202 | 203 | 'ResourceLoaderModule' => 'includes/ResourceLoaderModule.php', |
203 | 204 | 'ResourceLoaderSiteJSModule' => 'includes/ResourceLoaderModule.php', |
204 | 205 | 'ReverseChronologicalPager' => 'includes/Pager.php', |
Index: branches/resourceloader/phase3/includes/ResourceLoaderModule.php |
— | — | @@ -18,10 +18,96 @@ |
19 | 19 | * @author Roan Kattouw |
20 | 20 | */ |
21 | 21 | |
22 | | -// TODO: Class comment |
23 | | -// TODO: Add an interface to inherit from rather than having to subclass this class, or add an empty-returning superclass |
24 | | -class ResourceLoaderModule { |
| 22 | +/** |
| 23 | + * Interface for resource loader modules, with name registration functionality. |
| 24 | + */ |
| 25 | +abstract class ResourceLoaderModule { |
25 | 26 | private $name = null; |
| 27 | + |
| 28 | + /** |
| 29 | + * Get this module's name. This is set when the module is registered |
| 30 | + * with ResourceLoader::register() |
| 31 | + * @return mixed Name (string) or null if no name was set |
| 32 | + */ |
| 33 | + public function getName() { |
| 34 | + return $this->name; |
| 35 | + } |
| 36 | + |
| 37 | + /** |
| 38 | + * Set this module's name. This is called by ResourceLodaer::register() |
| 39 | + * when registering the module. Other code should not call this. |
| 40 | + * @param $name string Name |
| 41 | + */ |
| 42 | + public function setName( $name ) { |
| 43 | + $this->name = $name; |
| 44 | + } |
| 45 | + |
| 46 | + /** |
| 47 | + * Get all JS for this module for a given language and skin. |
| 48 | + * Includes all relevant JS except loader scripts. |
| 49 | + * @param $lang string Language code |
| 50 | + * @param $skin string Skin name |
| 51 | + * @param $debug bool Whether to include debug scripts |
| 52 | + * @return string JS |
| 53 | + */ |
| 54 | + public abstract function getScript( $lang, $skin, $debug ); |
| 55 | + |
| 56 | + /** |
| 57 | + * Get all CSS for this module for a given skin. |
| 58 | + * @param $skin string Skin name |
| 59 | + * @return string CSS |
| 60 | + */ |
| 61 | + public abstract function getStyle( $skin ); |
| 62 | + |
| 63 | + /** |
| 64 | + * Get the messages needed for this module. |
| 65 | + * |
| 66 | + * To get a JSON blob with messages, use MessageBlobStore::get() |
| 67 | + * @return array of message keys. Keys may occur more than once |
| 68 | + */ |
| 69 | + public abstract function getMessages(); |
| 70 | + |
| 71 | + /** |
| 72 | + * Get the loader JS for this module, if set. |
| 73 | + * @return mixed Loader JS (string) or false if no custom loader set |
| 74 | + */ |
| 75 | + public abstract function getLoaderScript(); |
| 76 | + |
| 77 | + /** |
| 78 | + * Get a list of modules this module depends on. |
| 79 | + * |
| 80 | + * Dependency information is taken into account when loading a module |
| 81 | + * on the client side. When adding a module on the server side, |
| 82 | + * dependency information is NOT taken into account and YOU are |
| 83 | + * responsible for adding dependent modules as well. If you don't do |
| 84 | + * this, the client side loader will send a second request back to the |
| 85 | + * server to fetch the missing modules, which kind of defeats the |
| 86 | + * purpose of the resource loader. |
| 87 | + * |
| 88 | + * To add dependencies dynamically on the client side, use a custom |
| 89 | + * loader script, see getLoaderScript() |
| 90 | + * @return array Array of module names (strings) |
| 91 | + */ |
| 92 | + public abstract function getDependencies(); |
| 93 | + |
| 94 | + /** |
| 95 | + * Get this module's last modification timestamp for a given |
| 96 | + * combination of language, skin and debug mode flag. This is typically |
| 97 | + * the highest of each of the relevant components' modification |
| 98 | + * timestamps. Whenever anything happens that changes the module's |
| 99 | + * contents for these parameters, the mtime should increase. |
| 100 | + * @param $lang string Language code |
| 101 | + * @param $skin string Skin name |
| 102 | + * @param $debug bool Debug mode flag |
| 103 | + * @return int UNIX timestamp |
| 104 | + */ |
| 105 | + public abstract function getmtime( $lang, $skin, $debug ); |
| 106 | +} |
| 107 | + |
| 108 | +/** |
| 109 | + * Module based on local JS/CSS files. This is the most common type of module. |
| 110 | + */ |
| 111 | +class ResourceLoaderFileModule extends ResourceLoaderModule { |
26 | 112 | private $scripts = array(); |
27 | 113 | private $styles = array(); |
28 | 114 | private $messages = array(); |
— | — | @@ -98,14 +184,6 @@ |
99 | 185 | } |
100 | 186 | } |
101 | 187 | |
102 | | - public function getName() { |
103 | | - return $this->name; |
104 | | - } |
105 | | - |
106 | | - public function setName( $name ) { |
107 | | - $this->name = $name; |
108 | | - } |
109 | | - |
110 | 188 | /** |
111 | 189 | * Add script files to this module. In order to be valid, a module |
112 | 190 | * must contain at least one script file. |
— | — | @@ -215,15 +293,6 @@ |
216 | 294 | $this->loaders = array_merge( $this->loaders, (array)$scripts ); |
217 | 295 | } |
218 | 296 | |
219 | | - /** |
220 | | - * Get all JS for this module for a given language and skin. This |
221 | | - * aggregates the output of getPrimaryScript(), getLanguageScript(), |
222 | | - * getSkinScript() and getDebugScript() (but NOT getLoaderScript() !) |
223 | | - * @param $lang string Language code |
224 | | - * @param $skin string Skin name |
225 | | - * @param $debug bool Whether to include debug scripts |
226 | | - * @return string JS |
227 | | - */ |
228 | 297 | public function getScript( $lang, $skin, $debug ) { |
229 | 298 | $retval = $this->getPrimaryScript() . "\n" . |
230 | 299 | $this->getLanguageScript( $lang ) . "\n" . |
— | — | @@ -234,13 +303,47 @@ |
235 | 304 | return $retval; |
236 | 305 | } |
237 | 306 | |
| 307 | + public function getStyle( $skin ) { |
| 308 | + return $this->getPrimaryStyle() . "\n" . $this->getSkinStyle( $skin ); |
| 309 | + } |
| 310 | + |
| 311 | + public function getMessages() { |
| 312 | + return $this->messages; |
| 313 | + } |
| 314 | + |
| 315 | + public function getDependencies() { |
| 316 | + return $this->dependencies; |
| 317 | + } |
| 318 | + |
| 319 | + public function getLoaderScript() { |
| 320 | + if ( count( $this->loaders ) == 0 ) { |
| 321 | + return false; |
| 322 | + } |
| 323 | + return self::concatScripts( $this->loaders ); |
| 324 | + } |
| 325 | + |
238 | 326 | /** |
239 | | - * Get all CSS for this module for a given skin. This |
240 | | - * aggregates the output of getPrimaryStyle() and getSkinStyle() |
| 327 | + * Get the last modified timestamp of this module, which is calculated |
| 328 | + * as the highest last modified timestamp of its constituent files and |
| 329 | + * the files it depends on (see getFileDependencies()). Only files |
| 330 | + * relevant to the given language and skin are taken into account, and |
| 331 | + * files only relevant in debug mode are not taken into account when |
| 332 | + * debug mode is off. |
| 333 | + * @param $lang string Language code |
241 | 334 | * @param $skin string Skin name |
| 335 | + * @param $debug bool Debug mode flag |
| 336 | + * @return int UNIX timestamp |
242 | 337 | */ |
243 | | - public function getStyle( $skin ) { |
244 | | - return $this->getPrimaryStyle() . $this->getSkinStyle( $skin ); |
| 338 | + public function getmtime( $lang, $skin, $debug ) { |
| 339 | + $files = array_merge( $this->scripts, $this->styles, |
| 340 | + $debug ? $this->debugScripts : array(), |
| 341 | + isset( $this->languageScripts[$lang] ) ? (array)$this->languageScripts[$lang] : array(), |
| 342 | + (array)self::getSkinFiles( $skin, $this->skinScripts ), |
| 343 | + (array)self::getSkinFiles( $skin, $this->skinStyles ), |
| 344 | + $this->loaders, |
| 345 | + $this->getFileDependencies( $lang, $skin ) |
| 346 | + ); |
| 347 | + return max( array_map( 'filemtime', $files ) ); |
245 | 348 | } |
246 | 349 | |
247 | 350 | /** |
— | — | @@ -262,24 +365,6 @@ |
263 | 366 | } |
264 | 367 | |
265 | 368 | /** |
266 | | - * Get the messages added to this module with addMessages(). |
267 | | - * |
268 | | - * To get a JSON blob with messages, use MessageBlobStore::get() |
269 | | - * @return array of message keys. Keys may occur more than once |
270 | | - */ |
271 | | - public function getMessages() { |
272 | | - return $this->messages; |
273 | | - } |
274 | | - |
275 | | - /** |
276 | | - * Get the dependencies added to this module with addDependencies() |
277 | | - * @return array of module names (strings) |
278 | | - */ |
279 | | - public function getDependencies() { |
280 | | - return $this->dependencies; |
281 | | - } |
282 | | - |
283 | | - /** |
284 | 369 | * Get the debug JS for this module. This is pulled from the script |
285 | 370 | * files added through addDebugScripts() |
286 | 371 | * @return string JS |
— | — | @@ -335,48 +420,12 @@ |
336 | 421 | } |
337 | 422 | |
338 | 423 | /** |
339 | | - * Get the custom loader JS, if set. This is pulled from the script |
340 | | - * files added through addLoaders() |
341 | | - * @return mixed Loader JS (string) or false if no custom loader set |
342 | | - */ |
343 | | - public function getLoaderScript() { |
344 | | - if ( count( $this->loaders ) == 0 ) { |
345 | | - return false; |
346 | | - } |
347 | | - return self::concatScripts( $this->loaders ); |
348 | | - } |
349 | | - |
350 | | - /** |
351 | | - * Get the last modified timestamp of this module, which is calculated |
352 | | - * as the highest last modified timestamp of its constituent files and |
353 | | - * the files it depends on (see getFileDependencies()). Only files |
354 | | - * relevant to the given language and skin are taken into account, and |
355 | | - * files only relevant in debug mode are not taken into account when |
356 | | - * debug mode is off. |
357 | | - * @param $lang string Language code |
358 | | - * @param $skin string Skin name |
359 | | - * @param $debug bool Debug mode flag |
360 | | - * @return int UNIX timestamp |
361 | | - */ |
362 | | - public function getmtime( $lang, $skin, $debug ) { |
363 | | - $files = array_merge( $this->scripts, $this->styles, |
364 | | - $debug ? $this->debugScripts : array(), |
365 | | - isset( $this->languageScripts[$lang] ) ? (array)$this->languageScripts[$lang] : array(), |
366 | | - (array)self::getSkinFiles( $skin, $this->skinScripts ), |
367 | | - (array)self::getSkinFiles( $skin, $this->skinStyles ), |
368 | | - $this->loaders, |
369 | | - $this->getFileDependencies( $lang, $skin ) |
370 | | - ); |
371 | | - return max( array_map( 'filemtime', $files ) ); |
372 | | - } |
373 | | - |
374 | | - /** |
375 | 424 | * Get the files this module depends on indirectly for a given skin. |
376 | 425 | * Currently these are only image files referenced by the module's CSS. |
377 | 426 | * @param $skin string Skin name |
378 | 427 | * @return array of files |
379 | 428 | */ |
380 | | - public function getFileDependencies( $skin ) { |
| 429 | + protected function getFileDependencies( $skin ) { |
381 | 430 | $dbr = wfGetDb( DB_SLAVE ); |
382 | 431 | $deps = $dbr->selectField( 'module_deps', 'md_deps', array( |
383 | 432 | 'md_module' => $this->getName(), |
— | — | @@ -403,7 +452,7 @@ |
404 | 453 | * @return string Concatenated and remapped contents of $files |
405 | 454 | */ |
406 | 455 | protected static function concatStyles( $files ) { |
407 | | - return implode( "\n", array_map( array( 'ResourceLoaderModule', 'remapStyle' ), array_unique( (array) $files ) ) ); |
| 456 | + return implode( "\n", array_map( array( __CLASS__, 'remapStyle' ), array_unique( (array) $files ) ) ); |
408 | 457 | } |
409 | 458 | |
410 | 459 | /** |
— | — | @@ -421,7 +470,7 @@ |
422 | 471 | * Custom module for MediaWiki:Common.js and MediaWiki:Skinname.js |
423 | 472 | */ |
424 | 473 | class ResourceLoaderSiteJSModule extends ResourceLoaderModule { |
425 | | - protected function getSkinScript( $skin ) { |
| 474 | + public function getScript( $lang, $skin, $debug ) { |
426 | 475 | return Skin::newFromKey( $skin )->generateUserJs(); |
427 | 476 | } |
428 | 477 | |
— | — | @@ -447,14 +496,8 @@ |
448 | 497 | return $retval; |
449 | 498 | } |
450 | 499 | |
451 | | - // Dummy overrides to return emptyness |
452 | | - // FIXME: Use a parent class with emptyness and let the normal module class inherit from that |
453 | | - protected function getPrimaryScript() { return ''; } |
454 | | - protected function getPrimaryStyle() { return ''; } |
| 500 | + public function getStyle( $skin ) { return ''; } |
455 | 501 | public function getMessages() { return array(); } |
| 502 | + public function getLoaderScript() { return ''; } |
456 | 503 | public function getDependencies() { return array(); } |
457 | | - protected function getDebugScript() { return ''; } |
458 | | - protected function getLanguageScript( $lang ) { return ''; } |
459 | | - protected function getSkinStyle( $skin ) { return ''; } |
460 | | - public function getLoaderScript() { return false; } |
461 | 504 | } |
Index: branches/resourceloader/phase3/resources/Resources.php |
— | — | @@ -8,21 +8,21 @@ |
9 | 9 | |
10 | 10 | /* Skins */ |
11 | 11 | |
12 | | - 'vector' => new ResourceLoaderModule( array( 'styles' => 'skins/vector/main-ltr.css' ) ), |
| 12 | + 'vector' => new ResourceLoaderFileModule( array( 'styles' => 'skins/vector/main-ltr.css' ) ), |
13 | 13 | |
14 | 14 | /* jQuery */ |
15 | 15 | |
16 | | - 'jquery' => new ResourceLoaderModule( array( 'scripts' => 'resources/jquery/jquery.js' ) ), |
| 16 | + 'jquery' => new ResourceLoaderFileModule( array( 'scripts' => 'resources/jquery/jquery.js' ) ), |
17 | 17 | |
18 | 18 | /* jQuery Plugins */ |
19 | 19 | |
20 | | - 'jquery.tabIndex' => new ResourceLoaderModule( array( 'scripts' => 'resources/jquery/jquery.tabIndex.js' ) ), |
21 | | - 'jquery.cookie' => new ResourceLoaderModule( array( 'scripts' => 'resources/jquery/jquery.cookie.js' ) ), |
| 20 | + 'jquery.tabIndex' => new ResourceLoaderFileModule( array( 'scripts' => 'resources/jquery/jquery.tabIndex.js' ) ), |
| 21 | + 'jquery.cookie' => new ResourceLoaderFileModule( array( 'scripts' => 'resources/jquery/jquery.cookie.js' ) ), |
22 | 22 | |
23 | 23 | /* jQuery UI */ |
24 | 24 | |
25 | 25 | // Core |
26 | | - 'jquery.ui.core' => new ResourceLoaderModule( array( |
| 26 | + 'jquery.ui.core' => new ResourceLoaderFileModule( array( |
27 | 27 | 'scripts' => 'resources/jquery.ui/jquery.ui.core.js', |
28 | 28 | 'skinStyles' => array( |
29 | 29 | 'default' => array( |
— | — | @@ -36,28 +36,28 @@ |
37 | 37 | ), |
38 | 38 | 'dependencies' => 'jquery', |
39 | 39 | ) ), |
40 | | - 'jquery.ui.widget' => new ResourceLoaderModule( array( |
| 40 | + 'jquery.ui.widget' => new ResourceLoaderFileModule( array( |
41 | 41 | 'scripts' => 'resources/jquery.ui/jquery.ui.widget.js', |
42 | 42 | 'dependencies' => 'jquery.ui.core', |
43 | 43 | ) ), |
44 | | - 'jquery.ui.mouse' => new ResourceLoaderModule( array( |
| 44 | + 'jquery.ui.mouse' => new ResourceLoaderFileModule( array( |
45 | 45 | 'scripts' => 'resources/jquery.ui/jquery.ui.mouse.js', |
46 | 46 | 'dependencies' => 'jquery', |
47 | 47 | ) ), |
48 | | - 'jquery.ui.position' => new ResourceLoaderModule( array( |
| 48 | + 'jquery.ui.position' => new ResourceLoaderFileModule( array( |
49 | 49 | 'scripts' => 'resources/jquery.ui/jquery.ui.position.js', |
50 | 50 | 'dependencies' => 'jquery', |
51 | 51 | ) ), |
52 | 52 | // Interactions |
53 | | - 'jquery.ui.draggable' => new ResourceLoaderModule( array( |
| 53 | + 'jquery.ui.draggable' => new ResourceLoaderFileModule( array( |
54 | 54 | 'scripts' => 'resources/jquery.ui/jquery.ui.draggable.js', |
55 | 55 | 'dependencies' => 'jquery.ui.core', |
56 | 56 | ) ), |
57 | | - 'jquery.ui.droppable' => new ResourceLoaderModule( array( |
| 57 | + 'jquery.ui.droppable' => new ResourceLoaderFileModule( array( |
58 | 58 | 'scripts' => 'resources/jquery.ui/jquery.ui.droppable.js', |
59 | 59 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.draggable' ), |
60 | 60 | ) ), |
61 | | - 'jquery.ui.resizable' => new ResourceLoaderModule( array( |
| 61 | + 'jquery.ui.resizable' => new ResourceLoaderFileModule( array( |
62 | 62 | 'scripts' => 'resources/jquery.ui/jquery.ui.resizable.js', |
63 | 63 | 'skinStyles' => array( |
64 | 64 | 'default' => 'resources/jquery.ui/themes/default/jquery.ui.resizable.css', |
— | — | @@ -65,7 +65,7 @@ |
66 | 66 | ), |
67 | 67 | 'dependencies' => 'jquery.ui.core', |
68 | 68 | ) ), |
69 | | - 'jquery.ui.selectable' => new ResourceLoaderModule( array( |
| 69 | + 'jquery.ui.selectable' => new ResourceLoaderFileModule( array( |
70 | 70 | 'scripts' => 'resources/jquery.ui/jquery.ui.selectable.js', |
71 | 71 | 'skinStyles' => array( |
72 | 72 | 'default' => 'resources/jquery.ui/themes/default/jquery.ui.selectable.css', |
— | — | @@ -73,12 +73,12 @@ |
74 | 74 | ), |
75 | 75 | 'dependencies' => 'jquery.ui.core', |
76 | 76 | ) ), |
77 | | - 'jquery.ui.sortable' => new ResourceLoaderModule( array( |
| 77 | + 'jquery.ui.sortable' => new ResourceLoaderFileModule( array( |
78 | 78 | 'scripts' => 'resources/jquery.ui/jquery.ui.sortable.js', |
79 | 79 | 'dependencies' => 'jquery.ui.core', |
80 | 80 | ) ), |
81 | 81 | // Widgets |
82 | | - 'jquery.ui.accordion' => new ResourceLoaderModule( array( |
| 82 | + 'jquery.ui.accordion' => new ResourceLoaderFileModule( array( |
83 | 83 | 'scripts' => 'resources/jquery.ui/jquery.ui.accordion.js', |
84 | 84 | 'dependencies' => 'jquery.ui.core', |
85 | 85 | 'skinStyles' => array( |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.accordion.css', |
88 | 88 | ), |
89 | 89 | ) ), |
90 | | - 'jquery.ui.autocomplete' => new ResourceLoaderModule( array( |
| 90 | + 'jquery.ui.autocomplete' => new ResourceLoaderFileModule( array( |
91 | 91 | 'scripts' => 'resources/jquery.ui/jquery.ui.autocomplete.js', |
92 | 92 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.position' ), |
93 | 93 | 'skinStyles' => array( |
— | — | @@ -94,7 +94,7 @@ |
95 | 95 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.autocomplete.css', |
96 | 96 | ), |
97 | 97 | ) ), |
98 | | - 'jquery.ui.button' => new ResourceLoaderModule( array( |
| 98 | + 'jquery.ui.button' => new ResourceLoaderFileModule( array( |
99 | 99 | 'scripts' => 'resources/jquery.ui/jquery.ui.button.js', |
100 | 100 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget' ), |
101 | 101 | 'skinStyles' => array( |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.button.css', |
104 | 104 | ), |
105 | 105 | ) ), |
106 | | - 'jquery.ui.datepicker' => new ResourceLoaderModule( array( |
| 106 | + 'jquery.ui.datepicker' => new ResourceLoaderFileModule( array( |
107 | 107 | 'scripts' => 'resources/jquery.ui/jquery.ui.datepicker.js', |
108 | 108 | 'dependencies' => 'jquery.ui.core', |
109 | 109 | 'skinStyles' => array( |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | 'zh-tw' => 'resources/jquery.ui/i18n/jquery.ui.datepicker-zh-TW.js' |
166 | 166 | ), |
167 | 167 | ) ), |
168 | | - 'jquery.ui.dialog' => new ResourceLoaderModule( array( |
| 168 | + 'jquery.ui.dialog' => new ResourceLoaderFileModule( array( |
169 | 169 | 'scripts' => 'resources/jquery.ui/jquery.ui.dialog.js', |
170 | 170 | 'dependencies' => 'jquery.ui.core', |
171 | 171 | 'skinStyles' => array( |
— | — | @@ -172,7 +172,7 @@ |
173 | 173 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.dialog.css', |
174 | 174 | ), |
175 | 175 | ) ), |
176 | | - 'jquery.ui.progressbar' => new ResourceLoaderModule( array( |
| 176 | + 'jquery.ui.progressbar' => new ResourceLoaderFileModule( array( |
177 | 177 | 'scripts' => 'resources/jquery.ui/jquery.ui.progressbar.js', |
178 | 178 | 'dependencies' => 'jquery.ui.core', |
179 | 179 | 'skinStyles' => array( |
— | — | @@ -180,7 +180,7 @@ |
181 | 181 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.progressbar.css', |
182 | 182 | ), |
183 | 183 | ) ), |
184 | | - 'jquery.ui.slider' => new ResourceLoaderModule( array( |
| 184 | + 'jquery.ui.slider' => new ResourceLoaderFileModule( array( |
185 | 185 | 'scripts' => 'resources/jquery.ui/jquery.ui.slider.js', |
186 | 186 | 'dependencies' => array( 'jquery.ui.core', 'jquery.ui.widget', 'jquery.ui.mouse' ), |
187 | 187 | 'skinStyles' => array( |
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | 'vector' => 'resources/jquery.ui/themes/vector/jquery.ui.slider.css', |
190 | 190 | ), |
191 | 191 | ) ), |
192 | | - 'jquery.ui.tabs' => new ResourceLoaderModule( array( |
| 192 | + 'jquery.ui.tabs' => new ResourceLoaderFileModule( array( |
193 | 193 | 'scripts' => 'resources/jquery.ui/jquery.ui.tabs.js', |
194 | 194 | 'dependencies' => 'jquery.ui.core', |
195 | 195 | 'skinStyles' => array( |
— | — | @@ -197,159 +197,159 @@ |
198 | 198 | ), |
199 | 199 | ) ), |
200 | 200 | // Effects |
201 | | - 'jquery.effects.core' => new ResourceLoaderModule( array( |
| 201 | + 'jquery.effects.core' => new ResourceLoaderFileModule( array( |
202 | 202 | 'scripts' => 'resources/jquery.effects/jquery.effects.core.js', |
203 | 203 | 'dependencies' => 'jquery', |
204 | 204 | ) ), |
205 | | - 'jquery.effects.blind' => new ResourceLoaderModule( array( |
| 205 | + 'jquery.effects.blind' => new ResourceLoaderFileModule( array( |
206 | 206 | 'scripts' => 'resources/jquery.effects/jquery.effects.blind.js', |
207 | 207 | 'dependencies' => 'jquery.effects.core', |
208 | 208 | ) ), |
209 | | - 'jquery.effects.bounce' => new ResourceLoaderModule( array( |
| 209 | + 'jquery.effects.bounce' => new ResourceLoaderFileModule( array( |
210 | 210 | 'scripts' => 'resources/jquery.effects/jquery.effects.bounce.js', |
211 | 211 | 'dependencies' => 'jquery.effects.core', |
212 | 212 | ) ), |
213 | | - 'jquery.effects.clip' => new ResourceLoaderModule( array( |
| 213 | + 'jquery.effects.clip' => new ResourceLoaderFileModule( array( |
214 | 214 | 'scripts' => 'resources/jquery.effects/jquery.effects.clip.js', |
215 | 215 | 'dependencies' => 'jquery.effects.core', |
216 | 216 | ) ), |
217 | | - 'jquery.effects.drop' => new ResourceLoaderModule( array( |
| 217 | + 'jquery.effects.drop' => new ResourceLoaderFileModule( array( |
218 | 218 | 'scripts' => 'resources/jquery.effects/jquery.effects.drop.js', |
219 | 219 | 'dependencies' => 'jquery.effects.core', |
220 | 220 | ) ), |
221 | | - 'jquery.effects.explode' => new ResourceLoaderModule( array( |
| 221 | + 'jquery.effects.explode' => new ResourceLoaderFileModule( array( |
222 | 222 | 'scripts' => 'resources/jquery.effects/jquery.effects.explode.js', |
223 | 223 | 'dependencies' => 'jquery.effects.core', |
224 | 224 | ) ), |
225 | | - 'jquery.effects.fold' => new ResourceLoaderModule( array( |
| 225 | + 'jquery.effects.fold' => new ResourceLoaderFileModule( array( |
226 | 226 | 'scripts' => 'resources/jquery.effects/jquery.effects.fold.js', |
227 | 227 | 'dependencies' => 'jquery.effects.core', |
228 | 228 | ) ), |
229 | | - 'jquery.effects.highlight' => new ResourceLoaderModule( array( |
| 229 | + 'jquery.effects.highlight' => new ResourceLoaderFileModule( array( |
230 | 230 | 'scripts' => 'resources/jquery.effects/jquery.effects.highlight.js', |
231 | 231 | 'dependencies' => 'jquery.effects.core', |
232 | 232 | ) ), |
233 | | - 'jquery.effects.pulsate' => new ResourceLoaderModule( array( |
| 233 | + 'jquery.effects.pulsate' => new ResourceLoaderFileModule( array( |
234 | 234 | 'scripts' => 'resources/jquery.effects/jquery.effects.pulsate.js', |
235 | 235 | 'dependencies' => 'jquery.effects.core', |
236 | 236 | ) ), |
237 | | - 'jquery.effects.scale' => new ResourceLoaderModule( array( |
| 237 | + 'jquery.effects.scale' => new ResourceLoaderFileModule( array( |
238 | 238 | 'scripts' => 'resources/jquery.effects/jquery.effects.scale.js', |
239 | 239 | 'dependencies' => 'jquery.effects.core', |
240 | 240 | ) ), |
241 | | - 'jquery.effects.shake' => new ResourceLoaderModule( array( |
| 241 | + 'jquery.effects.shake' => new ResourceLoaderFileModule( array( |
242 | 242 | 'scripts' => 'resources/jquery.effects/jquery.effects.shake.js', |
243 | 243 | 'dependencies' => 'jquery.effects.core', |
244 | 244 | ) ), |
245 | | - 'jquery.effects.slide' => new ResourceLoaderModule( array( |
| 245 | + 'jquery.effects.slide' => new ResourceLoaderFileModule( array( |
246 | 246 | 'scripts' => 'resources/jquery.effects/jquery.effects.slide.js', |
247 | 247 | 'dependencies' => 'jquery.effects.core', |
248 | 248 | ) ), |
249 | | - 'jquery.effects.transfer' => new ResourceLoaderModule( array( |
| 249 | + 'jquery.effects.transfer' => new ResourceLoaderFileModule( array( |
250 | 250 | 'scripts' => 'resources/jquery.effects/jquery.effects.transfer.js', |
251 | 251 | 'dependencies' => 'jquery.effects.core', |
252 | 252 | ) ), |
253 | 253 | |
254 | 254 | /* MediaWiki */ |
255 | 255 | |
256 | | - 'mediawiki' => new ResourceLoaderModule( array( |
| 256 | + 'mediawiki' => new ResourceLoaderFileModule( array( |
257 | 257 | 'scripts' => 'resources/mediawiki/mediawiki.js', |
258 | 258 | 'debugScripts' => 'resources/mediawiki/mediawiki.log.js', |
259 | 259 | ) ), |
260 | 260 | |
261 | 261 | /* MediaWiki Utilities */ |
262 | 262 | |
263 | | - 'mediawiki.utilities.client' => new ResourceLoaderModule( array( |
| 263 | + 'mediawiki.utilities.client' => new ResourceLoaderFileModule( array( |
264 | 264 | 'scripts' => 'resources/mediawiki.util/mediawiki.utilities.client.js', |
265 | 265 | ) ), |
266 | 266 | |
267 | 267 | /* MediaWiki Legacy */ |
268 | 268 | |
269 | | - 'mediawiki.legacy.ajax' => new ResourceLoaderModule( array( |
| 269 | + 'mediawiki.legacy.ajax' => new ResourceLoaderFileModule( array( |
270 | 270 | 'scripts' => 'skins/common/ajax.js', |
271 | 271 | 'messages' => array( 'watch', 'unwatch', 'watching', 'unwatching', 'tooltip-ca-watch', 'tooltip-ca-unwatch' ), |
272 | 272 | 'dependencies' => 'mediawiki', |
273 | 273 | ) ), |
274 | | - 'mediawiki.legacy.ajaxwatch' => new ResourceLoaderModule( array( |
| 274 | + 'mediawiki.legacy.ajaxwatch' => new ResourceLoaderFileModule( array( |
275 | 275 | 'scripts' => 'skins/common/ajaxwatch.js', |
276 | 276 | 'dependencies' => 'mediawiki', |
277 | 277 | ) ), |
278 | | - 'mediawiki.legacy.block' => new ResourceLoaderModule( array( |
| 278 | + 'mediawiki.legacy.block' => new ResourceLoaderFileModule( array( |
279 | 279 | 'scripts' => 'skins/common/block.js', |
280 | 280 | 'dependencies' => 'mediawiki', |
281 | 281 | ) ), |
282 | | - 'mediawiki.legacy.changepassword' => new ResourceLoaderModule( array( |
| 282 | + 'mediawiki.legacy.changepassword' => new ResourceLoaderFileModule( array( |
283 | 283 | 'scripts' => 'skins/common/changepassword.js', |
284 | 284 | 'dependencies' => 'mediawiki', |
285 | 285 | ) ), |
286 | | - 'mediawiki.legacy.edit' => new ResourceLoaderModule( array( |
| 286 | + 'mediawiki.legacy.edit' => new ResourceLoaderFileModule( array( |
287 | 287 | 'scripts' => 'skins/common/edit.js', |
288 | 288 | 'dependencies' => 'mediawiki', |
289 | 289 | ) ), |
290 | | - 'mediawiki.legacy.enhancedchanges' => new ResourceLoaderModule( array( |
| 290 | + 'mediawiki.legacy.enhancedchanges' => new ResourceLoaderFileModule( array( |
291 | 291 | 'scripts' => 'skins/common/enhancedchanges.js', |
292 | 292 | 'dependencies' => 'mediawiki', |
293 | 293 | ) ), |
294 | | - 'mediawiki.legacy.config' => new ResourceLoaderModule( array( |
| 294 | + 'mediawiki.legacy.config' => new ResourceLoaderFileModule( array( |
295 | 295 | 'scripts' => 'skins/common/config.js', |
296 | 296 | 'styles' => array( 'skins/common/config.css', 'skins/common/config-cc.css' ), |
297 | 297 | 'dependencies' => 'mediawiki', |
298 | 298 | ) ), |
299 | | - 'mediawiki.legacy.diff' => new ResourceLoaderModule( array( |
| 299 | + 'mediawiki.legacy.diff' => new ResourceLoaderFileModule( array( |
300 | 300 | 'scripts' => 'skins/common/diff.js', |
301 | 301 | 'styles' => 'skins/common/diff.css', |
302 | 302 | 'dependencies' => 'mediawiki', |
303 | 303 | ) ), |
304 | | - 'mediawiki.legacy.history' => new ResourceLoaderModule( array( |
| 304 | + 'mediawiki.legacy.history' => new ResourceLoaderFileModule( array( |
305 | 305 | 'scripts' => 'skins/common/history.js', |
306 | 306 | 'dependencies' => 'mediawiki', |
307 | 307 | ) ), |
308 | | - 'mediawiki.legacy.htmlform' => new ResourceLoaderModule( array( |
| 308 | + 'mediawiki.legacy.htmlform' => new ResourceLoaderFileModule( array( |
309 | 309 | 'scripts' => 'skins/common/htmlform.js', |
310 | 310 | 'dependencies' => 'mediawiki', |
311 | 311 | ) ), |
312 | | - 'mediawiki.legacy.IEFixes' => new ResourceLoaderModule( array( |
| 312 | + 'mediawiki.legacy.IEFixes' => new ResourceLoaderFileModule( array( |
313 | 313 | 'scripts' => 'skins/common/IEFixes.js', |
314 | 314 | 'dependencies' => 'mediawiki', |
315 | 315 | ) ), |
316 | | - 'mediawiki.legacy.metadata' => new ResourceLoaderModule( array( |
| 316 | + 'mediawiki.legacy.metadata' => new ResourceLoaderFileModule( array( |
317 | 317 | 'scripts' => 'skins/common/metadata.js', |
318 | 318 | 'dependencies' => 'mediawiki', |
319 | 319 | ) ), |
320 | | - 'mediawiki.legacy.mwsuggest' => new ResourceLoaderModule( array( |
| 320 | + 'mediawiki.legacy.mwsuggest' => new ResourceLoaderFileModule( array( |
321 | 321 | 'scripts' => 'skins/common/mwsuggest.js', |
322 | 322 | 'dependencies' => 'mediawiki', |
323 | 323 | ) ), |
324 | | - 'mediawiki.legacy.password' => new ResourceLoaderModule( array( |
| 324 | + 'mediawiki.legacy.password' => new ResourceLoaderFileModule( array( |
325 | 325 | 'scripts' => 'skins/common/password.js', |
326 | 326 | 'styles' => 'skins/common/password.css', |
327 | 327 | 'dependencies' => 'mediawiki', |
328 | 328 | ) ), |
329 | | - 'mediawiki.legacy.prefs' => new ResourceLoaderModule( array( |
| 329 | + 'mediawiki.legacy.prefs' => new ResourceLoaderFileModule( array( |
330 | 330 | 'scripts' => 'skins/common/prefs.js', |
331 | 331 | 'dependencies' => 'mediawiki', |
332 | 332 | ) ), |
333 | | - 'mediawiki.legacy.preview' => new ResourceLoaderModule( array( |
| 333 | + 'mediawiki.legacy.preview' => new ResourceLoaderFileModule( array( |
334 | 334 | 'scripts' => 'skins/common/preview.js', |
335 | 335 | 'dependencies' => 'mediawiki', |
336 | 336 | ) ), |
337 | | - 'mediawiki.legacy.protect' => new ResourceLoaderModule( array( |
| 337 | + 'mediawiki.legacy.protect' => new ResourceLoaderFileModule( array( |
338 | 338 | 'scripts' => 'skins/common/protect.js', |
339 | 339 | 'dependencies' => 'mediawiki', |
340 | 340 | ) ), |
341 | | - 'mediawiki.legacy.rightclickedit' => new ResourceLoaderModule( array( |
| 341 | + 'mediawiki.legacy.rightclickedit' => new ResourceLoaderFileModule( array( |
342 | 342 | 'scripts' => 'skins/common/rightclickedit.js', |
343 | 343 | 'dependencies' => 'mediawiki', |
344 | 344 | ) ), |
345 | | - 'mediawiki.legacy.search' => new ResourceLoaderModule( array( |
| 345 | + 'mediawiki.legacy.search' => new ResourceLoaderFileModule( array( |
346 | 346 | 'scripts' => 'skins/common/search.js', |
347 | 347 | 'dependencies' => 'mediawiki', |
348 | 348 | ) ), |
349 | | - 'mediawiki.legacy.upload' => new ResourceLoaderModule( array( |
| 349 | + 'mediawiki.legacy.upload' => new ResourceLoaderFileModule( array( |
350 | 350 | 'scripts' => 'skins/common/upload.js', |
351 | 351 | 'dependencies' => 'mediawiki', |
352 | 352 | ) ), |
353 | | - 'mediawiki.legacy.wikibits' => new ResourceLoaderModule( array( |
| 353 | + 'mediawiki.legacy.wikibits' => new ResourceLoaderFileModule( array( |
354 | 354 | 'scripts' => 'skins/common/wikibits.js', |
355 | 355 | 'dependencies' => 'mediawiki', |
356 | 356 | 'messages' => array( 'showtoc', 'hidetoc' ), |