Index: trunk/extensions/SemanticMediaWiki/SMW.hooks.php |
— | — | @@ -1,61 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -/** |
5 | | - * Static class for hooks handled by the SMW extension. |
6 | | - * |
7 | | - * This class is an attempt to clean up SMW initialization, as it's rather messy at the moment, |
8 | | - * and the split between SMW and SMW light is not very clean. |
9 | | - * |
10 | | - * @since 1.5.3 |
11 | | - * |
12 | | - * @file SMW.hooks.php |
13 | | - * @ingroup SMW |
14 | | - * |
15 | | - * @author Jeroen De Dauw |
16 | | - */ |
17 | | -final class SMWHooks { |
18 | | - |
19 | | - /** |
20 | | - * Register the resource modules for the resource loader. |
21 | | - * |
22 | | - * @since 1.5.3 |
23 | | - * |
24 | | - * @param ResourceLoader $resourceLoader |
25 | | - * |
26 | | - * @return true |
27 | | - */ |
28 | | - public static function registerResourceLoaderModules( ResourceLoader &$resourceLoader ) { |
29 | | - global $wgContLang, $smwgScriptPath; |
30 | | - |
31 | | - $modules = array( |
32 | | - 'ext.smw.style' => array( |
33 | | - 'styles' => 'SMW_custom.css' |
34 | | - ), |
35 | | - 'ext.smw.tooltips' => array( |
36 | | - 'scripts' => 'SMW_tooltip.js', |
37 | | - 'dependencies' => array( |
38 | | - 'mediawiki.legacy.wikibits', |
39 | | - 'ext.smw.style' |
40 | | - ) |
41 | | - ), |
42 | | - 'ext.smw.sorttable' => array( |
43 | | - 'scripts' => 'SMW_sorttable.js', |
44 | | - 'dependencies' => 'ext.smw.style' |
45 | | - ) |
46 | | - ); |
47 | | - |
48 | | - foreach ( $modules as $name => $resources ) { |
49 | | - $resourceLoader->register( |
50 | | - $name, |
51 | | - new ResourceLoaderFileModule( |
52 | | - array_merge_recursive( $resources, array( 'group' => 'ext.smw' ) ), |
53 | | - dirname( __FILE__ ) . '/skins', |
54 | | - $smwgScriptPath . '/skins' |
55 | | - ) |
56 | | - ); |
57 | | - } |
58 | | - |
59 | | - return true; |
60 | | - } |
61 | | - |
62 | | -} |
\ No newline at end of file |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php |
— | — | @@ -33,7 +33,10 @@ |
34 | 34 | * available as early on. Moreover, jobs and special pages are registered. |
35 | 35 | */ |
36 | 36 | function enableSemantics( $namespace = null, $complete = false ) { |
37 | | - global $smwgIP, $wgServer, $smwgNamespace, $wgExtensionFunctions, $wgAutoloadClasses, $wgSpecialPages, $wgSpecialPageGroups, $wgHooks, $wgExtensionMessagesFiles, $wgJobClasses, $wgExtensionAliasesFiles; |
| 37 | + global $smwgIP, $wgServer, $smwgNamespace, $wgExtensionFunctions; |
| 38 | + global $wgAutoloadClasses, $wgSpecialPages, $wgSpecialPageGroups; |
| 39 | + global $wgHooks, $wgExtensionMessagesFiles, $wgJobClasses, $wgExtensionAliasesFiles; |
| 40 | + global $wgResourceModules; |
38 | 41 | |
39 | 42 | // The dot tells that the domain is not complete. It will be completed |
40 | 43 | // in the Export since we do not want to create a title object here when |
— | — | @@ -56,12 +59,31 @@ |
57 | 60 | $wgHooks['ParserTestTables'][] = 'smwfOnParserTestTables'; |
58 | 61 | //$wgHooks['AdminLinks'][] = 'smwfAddToAdminLinks'; |
59 | 62 | |
| 63 | + // Register client-side modules |
| 64 | + $moduleTemplate = array( |
| 65 | + 'localBasePath' => $smwgIP . '/skins', |
| 66 | + 'remoteBasePath' => $smwgScriptPath . '/skins', |
| 67 | + 'group' => 'ext.smw' |
| 68 | + ); |
| 69 | + $wgResourceModules['ext.smw.style'] = $moduleTemplate + array( |
| 70 | + 'styles' => 'SMW_custom.css' |
| 71 | + ); |
| 72 | + $wgResourceModules['ext.smw.tooltips'] = $moduleTemplate + array( |
| 73 | + 'scripts' => 'SMW_tooltip.js', |
| 74 | + 'dependencies' => array( |
| 75 | + 'mediawiki.legacy.wikibits', |
| 76 | + 'ext.smw.style' |
| 77 | + ) |
| 78 | + ); |
| 79 | + $wgResourceModules['ext.smw.sorttable'] = $moduleTemplate + array( |
| 80 | + 'scripts' => 'SMW_sorttable.js', |
| 81 | + 'dependencies' => 'ext.smw.style' |
| 82 | + ); |
| 83 | + |
60 | 84 | // Register special pages aliases file |
61 | 85 | $wgExtensionAliasesFiles['SemanticMediaWiki'] = $smwgIP . 'languages/SMW_Aliases.php'; |
62 | 86 | |
63 | 87 | // Set up autoloading; essentially all classes should be autoloaded! |
64 | | - $wgAutoloadClasses['SMWHooks'] = $smwgIP . 'SMW.hooks.php'; |
65 | | - |
66 | 88 | $wgAutoloadClasses['SMWParserExtensions'] = $smwgIP . 'includes/SMW_ParserExtensions.php'; |
67 | 89 | $wgAutoloadClasses['SMWInfolink'] = $smwgIP . 'includes/SMW_Infolink.php'; |
68 | 90 | // $wgAutoloadClasses['SMWFactbox'] = $smwgIP . 'includes/SMW_Factbox.php'; |
— | — | @@ -237,8 +259,6 @@ |
238 | 260 | $wgHooks['ArticleFromTitle'][] = 'smwfOnArticleFromTitle'; // special implementations for property/type articles |
239 | 261 | $wgHooks['ParserFirstCallInit'][] = 'smwfRegisterParserFunctions'; |
240 | 262 | |
241 | | - $wgHooks['ResourceLoaderRegisterModules'][] = 'SMWHooks::registerResourceLoaderModules'; |
242 | | - |
243 | 263 | $smwgMW_1_14 = true; // assume latest 1.14 API |
244 | 264 | |
245 | 265 | ///// credits (see "Special:Version") ///// |
— | — | @@ -445,4 +465,4 @@ |
446 | 466 | $parser->setFunctionHook( 'declare', array( 'SMWDeclare', 'render' ), SFH_OBJECT_ARGS ); |
447 | 467 | |
448 | 468 | return true; // Always return true, in order not to stop MW's hook processing! |
449 | | -} |
\ No newline at end of file |
| 469 | +} |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php |
— | — | @@ -31,8 +31,10 @@ |
32 | 32 | * @return true |
33 | 33 | */ |
34 | 34 | function enableSemantics( $namespace = null, $complete = false ) { |
35 | | - global $wgVersion, $wgExtensionFunctions, $wgAutoloadClasses, $wgSpecialPages, $wgSpecialPageGroups, $wgHooks, $wgExtensionMessagesFiles; |
| 35 | + global $wgVersion, $wgExtensionFunctions, $wgAutoloadClasses, $wgSpecialPages; |
| 36 | + global $wgSpecialPageGroups, $wgHooks, $wgExtensionMessagesFiles; |
36 | 37 | global $smwgIP, $smwgNamespace, $wgJobClasses, $wgExtensionAliasesFiles, $wgServer; |
| 38 | + global $wgResourceModules, $smwgScriptPath; |
37 | 39 | |
38 | 40 | // The dot tells that the domain is not complete. It will be completed |
39 | 41 | // in the Export since we do not want to create a title object here when |
— | — | @@ -55,8 +57,6 @@ |
56 | 58 | $wgHooks['ParserTestTables'][] = 'smwfOnParserTestTables'; |
57 | 59 | $wgHooks['AdminLinks'][] = 'smwfAddToAdminLinks'; |
58 | 60 | |
59 | | - $wgHooks['ResourceLoaderRegisterModules'][] = 'SMWHooks::registerResourceLoaderModules'; |
60 | | - |
61 | 61 | if ( version_compare( $wgVersion, '1.17alpha', '>=' ) ) { |
62 | 62 | // For MediaWiki 1.17 alpha and later. |
63 | 63 | $wgHooks['ExtensionTypes'][] = 'smwfAddSemanticExtensionType'; |
— | — | @@ -65,12 +65,31 @@ |
66 | 66 | $wgHooks['SpecialVersionExtensionTypes'][] = 'smwfOldAddSemanticExtensionType'; |
67 | 67 | } |
68 | 68 | |
| 69 | + // Register client-side modules |
| 70 | + $moduleTemplate = array( |
| 71 | + 'localBasePath' => $smwgIP . '/skins', |
| 72 | + 'remoteBasePath' => $smwgScriptPath . '/skins', |
| 73 | + 'group' => 'ext.smw' |
| 74 | + ); |
| 75 | + $wgResourceModules['ext.smw.style'] = $moduleTemplate + array( |
| 76 | + 'styles' => 'SMW_custom.css' |
| 77 | + ); |
| 78 | + $wgResourceModules['ext.smw.tooltips'] = $moduleTemplate + array( |
| 79 | + 'scripts' => 'SMW_tooltip.js', |
| 80 | + 'dependencies' => array( |
| 81 | + 'mediawiki.legacy.wikibits', |
| 82 | + 'ext.smw.style' |
| 83 | + ) |
| 84 | + ); |
| 85 | + $wgResourceModules['ext.smw.sorttable'] = $moduleTemplate + array( |
| 86 | + 'scripts' => 'SMW_sorttable.js', |
| 87 | + 'dependencies' => 'ext.smw.style' |
| 88 | + ); |
| 89 | + |
69 | 90 | // Register special pages aliases file |
70 | 91 | $wgExtensionAliasesFiles['SemanticMediaWiki'] = $smwgIP . 'languages/SMW_Aliases.php'; |
71 | 92 | |
72 | 93 | // Set up autoloading; essentially all classes should be autoloaded! |
73 | | - $wgAutoloadClasses['SMWHooks'] = $smwgIP . 'SMW.hooks.php'; |
74 | | - |
75 | 94 | $wgAutoloadClasses['SMWParserExtensions'] = $smwgIP . 'includes/SMW_ParserExtensions.php'; |
76 | 95 | $wgAutoloadClasses['SMWInfolink'] = $smwgIP . 'includes/SMW_Infolink.php'; |
77 | 96 | $wgAutoloadClasses['SMWFactbox'] = $smwgIP . 'includes/SMW_Factbox.php'; |
— | — | @@ -526,4 +545,4 @@ |
527 | 546 | $parser->setFunctionHook( 'declare', array( 'SMWDeclare', 'render' ), SFH_OBJECT_ARGS ); |
528 | 547 | |
529 | 548 | return true; // Always return true, in order not to stop MW's hook processing! |
530 | | -} |
\ No newline at end of file |
| 549 | +} |
Index: trunk/extensions/WikiEditor/WikiEditor.php |
— | — | @@ -60,4 +60,420 @@ |
61 | 61 | $wgHooks['EditPage::showEditForm:initial'][] = 'WikiEditorHooks::editPageShowEditFormInitial'; |
62 | 62 | $wgHooks['GetPreferences'][] = 'WikiEditorHooks::getPreferences'; |
63 | 63 | $wgHooks['MakeGlobalVariablesScript'][] = 'WikiEditorHooks::makeGlobalVariablesScript'; |
64 | | -$wgHooks['ResourceLoaderRegisterModules'][] = 'WikiEditorHooks::resourceLoaderRegisterModules'; |
| 64 | + |
| 65 | +$wikiEditorTpl = array( |
| 66 | + 'localBasePath' => dirname( __FILE__ ) . '/modules', |
| 67 | + 'remoteExtPath' => 'WikiEditor/modules', |
| 68 | + 'group' => 'ext.wikiEditor', |
| 69 | +); |
| 70 | + |
| 71 | +$wgResourceModules += array( |
| 72 | + /* Third-party modules */ |
| 73 | + |
| 74 | + 'contentCollector' => $wikiEditorTpl + array( |
| 75 | + 'scripts' => 'contentCollector.js', |
| 76 | + ), |
| 77 | + |
| 78 | + /* WikiEditor jQuery plugin Resources */ |
| 79 | + |
| 80 | + 'jquery.wikiEditor' => $wikiEditorTpl + array( |
| 81 | + 'scripts' => 'jquery.wikiEditor.js', |
| 82 | + 'styles' => 'jquery.wikiEditor.css', |
| 83 | + 'dependencies' => array( |
| 84 | + 'jquery.client', |
| 85 | + 'jquery.textSelection', |
| 86 | + 'jquery.delayedBind', |
| 87 | + ), |
| 88 | + 'messages' => array( |
| 89 | + 'wikieditor-wikitext-tab', |
| 90 | + 'wikieditor-loading', |
| 91 | + ), |
| 92 | + ), |
| 93 | + 'jquery.wikiEditor.iframe' => $wikiEditorTpl + array( |
| 94 | + 'scripts' => 'jquery.wikiEditor.iframe.js', |
| 95 | + 'dependencies' => array( |
| 96 | + 'jquery.wikiEditor', |
| 97 | + 'contentCollector', |
| 98 | + ), |
| 99 | + ), |
| 100 | + 'jquery.wikiEditor.dialogs' => $wikiEditorTpl + array( |
| 101 | + 'scripts' => 'jquery.wikiEditor.dialogs.js', |
| 102 | + 'styles' => 'jquery.wikiEditor.dialogs.css', |
| 103 | + 'dependencies' => array( |
| 104 | + 'jquery.wikiEditor', |
| 105 | + 'jquery.wikiEditor.toolbar', |
| 106 | + 'jquery.ui.dialog', |
| 107 | + 'jquery.ui.button', |
| 108 | + 'jquery.ui.draggable', |
| 109 | + 'jquery.ui.resizable', |
| 110 | + 'jquery.tabIndex', |
| 111 | + ), |
| 112 | + ), |
| 113 | + 'jquery.wikiEditor.highlight' => $wikiEditorTpl + array( |
| 114 | + 'scripts' => 'jquery.wikiEditor.highlight.js', |
| 115 | + 'dependencies' => array( |
| 116 | + 'jquery.wikiEditor', |
| 117 | + 'jquery.wikiEditor.iframe', |
| 118 | + ), |
| 119 | + ), |
| 120 | + 'jquery.wikiEditor.preview' => $wikiEditorTpl + array( |
| 121 | + 'scripts' => 'jquery.wikiEditor.preview.js', |
| 122 | + 'styles' => 'jquery.wikiEditor.preview.css', |
| 123 | + 'dependencies' => 'jquery.wikiEditor', |
| 124 | + ), |
| 125 | + 'jquery.wikiEditor.previewDialog' => $wikiEditorTpl + array( |
| 126 | + 'scripts' => 'jquery.wikiEditor.previewDialog.js', |
| 127 | + 'styles' => 'jquery.wikiEditor.previewDialog.css', |
| 128 | + 'dependencies' => array( |
| 129 | + 'jquery.wikiEditor', |
| 130 | + 'jquery.wikiEditor.dialogs', |
| 131 | + ), |
| 132 | + ), |
| 133 | + 'jquery.wikiEditor.publish' => $wikiEditorTpl + array( |
| 134 | + 'scripts' => 'jquery.wikiEditor.publish.js', |
| 135 | + 'dependencies' => array( |
| 136 | + 'jquery.wikiEditor', |
| 137 | + 'jquery.wikiEditor.dialogs', |
| 138 | + ), |
| 139 | + ), |
| 140 | + 'jquery.wikiEditor.templateEditor' => $wikiEditorTpl + array( |
| 141 | + 'scripts' => 'jquery.wikiEditor.templateEditor.js', |
| 142 | + 'dependencies' => array( |
| 143 | + 'jquery.wikiEditor', |
| 144 | + 'jquery.wikiEditor.iframe', |
| 145 | + 'jquery.wikiEditor.dialogs', |
| 146 | + ), |
| 147 | + ), |
| 148 | + 'jquery.wikiEditor.templates' => $wikiEditorTpl + array( |
| 149 | + 'scripts' => 'jquery.wikiEditor.templates.js', |
| 150 | + 'dependencies' => array( |
| 151 | + 'jquery.wikiEditor', |
| 152 | + 'jquery.wikiEditor.iframe', |
| 153 | + ), |
| 154 | + ), |
| 155 | + 'jquery.wikiEditor.toc' => $wikiEditorTpl + array( |
| 156 | + 'scripts' => 'jquery.wikiEditor.toc.js', |
| 157 | + 'styles' => 'jquery.wikiEditor.toc.css', |
| 158 | + 'dependencies' => array( |
| 159 | + 'jquery.wikiEditor', |
| 160 | + 'jquery.wikiEditor.iframe', |
| 161 | + 'jquery.ui.draggable', |
| 162 | + 'jquery.ui.resizable', |
| 163 | + 'jquery.autoEllipsis', |
| 164 | + 'jquery.color', |
| 165 | + ), |
| 166 | + ), |
| 167 | + 'jquery.wikiEditor.toolbar' => $wikiEditorTpl + array( |
| 168 | + 'scripts' => 'jquery.wikiEditor.toolbar.js', |
| 169 | + 'styles' => 'jquery.wikiEditor.toolbar.css', |
| 170 | + 'dependencies' => 'jquery.wikiEditor', |
| 171 | + ), |
| 172 | + |
| 173 | + /* WikiEditor Resources */ |
| 174 | + |
| 175 | + 'ext.wikiEditor' => $wikiEditorTpl + array( |
| 176 | + 'scripts' => 'ext.wikiEditor.js', |
| 177 | + 'styles' => 'ext.wikiEditor.css', |
| 178 | + 'dependencies' => 'jquery.wikiEditor', |
| 179 | + ), |
| 180 | + 'ext.wikiEditor.dialogs' => $wikiEditorTpl + array( |
| 181 | + 'scripts' => 'ext.wikiEditor.dialogs.js', |
| 182 | + 'styles' => 'ext.wikiEditor.dialogs.css', |
| 183 | + 'dependencies' => array( |
| 184 | + 'ext.wikiEditor', |
| 185 | + 'ext.wikiEditor.toolbar', |
| 186 | + 'jquery.wikiEditor.dialogs', |
| 187 | + 'jquery.suggestions', |
| 188 | + ), |
| 189 | + ), |
| 190 | + 'ext.wikiEditor.highlight' => $wikiEditorTpl + array( |
| 191 | + 'scripts' => 'ext.wikiEditor.highlight.js', |
| 192 | + 'dependencies' => array( |
| 193 | + 'ext.wikiEditor', |
| 194 | + 'jquery.wikiEditor.highlight', |
| 195 | + ), |
| 196 | + ), |
| 197 | + 'ext.wikiEditor.preview' => $wikiEditorTpl + array( |
| 198 | + 'scripts' => 'ext.wikiEditor.preview.js', |
| 199 | + 'dependencies' => array( |
| 200 | + 'ext.wikiEditor', |
| 201 | + 'jquery.wikiEditor.preview', |
| 202 | + ), |
| 203 | + 'messages' => array( |
| 204 | + 'wikieditor-preview-tab', |
| 205 | + 'wikieditor-preview-changes-tab', |
| 206 | + 'wikieditor-preview-loading', |
| 207 | + ), |
| 208 | + ), |
| 209 | + 'ext.wikiEditor.previewDialog' => $wikiEditorTpl + array( |
| 210 | + 'scripts' => 'ext.wikiEditor.previewDialog.js', |
| 211 | + 'dependencies' => array( |
| 212 | + 'ext.wikiEditor', |
| 213 | + 'jquery.wikiEditor.previewDialog', |
| 214 | + ), |
| 215 | + 'messages' => array( |
| 216 | + 'wikieditor-previewDialog-preference', |
| 217 | + 'wikieditor-previewDialog-tab', |
| 218 | + 'wikieditor-previewDialog-loading', |
| 219 | + ), |
| 220 | + ), |
| 221 | + 'ext.wikiEditor.publish' => $wikiEditorTpl + array( |
| 222 | + 'scripts' => 'ext.wikiEditor.publish.js', |
| 223 | + 'dependencies' => array( |
| 224 | + 'ext.wikiEditor', |
| 225 | + 'jquery.wikiEditor.publish', |
| 226 | + ), |
| 227 | + 'messages' => array( |
| 228 | + 'wikieditor-publish-button-publish', |
| 229 | + 'wikieditor-publish-button-cancel', |
| 230 | + 'wikieditor-publish-dialog-title', |
| 231 | + 'wikieditor-publish-dialog-summary', |
| 232 | + 'wikieditor-publish-dialog-minor', |
| 233 | + 'wikieditor-publish-dialog-watch', |
| 234 | + 'wikieditor-publish-dialog-publish', |
| 235 | + 'wikieditor-publish-dialog-goback', |
| 236 | + ), |
| 237 | + ), |
| 238 | + 'ext.wikiEditor.templateEditor' => $wikiEditorTpl + array( |
| 239 | + 'scripts' => 'ext.wikiEditor.templateEditor.js', |
| 240 | + 'dependencies' => array( |
| 241 | + 'ext.wikiEditor', |
| 242 | + 'ext.wikiEditor.highlight', |
| 243 | + 'jquery.wikiEditor.templateEditor', |
| 244 | + ), |
| 245 | + 'messages' => array( |
| 246 | + 'wikieditor-template-editor-dialog-title', |
| 247 | + 'wikieditor-template-editor-dialog-submit', |
| 248 | + 'wikieditor-template-editor-dialog-cancel', |
| 249 | + ), |
| 250 | + ), |
| 251 | + 'ext.wikiEditor.templates' => $wikiEditorTpl + array( |
| 252 | + 'scripts' => 'ext.wikiEditor.templates.js', |
| 253 | + 'dependencies' => array( |
| 254 | + 'ext.wikiEditor', |
| 255 | + 'ext.wikiEditor.highlight', |
| 256 | + 'jquery.wikiEditor.templates', |
| 257 | + ), |
| 258 | + ), |
| 259 | + 'ext.wikiEditor.toc' => $wikiEditorTpl + array( |
| 260 | + 'scripts' => 'ext.wikiEditor.toc.js', |
| 261 | + 'dependencies' => array( |
| 262 | + 'ext.wikiEditor', |
| 263 | + 'ext.wikiEditor.highlight', |
| 264 | + 'jquery.wikiEditor.toc', |
| 265 | + ), |
| 266 | + 'messages' => array( |
| 267 | + 'wikieditor-toc-show', |
| 268 | + 'wikieditor-toc-hide', |
| 269 | + ), |
| 270 | + ), |
| 271 | + 'ext.wikiEditor.tests.toolbar' => $wikiEditorTpl + array( |
| 272 | + 'scripts' => 'ext.wikiEditor.tests.toolbar.js', |
| 273 | + 'dependencies' => 'ext.wikiEditor.toolbar', |
| 274 | + ), |
| 275 | + 'ext.wikiEditor.toolbar' => $wikiEditorTpl + array( |
| 276 | + 'scripts' => 'ext.wikiEditor.toolbar.js', |
| 277 | + 'dependencies' => array( |
| 278 | + 'ext.wikiEditor', |
| 279 | + 'jquery.wikiEditor.toolbar', |
| 280 | + 'jquery.cookie', |
| 281 | + 'jquery.async', |
| 282 | + ), |
| 283 | + 'messages' => array( |
| 284 | + // This is a mixed bunch that needs to be separated between dialog and toolbar messages, but since the |
| 285 | + // dialog module depends on the toolbar module, it's not an urgent matter |
| 286 | + 'wikieditor-toolbar-loading', |
| 287 | + /* Main Section */ |
| 288 | + 'wikieditor-toolbar-tool-bold', |
| 289 | + 'wikieditor-toolbar-tool-bold-example', |
| 290 | + 'wikieditor-toolbar-tool-italic', |
| 291 | + 'wikieditor-toolbar-tool-italic-example', |
| 292 | + 'wikieditor-toolbar-tool-ilink', |
| 293 | + 'wikieditor-toolbar-tool-ilink-example', |
| 294 | + 'wikieditor-toolbar-tool-xlink', |
| 295 | + 'wikieditor-toolbar-tool-xlink-example', |
| 296 | + 'wikieditor-toolbar-tool-link', |
| 297 | + 'wikieditor-toolbar-tool-link-title', |
| 298 | + 'wikieditor-toolbar-tool-link-int', |
| 299 | + 'wikieditor-toolbar-tool-link-int-target', |
| 300 | + 'wikieditor-toolbar-tool-link-int-target-tooltip', |
| 301 | + 'wikieditor-toolbar-tool-link-int-text', |
| 302 | + 'wikieditor-toolbar-tool-link-int-text-tooltip', |
| 303 | + 'wikieditor-toolbar-tool-link-ext', |
| 304 | + 'wikieditor-toolbar-tool-link-ext-target', |
| 305 | + 'wikieditor-toolbar-tool-link-ext-text', |
| 306 | + 'wikieditor-toolbar-tool-link-insert', |
| 307 | + 'wikieditor-toolbar-tool-link-cancel', |
| 308 | + 'wikieditor-toolbar-tool-link-int-target-status-exists', |
| 309 | + 'wikieditor-toolbar-tool-link-int-target-status-notexists', |
| 310 | + 'wikieditor-toolbar-tool-link-int-target-status-invalid', |
| 311 | + 'wikieditor-toolbar-tool-link-int-target-status-external', |
| 312 | + 'wikieditor-toolbar-tool-link-int-target-status-loading', |
| 313 | + 'wikieditor-toolbar-tool-link-int-invalid', |
| 314 | + 'wikieditor-toolbar-tool-link-lookslikeinternal', |
| 315 | + 'wikieditor-toolbar-tool-link-lookslikeinternal-int', |
| 316 | + 'wikieditor-toolbar-tool-link-lookslikeinternal-ext', |
| 317 | + 'wikieditor-toolbar-tool-link-empty', |
| 318 | + 'wikieditor-toolbar-tool-file', |
| 319 | + 'wikieditor-toolbar-tool-file-pre', |
| 320 | + 'wikieditor-toolbar-tool-file-example', |
| 321 | + 'wikieditor-toolbar-tool-reference', |
| 322 | + 'wikieditor-toolbar-tool-reference-title', |
| 323 | + 'wikieditor-toolbar-tool-reference-cancel', |
| 324 | + 'wikieditor-toolbar-tool-reference-text', |
| 325 | + 'wikieditor-toolbar-tool-reference-insert', |
| 326 | + 'wikieditor-toolbar-tool-reference-example', |
| 327 | + 'wikieditor-toolbar-tool-signature', |
| 328 | + /* Formatting Section */ |
| 329 | + 'wikieditor-toolbar-section-advanced', |
| 330 | + 'wikieditor-toolbar-tool-heading', |
| 331 | + 'wikieditor-toolbar-tool-heading-1', |
| 332 | + 'wikieditor-toolbar-tool-heading-2', |
| 333 | + 'wikieditor-toolbar-tool-heading-3', |
| 334 | + 'wikieditor-toolbar-tool-heading-4', |
| 335 | + 'wikieditor-toolbar-tool-heading-5', |
| 336 | + 'wikieditor-toolbar-tool-heading-example', |
| 337 | + 'wikieditor-toolbar-group-format', |
| 338 | + 'wikieditor-toolbar-tool-ulist', |
| 339 | + 'wikieditor-toolbar-tool-ulist-example', |
| 340 | + 'wikieditor-toolbar-tool-olist', |
| 341 | + 'wikieditor-toolbar-tool-olist-example', |
| 342 | + 'wikieditor-toolbar-tool-indent', |
| 343 | + 'wikieditor-toolbar-tool-indent-example', |
| 344 | + 'wikieditor-toolbar-tool-nowiki', |
| 345 | + 'wikieditor-toolbar-tool-nowiki-example', |
| 346 | + 'wikieditor-toolbar-tool-redirect', |
| 347 | + 'wikieditor-toolbar-tool-redirect-example', |
| 348 | + 'wikieditor-toolbar-tool-big', |
| 349 | + 'wikieditor-toolbar-tool-big-example', |
| 350 | + 'wikieditor-toolbar-tool-small', |
| 351 | + 'wikieditor-toolbar-tool-small-example', |
| 352 | + 'wikieditor-toolbar-tool-superscript', |
| 353 | + 'wikieditor-toolbar-tool-superscript-example', |
| 354 | + 'wikieditor-toolbar-tool-subscript', |
| 355 | + 'wikieditor-toolbar-tool-subscript-example', |
| 356 | + 'wikieditor-toolbar-group-insert', |
| 357 | + 'wikieditor-toolbar-tool-gallery', |
| 358 | + 'wikieditor-toolbar-tool-gallery-example', |
| 359 | + 'wikieditor-toolbar-tool-newline', |
| 360 | + 'wikieditor-toolbar-tool-table', |
| 361 | + 'wikieditor-toolbar-tool-table-example-old', |
| 362 | + 'wikieditor-toolbar-tool-table-example-cell-text', |
| 363 | + 'wikieditor-toolbar-tool-table-example', |
| 364 | + 'wikieditor-toolbar-tool-table-example-header', |
| 365 | + 'wikieditor-toolbar-tool-table-title', |
| 366 | + 'wikieditor-toolbar-tool-table-dimensions-rows', |
| 367 | + 'wikieditor-toolbar-tool-table-dimensions-columns', |
| 368 | + 'wikieditor-toolbar-tool-table-dimensions-header', |
| 369 | + 'wikieditor-toolbar-tool-table-wikitable', |
| 370 | + 'wikieditor-toolbar-tool-table-sortable', |
| 371 | + 'wikieditor-toolbar-tool-table-insert', |
| 372 | + 'wikieditor-toolbar-tool-table-cancel', |
| 373 | + 'wikieditor-toolbar-tool-table-example-text', |
| 374 | + 'wikieditor-toolbar-tool-table-toomany', |
| 375 | + 'wikieditor-toolbar-tool-table-invalidnumber', |
| 376 | + 'wikieditor-toolbar-tool-table-zero', |
| 377 | + 'wikieditor-toolbar-tool-replace', |
| 378 | + 'wikieditor-toolbar-tool-replace-title', |
| 379 | + 'wikieditor-toolbar-tool-replace-search', |
| 380 | + 'wikieditor-toolbar-tool-replace-replace', |
| 381 | + 'wikieditor-toolbar-tool-replace-case', |
| 382 | + 'wikieditor-toolbar-tool-replace-regex', |
| 383 | + 'wikieditor-toolbar-tool-replace-button-findnext', |
| 384 | + 'wikieditor-toolbar-tool-replace-button-replacenext', |
| 385 | + 'wikieditor-toolbar-tool-replace-button-replaceall', |
| 386 | + 'wikieditor-toolbar-tool-replace-close', |
| 387 | + 'wikieditor-toolbar-tool-replace-nomatch', |
| 388 | + 'wikieditor-toolbar-tool-replace-success', |
| 389 | + 'wikieditor-toolbar-tool-replace-emptysearch', |
| 390 | + 'wikieditor-toolbar-tool-replace-invalidregex', |
| 391 | + /* Special Characters Section */ |
| 392 | + 'wikieditor-toolbar-section-characters', |
| 393 | + 'wikieditor-toolbar-characters-page-latin', |
| 394 | + 'wikieditor-toolbar-characters-page-latinextended', |
| 395 | + 'wikieditor-toolbar-characters-page-ipa', |
| 396 | + 'wikieditor-toolbar-characters-page-symbols', |
| 397 | + 'wikieditor-toolbar-characters-page-greek', |
| 398 | + 'wikieditor-toolbar-characters-page-cyrillic', |
| 399 | + 'wikieditor-toolbar-characters-page-arabic', |
| 400 | + 'wikieditor-toolbar-characters-page-persian', |
| 401 | + 'wikieditor-toolbar-characters-page-hebrew', |
| 402 | + 'wikieditor-toolbar-characters-page-bangla', |
| 403 | + 'wikieditor-toolbar-characters-page-telugu', |
| 404 | + 'wikieditor-toolbar-characters-page-sinhala', |
| 405 | + 'wikieditor-toolbar-characters-page-gujarati', |
| 406 | + 'wikieditor-toolbar-characters-page-thai', |
| 407 | + 'wikieditor-toolbar-characters-page-lao', |
| 408 | + 'wikieditor-toolbar-characters-page-khmer', |
| 409 | + /* Help Section */ |
| 410 | + 'wikieditor-toolbar-section-help', |
| 411 | + 'wikieditor-toolbar-help-heading-description', |
| 412 | + 'wikieditor-toolbar-help-heading-syntax', |
| 413 | + 'wikieditor-toolbar-help-heading-result', |
| 414 | + 'wikieditor-toolbar-help-page-format', |
| 415 | + 'wikieditor-toolbar-help-page-link', |
| 416 | + 'wikieditor-toolbar-help-page-heading', |
| 417 | + 'wikieditor-toolbar-help-page-list', |
| 418 | + 'wikieditor-toolbar-help-page-file', |
| 419 | + 'wikieditor-toolbar-help-page-reference', |
| 420 | + 'wikieditor-toolbar-help-page-discussion', |
| 421 | + 'wikieditor-toolbar-help-content-bold-description', |
| 422 | + 'wikieditor-toolbar-help-content-bold-syntax', |
| 423 | + 'wikieditor-toolbar-help-content-bold-result', |
| 424 | + 'wikieditor-toolbar-help-content-italic-description', |
| 425 | + 'wikieditor-toolbar-help-content-italic-syntax', |
| 426 | + 'wikieditor-toolbar-help-content-italic-result', |
| 427 | + 'wikieditor-toolbar-help-content-bolditalic-description', |
| 428 | + 'wikieditor-toolbar-help-content-bolditalic-syntax', |
| 429 | + 'wikieditor-toolbar-help-content-bolditalic-result', |
| 430 | + 'wikieditor-toolbar-help-content-ilink-description', |
| 431 | + 'wikieditor-toolbar-help-content-ilink-syntax', |
| 432 | + 'wikieditor-toolbar-help-content-ilink-result', |
| 433 | + 'wikieditor-toolbar-help-content-xlink-description', |
| 434 | + 'wikieditor-toolbar-help-content-xlink-syntax', |
| 435 | + 'wikieditor-toolbar-help-content-xlink-result', |
| 436 | + 'wikieditor-toolbar-help-content-heading1-description', |
| 437 | + 'wikieditor-toolbar-help-content-heading1-syntax', |
| 438 | + 'wikieditor-toolbar-help-content-heading1-result', |
| 439 | + 'wikieditor-toolbar-help-content-heading2-description', |
| 440 | + 'wikieditor-toolbar-help-content-heading2-syntax', |
| 441 | + 'wikieditor-toolbar-help-content-heading2-result', |
| 442 | + 'wikieditor-toolbar-help-content-heading3-description', |
| 443 | + 'wikieditor-toolbar-help-content-heading3-syntax', |
| 444 | + 'wikieditor-toolbar-help-content-heading3-result', |
| 445 | + 'wikieditor-toolbar-help-content-heading4-description', |
| 446 | + 'wikieditor-toolbar-help-content-heading4-syntax', |
| 447 | + 'wikieditor-toolbar-help-content-heading4-result', |
| 448 | + 'wikieditor-toolbar-help-content-heading5-description', |
| 449 | + 'wikieditor-toolbar-help-content-heading5-syntax', |
| 450 | + 'wikieditor-toolbar-help-content-heading5-result', |
| 451 | + 'wikieditor-toolbar-help-content-ulist-description', |
| 452 | + 'wikieditor-toolbar-help-content-ulist-syntax', |
| 453 | + 'wikieditor-toolbar-help-content-ulist-result', |
| 454 | + 'wikieditor-toolbar-help-content-olist-description', |
| 455 | + 'wikieditor-toolbar-help-content-olist-syntax', |
| 456 | + 'wikieditor-toolbar-help-content-olist-result', |
| 457 | + 'wikieditor-toolbar-help-content-file-description', |
| 458 | + 'wikieditor-toolbar-help-content-file-syntax', |
| 459 | + 'wikieditor-toolbar-help-content-file-result', |
| 460 | + 'wikieditor-toolbar-help-content-reference-description', |
| 461 | + 'wikieditor-toolbar-help-content-reference-syntax', |
| 462 | + 'wikieditor-toolbar-help-content-reference-result', |
| 463 | + 'wikieditor-toolbar-help-content-rereference-description', |
| 464 | + 'wikieditor-toolbar-help-content-rereference-syntax', |
| 465 | + 'wikieditor-toolbar-help-content-rereference-result', |
| 466 | + 'wikieditor-toolbar-help-content-showreferences-description', |
| 467 | + 'wikieditor-toolbar-help-content-showreferences-syntax', |
| 468 | + 'wikieditor-toolbar-help-content-showreferences-result', |
| 469 | + 'wikieditor-toolbar-help-content-signaturetimestamp-description', |
| 470 | + 'wikieditor-toolbar-help-content-signaturetimestamp-syntax', |
| 471 | + 'wikieditor-toolbar-help-content-signaturetimestamp-result', |
| 472 | + 'wikieditor-toolbar-help-content-signature-description', |
| 473 | + 'wikieditor-toolbar-help-content-signature-syntax', |
| 474 | + 'wikieditor-toolbar-help-content-signature-result', |
| 475 | + 'wikieditor-toolbar-help-content-indent-description', |
| 476 | + 'wikieditor-toolbar-help-content-indent-syntax', |
| 477 | + 'wikieditor-toolbar-help-content-indent-result', |
| 478 | + ), |
| 479 | + ), |
| 480 | +); |
Index: trunk/extensions/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -10,441 +10,6 @@ |
11 | 11 | |
12 | 12 | /* Protected Static Members */ |
13 | 13 | |
14 | | - protected static $modules = array( |
15 | | - |
16 | | - /* Third-party modules */ |
17 | | - |
18 | | - 'contentCollector' => array( |
19 | | - 'scripts' => 'contentCollector.js', |
20 | | - 'group' => 'ext.wikiEditor', |
21 | | - ), |
22 | | - |
23 | | - /* WikiEditor jQuery plugin Resources */ |
24 | | - |
25 | | - 'jquery.wikiEditor' => array( |
26 | | - 'scripts' => 'jquery.wikiEditor.js', |
27 | | - 'styles' => 'jquery.wikiEditor.css', |
28 | | - 'dependencies' => array( |
29 | | - 'jquery.client', |
30 | | - 'jquery.textSelection', |
31 | | - 'jquery.delayedBind', |
32 | | - ), |
33 | | - 'messages' => array( |
34 | | - 'wikieditor-wikitext-tab', |
35 | | - 'wikieditor-loading', |
36 | | - ), |
37 | | - 'group' => 'ext.wikiEditor', |
38 | | - ), |
39 | | - 'jquery.wikiEditor.iframe' => array( |
40 | | - 'scripts' => 'jquery.wikiEditor.iframe.js', |
41 | | - 'dependencies' => array( |
42 | | - 'jquery.wikiEditor', |
43 | | - 'contentCollector', |
44 | | - ), |
45 | | - 'group' => 'ext.wikiEditor', |
46 | | - ), |
47 | | - 'jquery.wikiEditor.dialogs' => array( |
48 | | - 'scripts' => 'jquery.wikiEditor.dialogs.js', |
49 | | - 'styles' => 'jquery.wikiEditor.dialogs.css', |
50 | | - 'dependencies' => array( |
51 | | - 'jquery.wikiEditor', |
52 | | - 'jquery.wikiEditor.toolbar', |
53 | | - 'jquery.ui.dialog', |
54 | | - 'jquery.ui.button', |
55 | | - 'jquery.ui.draggable', |
56 | | - 'jquery.ui.resizable', |
57 | | - 'jquery.tabIndex', |
58 | | - ), |
59 | | - 'group' => 'ext.wikiEditor', |
60 | | - ), |
61 | | - 'jquery.wikiEditor.highlight' => array( |
62 | | - 'scripts' => 'jquery.wikiEditor.highlight.js', |
63 | | - 'dependencies' => array( |
64 | | - 'jquery.wikiEditor', |
65 | | - 'jquery.wikiEditor.iframe', |
66 | | - ), |
67 | | - 'group' => 'ext.wikiEditor', |
68 | | - ), |
69 | | - 'jquery.wikiEditor.preview' => array( |
70 | | - 'scripts' => 'jquery.wikiEditor.preview.js', |
71 | | - 'styles' => 'jquery.wikiEditor.preview.css', |
72 | | - 'dependencies' => 'jquery.wikiEditor', |
73 | | - 'group' => 'ext.wikiEditor', |
74 | | - ), |
75 | | - 'jquery.wikiEditor.previewDialog' => array( |
76 | | - 'scripts' => 'jquery.wikiEditor.previewDialog.js', |
77 | | - 'styles' => 'jquery.wikiEditor.previewDialog.css', |
78 | | - 'dependencies' => array( |
79 | | - 'jquery.wikiEditor', |
80 | | - 'jquery.wikiEditor.dialogs', |
81 | | - ), |
82 | | - 'group' => 'ext.wikiEditor', |
83 | | - ), |
84 | | - 'jquery.wikiEditor.publish' => array( |
85 | | - 'scripts' => 'jquery.wikiEditor.publish.js', |
86 | | - 'dependencies' => array( |
87 | | - 'jquery.wikiEditor', |
88 | | - 'jquery.wikiEditor.dialogs', |
89 | | - ), |
90 | | - 'group' => 'ext.wikiEditor', |
91 | | - ), |
92 | | - 'jquery.wikiEditor.templateEditor' => array( |
93 | | - 'scripts' => 'jquery.wikiEditor.templateEditor.js', |
94 | | - 'dependencies' => array( |
95 | | - 'jquery.wikiEditor', |
96 | | - 'jquery.wikiEditor.iframe', |
97 | | - 'jquery.wikiEditor.dialogs', |
98 | | - ), |
99 | | - 'group' => 'ext.wikiEditor', |
100 | | - ), |
101 | | - 'jquery.wikiEditor.templates' => array( |
102 | | - 'scripts' => 'jquery.wikiEditor.templates.js', |
103 | | - 'dependencies' => array( |
104 | | - 'jquery.wikiEditor', |
105 | | - 'jquery.wikiEditor.iframe', |
106 | | - ), |
107 | | - 'group' => 'ext.wikiEditor', |
108 | | - ), |
109 | | - 'jquery.wikiEditor.toc' => array( |
110 | | - 'scripts' => 'jquery.wikiEditor.toc.js', |
111 | | - 'styles' => 'jquery.wikiEditor.toc.css', |
112 | | - 'dependencies' => array( |
113 | | - 'jquery.wikiEditor', |
114 | | - 'jquery.wikiEditor.iframe', |
115 | | - 'jquery.ui.draggable', |
116 | | - 'jquery.ui.resizable', |
117 | | - 'jquery.autoEllipsis', |
118 | | - 'jquery.color', |
119 | | - ), |
120 | | - 'group' => 'ext.wikiEditor', |
121 | | - ), |
122 | | - 'jquery.wikiEditor.toolbar' => array( |
123 | | - 'scripts' => 'jquery.wikiEditor.toolbar.js', |
124 | | - 'styles' => 'jquery.wikiEditor.toolbar.css', |
125 | | - 'dependencies' => 'jquery.wikiEditor', |
126 | | - 'group' => 'ext.wikiEditor', |
127 | | - ), |
128 | | - |
129 | | - /* WikiEditor Resources */ |
130 | | - |
131 | | - 'ext.wikiEditor' => array( |
132 | | - 'scripts' => 'ext.wikiEditor.js', |
133 | | - 'styles' => 'ext.wikiEditor.css', |
134 | | - 'dependencies' => 'jquery.wikiEditor', |
135 | | - 'group' => 'ext.wikiEditor', |
136 | | - ), |
137 | | - 'ext.wikiEditor.dialogs' => array( |
138 | | - 'scripts' => 'ext.wikiEditor.dialogs.js', |
139 | | - 'styles' => 'ext.wikiEditor.dialogs.css', |
140 | | - 'dependencies' => array( |
141 | | - 'ext.wikiEditor', |
142 | | - 'ext.wikiEditor.toolbar', |
143 | | - 'jquery.wikiEditor.dialogs', |
144 | | - 'jquery.suggestions', |
145 | | - ), |
146 | | - 'group' => 'ext.wikiEditor', |
147 | | - ), |
148 | | - 'ext.wikiEditor.highlight' => array( |
149 | | - 'scripts' => 'ext.wikiEditor.highlight.js', |
150 | | - 'dependencies' => array( |
151 | | - 'ext.wikiEditor', |
152 | | - 'jquery.wikiEditor.highlight', |
153 | | - ), |
154 | | - 'group' => 'ext.wikiEditor', |
155 | | - ), |
156 | | - 'ext.wikiEditor.preview' => array( |
157 | | - 'scripts' => 'ext.wikiEditor.preview.js', |
158 | | - 'dependencies' => array( |
159 | | - 'ext.wikiEditor', |
160 | | - 'jquery.wikiEditor.preview', |
161 | | - ), |
162 | | - 'messages' => array( |
163 | | - 'wikieditor-preview-tab', |
164 | | - 'wikieditor-preview-changes-tab', |
165 | | - 'wikieditor-preview-loading', |
166 | | - ), |
167 | | - 'group' => 'ext.wikiEditor', |
168 | | - ), |
169 | | - 'ext.wikiEditor.previewDialog' => array( |
170 | | - 'scripts' => 'ext.wikiEditor.previewDialog.js', |
171 | | - 'dependencies' => array( |
172 | | - 'ext.wikiEditor', |
173 | | - 'jquery.wikiEditor.previewDialog', |
174 | | - ), |
175 | | - 'messages' => array( |
176 | | - 'wikieditor-previewDialog-preference', |
177 | | - 'wikieditor-previewDialog-tab', |
178 | | - 'wikieditor-previewDialog-loading', |
179 | | - ), |
180 | | - 'group' => 'ext.wikiEditor', |
181 | | - ), |
182 | | - 'ext.wikiEditor.publish' => array( |
183 | | - 'scripts' => 'ext.wikiEditor.publish.js', |
184 | | - 'dependencies' => array( |
185 | | - 'ext.wikiEditor', |
186 | | - 'jquery.wikiEditor.publish', |
187 | | - ), |
188 | | - 'messages' => array( |
189 | | - 'wikieditor-publish-button-publish', |
190 | | - 'wikieditor-publish-button-cancel', |
191 | | - 'wikieditor-publish-dialog-title', |
192 | | - 'wikieditor-publish-dialog-summary', |
193 | | - 'wikieditor-publish-dialog-minor', |
194 | | - 'wikieditor-publish-dialog-watch', |
195 | | - 'wikieditor-publish-dialog-publish', |
196 | | - 'wikieditor-publish-dialog-goback', |
197 | | - ), |
198 | | - 'group' => 'ext.wikiEditor', |
199 | | - ), |
200 | | - 'ext.wikiEditor.templateEditor' => array( |
201 | | - 'scripts' => 'ext.wikiEditor.templateEditor.js', |
202 | | - 'dependencies' => array( |
203 | | - 'ext.wikiEditor', |
204 | | - 'ext.wikiEditor.highlight', |
205 | | - 'jquery.wikiEditor.templateEditor', |
206 | | - ), |
207 | | - 'messages' => array( |
208 | | - 'wikieditor-template-editor-dialog-title', |
209 | | - 'wikieditor-template-editor-dialog-submit', |
210 | | - 'wikieditor-template-editor-dialog-cancel', |
211 | | - ), |
212 | | - 'group' => 'ext.wikiEditor', |
213 | | - ), |
214 | | - 'ext.wikiEditor.templates' => array( |
215 | | - 'scripts' => 'ext.wikiEditor.templates.js', |
216 | | - 'dependencies' => array( |
217 | | - 'ext.wikiEditor', |
218 | | - 'ext.wikiEditor.highlight', |
219 | | - 'jquery.wikiEditor.templates', |
220 | | - ), |
221 | | - 'group' => 'ext.wikiEditor', |
222 | | - ), |
223 | | - 'ext.wikiEditor.toc' => array( |
224 | | - 'scripts' => 'ext.wikiEditor.toc.js', |
225 | | - 'dependencies' => array( |
226 | | - 'ext.wikiEditor', |
227 | | - 'ext.wikiEditor.highlight', |
228 | | - 'jquery.wikiEditor.toc', |
229 | | - ), |
230 | | - 'messages' => array( |
231 | | - 'wikieditor-toc-show', |
232 | | - 'wikieditor-toc-hide', |
233 | | - ), |
234 | | - 'group' => 'ext.wikiEditor', |
235 | | - ), |
236 | | - 'ext.wikiEditor.tests.toolbar' => array( |
237 | | - 'scripts' => 'ext.wikiEditor.tests.toolbar.js', |
238 | | - 'dependencies' => 'ext.wikiEditor.toolbar', |
239 | | - 'group' => 'ext.wikiEditor.tests', |
240 | | - ), |
241 | | - 'ext.wikiEditor.toolbar' => array( |
242 | | - 'scripts' => 'ext.wikiEditor.toolbar.js', |
243 | | - 'dependencies' => array( |
244 | | - 'ext.wikiEditor', |
245 | | - 'jquery.wikiEditor.toolbar', |
246 | | - 'jquery.cookie', |
247 | | - 'jquery.async', |
248 | | - ), |
249 | | - 'messages' => array( |
250 | | - // This is a mixed bunch that needs to be separated between dialog and toolbar messages, but since the |
251 | | - // dialog module depends on the toolbar module, it's not an urgent matter |
252 | | - 'wikieditor-toolbar-loading', |
253 | | - /* Main Section */ |
254 | | - 'wikieditor-toolbar-tool-bold', |
255 | | - 'wikieditor-toolbar-tool-bold-example', |
256 | | - 'wikieditor-toolbar-tool-italic', |
257 | | - 'wikieditor-toolbar-tool-italic-example', |
258 | | - 'wikieditor-toolbar-tool-ilink', |
259 | | - 'wikieditor-toolbar-tool-ilink-example', |
260 | | - 'wikieditor-toolbar-tool-xlink', |
261 | | - 'wikieditor-toolbar-tool-xlink-example', |
262 | | - 'wikieditor-toolbar-tool-link', |
263 | | - 'wikieditor-toolbar-tool-link-title', |
264 | | - 'wikieditor-toolbar-tool-link-int', |
265 | | - 'wikieditor-toolbar-tool-link-int-target', |
266 | | - 'wikieditor-toolbar-tool-link-int-target-tooltip', |
267 | | - 'wikieditor-toolbar-tool-link-int-text', |
268 | | - 'wikieditor-toolbar-tool-link-int-text-tooltip', |
269 | | - 'wikieditor-toolbar-tool-link-ext', |
270 | | - 'wikieditor-toolbar-tool-link-ext-target', |
271 | | - 'wikieditor-toolbar-tool-link-ext-text', |
272 | | - 'wikieditor-toolbar-tool-link-insert', |
273 | | - 'wikieditor-toolbar-tool-link-cancel', |
274 | | - 'wikieditor-toolbar-tool-link-int-target-status-exists', |
275 | | - 'wikieditor-toolbar-tool-link-int-target-status-notexists', |
276 | | - 'wikieditor-toolbar-tool-link-int-target-status-invalid', |
277 | | - 'wikieditor-toolbar-tool-link-int-target-status-external', |
278 | | - 'wikieditor-toolbar-tool-link-int-target-status-loading', |
279 | | - 'wikieditor-toolbar-tool-link-int-invalid', |
280 | | - 'wikieditor-toolbar-tool-link-lookslikeinternal', |
281 | | - 'wikieditor-toolbar-tool-link-lookslikeinternal-int', |
282 | | - 'wikieditor-toolbar-tool-link-lookslikeinternal-ext', |
283 | | - 'wikieditor-toolbar-tool-link-empty', |
284 | | - 'wikieditor-toolbar-tool-file', |
285 | | - 'wikieditor-toolbar-tool-file-pre', |
286 | | - 'wikieditor-toolbar-tool-file-example', |
287 | | - 'wikieditor-toolbar-tool-reference', |
288 | | - 'wikieditor-toolbar-tool-reference-title', |
289 | | - 'wikieditor-toolbar-tool-reference-cancel', |
290 | | - 'wikieditor-toolbar-tool-reference-text', |
291 | | - 'wikieditor-toolbar-tool-reference-insert', |
292 | | - 'wikieditor-toolbar-tool-reference-example', |
293 | | - 'wikieditor-toolbar-tool-signature', |
294 | | - /* Formatting Section */ |
295 | | - 'wikieditor-toolbar-section-advanced', |
296 | | - 'wikieditor-toolbar-tool-heading', |
297 | | - 'wikieditor-toolbar-tool-heading-1', |
298 | | - 'wikieditor-toolbar-tool-heading-2', |
299 | | - 'wikieditor-toolbar-tool-heading-3', |
300 | | - 'wikieditor-toolbar-tool-heading-4', |
301 | | - 'wikieditor-toolbar-tool-heading-5', |
302 | | - 'wikieditor-toolbar-tool-heading-example', |
303 | | - 'wikieditor-toolbar-group-format', |
304 | | - 'wikieditor-toolbar-tool-ulist', |
305 | | - 'wikieditor-toolbar-tool-ulist-example', |
306 | | - 'wikieditor-toolbar-tool-olist', |
307 | | - 'wikieditor-toolbar-tool-olist-example', |
308 | | - 'wikieditor-toolbar-tool-indent', |
309 | | - 'wikieditor-toolbar-tool-indent-example', |
310 | | - 'wikieditor-toolbar-tool-nowiki', |
311 | | - 'wikieditor-toolbar-tool-nowiki-example', |
312 | | - 'wikieditor-toolbar-tool-redirect', |
313 | | - 'wikieditor-toolbar-tool-redirect-example', |
314 | | - 'wikieditor-toolbar-tool-big', |
315 | | - 'wikieditor-toolbar-tool-big-example', |
316 | | - 'wikieditor-toolbar-tool-small', |
317 | | - 'wikieditor-toolbar-tool-small-example', |
318 | | - 'wikieditor-toolbar-tool-superscript', |
319 | | - 'wikieditor-toolbar-tool-superscript-example', |
320 | | - 'wikieditor-toolbar-tool-subscript', |
321 | | - 'wikieditor-toolbar-tool-subscript-example', |
322 | | - 'wikieditor-toolbar-group-insert', |
323 | | - 'wikieditor-toolbar-tool-gallery', |
324 | | - 'wikieditor-toolbar-tool-gallery-example', |
325 | | - 'wikieditor-toolbar-tool-newline', |
326 | | - 'wikieditor-toolbar-tool-table', |
327 | | - 'wikieditor-toolbar-tool-table-example-old', |
328 | | - 'wikieditor-toolbar-tool-table-example-cell-text', |
329 | | - 'wikieditor-toolbar-tool-table-example', |
330 | | - 'wikieditor-toolbar-tool-table-example-header', |
331 | | - 'wikieditor-toolbar-tool-table-title', |
332 | | - 'wikieditor-toolbar-tool-table-dimensions-rows', |
333 | | - 'wikieditor-toolbar-tool-table-dimensions-columns', |
334 | | - 'wikieditor-toolbar-tool-table-dimensions-header', |
335 | | - 'wikieditor-toolbar-tool-table-wikitable', |
336 | | - 'wikieditor-toolbar-tool-table-sortable', |
337 | | - 'wikieditor-toolbar-tool-table-insert', |
338 | | - 'wikieditor-toolbar-tool-table-cancel', |
339 | | - 'wikieditor-toolbar-tool-table-example-text', |
340 | | - 'wikieditor-toolbar-tool-table-toomany', |
341 | | - 'wikieditor-toolbar-tool-table-invalidnumber', |
342 | | - 'wikieditor-toolbar-tool-table-zero', |
343 | | - 'wikieditor-toolbar-tool-replace', |
344 | | - 'wikieditor-toolbar-tool-replace-title', |
345 | | - 'wikieditor-toolbar-tool-replace-search', |
346 | | - 'wikieditor-toolbar-tool-replace-replace', |
347 | | - 'wikieditor-toolbar-tool-replace-case', |
348 | | - 'wikieditor-toolbar-tool-replace-regex', |
349 | | - 'wikieditor-toolbar-tool-replace-button-findnext', |
350 | | - 'wikieditor-toolbar-tool-replace-button-replacenext', |
351 | | - 'wikieditor-toolbar-tool-replace-button-replaceall', |
352 | | - 'wikieditor-toolbar-tool-replace-close', |
353 | | - 'wikieditor-toolbar-tool-replace-nomatch', |
354 | | - 'wikieditor-toolbar-tool-replace-success', |
355 | | - 'wikieditor-toolbar-tool-replace-emptysearch', |
356 | | - 'wikieditor-toolbar-tool-replace-invalidregex', |
357 | | - /* Special Characters Section */ |
358 | | - 'wikieditor-toolbar-section-characters', |
359 | | - 'wikieditor-toolbar-characters-page-latin', |
360 | | - 'wikieditor-toolbar-characters-page-latinextended', |
361 | | - 'wikieditor-toolbar-characters-page-ipa', |
362 | | - 'wikieditor-toolbar-characters-page-symbols', |
363 | | - 'wikieditor-toolbar-characters-page-greek', |
364 | | - 'wikieditor-toolbar-characters-page-cyrillic', |
365 | | - 'wikieditor-toolbar-characters-page-arabic', |
366 | | - 'wikieditor-toolbar-characters-page-persian', |
367 | | - 'wikieditor-toolbar-characters-page-hebrew', |
368 | | - 'wikieditor-toolbar-characters-page-bangla', |
369 | | - 'wikieditor-toolbar-characters-page-telugu', |
370 | | - 'wikieditor-toolbar-characters-page-sinhala', |
371 | | - 'wikieditor-toolbar-characters-page-gujarati', |
372 | | - 'wikieditor-toolbar-characters-page-thai', |
373 | | - 'wikieditor-toolbar-characters-page-lao', |
374 | | - 'wikieditor-toolbar-characters-page-khmer', |
375 | | - /* Help Section */ |
376 | | - 'wikieditor-toolbar-section-help', |
377 | | - 'wikieditor-toolbar-help-heading-description', |
378 | | - 'wikieditor-toolbar-help-heading-syntax', |
379 | | - 'wikieditor-toolbar-help-heading-result', |
380 | | - 'wikieditor-toolbar-help-page-format', |
381 | | - 'wikieditor-toolbar-help-page-link', |
382 | | - 'wikieditor-toolbar-help-page-heading', |
383 | | - 'wikieditor-toolbar-help-page-list', |
384 | | - 'wikieditor-toolbar-help-page-file', |
385 | | - 'wikieditor-toolbar-help-page-reference', |
386 | | - 'wikieditor-toolbar-help-page-discussion', |
387 | | - 'wikieditor-toolbar-help-content-bold-description', |
388 | | - 'wikieditor-toolbar-help-content-bold-syntax', |
389 | | - 'wikieditor-toolbar-help-content-bold-result', |
390 | | - 'wikieditor-toolbar-help-content-italic-description', |
391 | | - 'wikieditor-toolbar-help-content-italic-syntax', |
392 | | - 'wikieditor-toolbar-help-content-italic-result', |
393 | | - 'wikieditor-toolbar-help-content-bolditalic-description', |
394 | | - 'wikieditor-toolbar-help-content-bolditalic-syntax', |
395 | | - 'wikieditor-toolbar-help-content-bolditalic-result', |
396 | | - 'wikieditor-toolbar-help-content-ilink-description', |
397 | | - 'wikieditor-toolbar-help-content-ilink-syntax', |
398 | | - 'wikieditor-toolbar-help-content-ilink-result', |
399 | | - 'wikieditor-toolbar-help-content-xlink-description', |
400 | | - 'wikieditor-toolbar-help-content-xlink-syntax', |
401 | | - 'wikieditor-toolbar-help-content-xlink-result', |
402 | | - 'wikieditor-toolbar-help-content-heading1-description', |
403 | | - 'wikieditor-toolbar-help-content-heading1-syntax', |
404 | | - 'wikieditor-toolbar-help-content-heading1-result', |
405 | | - 'wikieditor-toolbar-help-content-heading2-description', |
406 | | - 'wikieditor-toolbar-help-content-heading2-syntax', |
407 | | - 'wikieditor-toolbar-help-content-heading2-result', |
408 | | - 'wikieditor-toolbar-help-content-heading3-description', |
409 | | - 'wikieditor-toolbar-help-content-heading3-syntax', |
410 | | - 'wikieditor-toolbar-help-content-heading3-result', |
411 | | - 'wikieditor-toolbar-help-content-heading4-description', |
412 | | - 'wikieditor-toolbar-help-content-heading4-syntax', |
413 | | - 'wikieditor-toolbar-help-content-heading4-result', |
414 | | - 'wikieditor-toolbar-help-content-heading5-description', |
415 | | - 'wikieditor-toolbar-help-content-heading5-syntax', |
416 | | - 'wikieditor-toolbar-help-content-heading5-result', |
417 | | - 'wikieditor-toolbar-help-content-ulist-description', |
418 | | - 'wikieditor-toolbar-help-content-ulist-syntax', |
419 | | - 'wikieditor-toolbar-help-content-ulist-result', |
420 | | - 'wikieditor-toolbar-help-content-olist-description', |
421 | | - 'wikieditor-toolbar-help-content-olist-syntax', |
422 | | - 'wikieditor-toolbar-help-content-olist-result', |
423 | | - 'wikieditor-toolbar-help-content-file-description', |
424 | | - 'wikieditor-toolbar-help-content-file-syntax', |
425 | | - 'wikieditor-toolbar-help-content-file-result', |
426 | | - 'wikieditor-toolbar-help-content-reference-description', |
427 | | - 'wikieditor-toolbar-help-content-reference-syntax', |
428 | | - 'wikieditor-toolbar-help-content-reference-result', |
429 | | - 'wikieditor-toolbar-help-content-rereference-description', |
430 | | - 'wikieditor-toolbar-help-content-rereference-syntax', |
431 | | - 'wikieditor-toolbar-help-content-rereference-result', |
432 | | - 'wikieditor-toolbar-help-content-showreferences-description', |
433 | | - 'wikieditor-toolbar-help-content-showreferences-syntax', |
434 | | - 'wikieditor-toolbar-help-content-showreferences-result', |
435 | | - 'wikieditor-toolbar-help-content-signaturetimestamp-description', |
436 | | - 'wikieditor-toolbar-help-content-signaturetimestamp-syntax', |
437 | | - 'wikieditor-toolbar-help-content-signaturetimestamp-result', |
438 | | - 'wikieditor-toolbar-help-content-signature-description', |
439 | | - 'wikieditor-toolbar-help-content-signature-syntax', |
440 | | - 'wikieditor-toolbar-help-content-signature-result', |
441 | | - 'wikieditor-toolbar-help-content-indent-description', |
442 | | - 'wikieditor-toolbar-help-content-indent-syntax', |
443 | | - 'wikieditor-toolbar-help-content-indent-result', |
444 | | - ), |
445 | | - 'group' => 'ext.wikiEditor', |
446 | | - ), |
447 | | - ); |
448 | | - |
449 | 14 | protected static $features = array( |
450 | 15 | |
451 | 16 | /* Beta Features */ |
— | — | @@ -687,21 +252,4 @@ |
688 | 253 | } |
689 | 254 | return true; |
690 | 255 | } |
691 | | - |
692 | | - /* |
693 | | - * ResourceLoaderRegisterModules hook |
694 | | - * |
695 | | - * Adds modules to ResourceLoader |
696 | | - */ |
697 | | - public static function resourceLoaderRegisterModules( &$resourceLoader ) { |
698 | | - global $wgExtensionAssetsPath; |
699 | | - $localpath = dirname( __FILE__ ) . '/modules'; |
700 | | - $remotepath = "$wgExtensionAssetsPath/WikiEditor/modules"; |
701 | | - foreach ( self::$modules as $name => $resources ) { |
702 | | - $resourceLoader->register( |
703 | | - $name, new ResourceLoaderFileModule( $resources, $localpath, $remotepath ) |
704 | | - ); |
705 | | - } |
706 | | - return true; |
707 | | - } |
708 | | -} |
\ No newline at end of file |
| 256 | +} |
Index: trunk/extensions/Vector/Vector.php |
— | — | @@ -48,4 +48,63 @@ |
49 | 49 | $wgHooks['BeforePageDisplay'][] = 'VectorHooks::beforePageDisplay'; |
50 | 50 | $wgHooks['GetPreferences'][] = 'VectorHooks::getPreferences'; |
51 | 51 | $wgHooks['MakeGlobalVariablesScript'][] = 'VectorHooks::makeGlobalVariablesScript'; |
52 | | -$wgHooks['ResourceLoaderRegisterModules'][] = 'VectorHooks::resourceLoaderRegisterModules'; |
| 52 | + |
| 53 | +$vectorResourceTemplate = array( |
| 54 | + 'localBasePath' => dirname( __FILE__ ) . '/modules', |
| 55 | + 'remoteExtPath' => 'Vector/modules', |
| 56 | + 'group' => 'ext.vector', |
| 57 | +); |
| 58 | +$wgResourceModules += array( |
| 59 | + 'ext.vector.collapsibleNav' => $vectorResourceTemplate + array( |
| 60 | + 'scripts' => 'ext.vector.collapsibleNav.js', |
| 61 | + 'styles' => 'ext.vector.collapsibleNav.css', |
| 62 | + 'messages' => array( |
| 63 | + 'vector-collapsiblenav-more', |
| 64 | + ), |
| 65 | + 'dependencies' => array( |
| 66 | + 'jquery.client', |
| 67 | + 'jquery.cookie', |
| 68 | + 'jquery.tabIndex', |
| 69 | + ), |
| 70 | + ), |
| 71 | + 'ext.vector.collapsibleTabs' => $vectorResourceTemplate + array( |
| 72 | + 'scripts' => 'ext.vector.collapsibleTabs.js', |
| 73 | + 'dependencies' => array( |
| 74 | + 'jquery.collapsibleTabs', |
| 75 | + 'jquery.delayedBind', |
| 76 | + ), |
| 77 | + ), |
| 78 | + 'ext.vector.editWarning' => $vectorResourceTemplate + array( |
| 79 | + 'scripts' => 'ext.vector.editWarning.js', |
| 80 | + 'messages' => array( |
| 81 | + 'vector-editwarning-warning', |
| 82 | + ), |
| 83 | + ), |
| 84 | + 'ext.vector.expandableSearch' => $vectorResourceTemplate + array( |
| 85 | + 'scripts' => 'ext.vector.expandableSearch.js', |
| 86 | + 'styles' => 'ext.vector.expandableSearch.css', |
| 87 | + 'dependencies' => array( |
| 88 | + 'jquery.client', |
| 89 | + 'jquery.expandableField', |
| 90 | + 'jquery.delayedBind', |
| 91 | + ), |
| 92 | + ), |
| 93 | + 'ext.vector.footerCleanup' => $vectorResourceTemplate + array( |
| 94 | + 'scripts' => 'ext.vector.footerCleanup.js', |
| 95 | + 'styles' => 'ext.vector.footerCleanup.css', |
| 96 | + ), |
| 97 | + 'ext.vector.simpleSearch' => $vectorResourceTemplate + array( |
| 98 | + 'scripts' => 'ext.vector.simpleSearch.js', |
| 99 | + 'messages' => array( |
| 100 | + 'vector-simplesearch-search', |
| 101 | + 'vector-simplesearch-containing', |
| 102 | + ), |
| 103 | + 'dependencies' => array( |
| 104 | + 'jquery.client', |
| 105 | + 'jquery.suggestions', |
| 106 | + 'jquery.autoEllipsis', |
| 107 | + 'jquery.placeholder', |
| 108 | + ), |
| 109 | + ), |
| 110 | +); |
| 111 | + |
Index: trunk/extensions/Vector/Vector.hooks.php |
— | — | @@ -10,66 +10,6 @@ |
11 | 11 | |
12 | 12 | /* Protected Static Members */ |
13 | 13 | |
14 | | - protected static $modules = array( |
15 | | - 'ext.vector.collapsibleNav' => array( |
16 | | - 'scripts' => 'ext.vector.collapsibleNav.js', |
17 | | - 'styles' => 'ext.vector.collapsibleNav.css', |
18 | | - 'messages' => array( |
19 | | - 'vector-collapsiblenav-more', |
20 | | - ), |
21 | | - 'dependencies' => array( |
22 | | - 'jquery.client', |
23 | | - 'jquery.cookie', |
24 | | - 'jquery.tabIndex', |
25 | | - ), |
26 | | - 'group' => 'ext.vector', |
27 | | - ), |
28 | | - 'ext.vector.collapsibleTabs' => array( |
29 | | - 'scripts' => 'ext.vector.collapsibleTabs.js', |
30 | | - 'dependencies' => array( |
31 | | - 'jquery.collapsibleTabs', |
32 | | - 'jquery.delayedBind', |
33 | | - ), |
34 | | - 'group' => 'ext.vector', |
35 | | - ), |
36 | | - 'ext.vector.editWarning' => array( |
37 | | - 'scripts' => 'ext.vector.editWarning.js', |
38 | | - 'messages' => array( |
39 | | - 'vector-editwarning-warning', |
40 | | - ), |
41 | | - 'group' => 'ext.vector', |
42 | | - ), |
43 | | - 'ext.vector.expandableSearch' => array( |
44 | | - 'scripts' => 'ext.vector.expandableSearch.js', |
45 | | - 'styles' => 'ext.vector.expandableSearch.css', |
46 | | - 'dependencies' => array( |
47 | | - 'jquery.client', |
48 | | - 'jquery.expandableField', |
49 | | - 'jquery.delayedBind', |
50 | | - ), |
51 | | - 'group' => 'ext.vector', |
52 | | - ), |
53 | | - 'ext.vector.footerCleanup' => array( |
54 | | - 'scripts' => 'ext.vector.footerCleanup.js', |
55 | | - 'styles' => 'ext.vector.footerCleanup.css', |
56 | | - 'group' => 'ext.vector', |
57 | | - ), |
58 | | - 'ext.vector.simpleSearch' => array( |
59 | | - 'scripts' => 'ext.vector.simpleSearch.js', |
60 | | - 'messages' => array( |
61 | | - 'vector-simplesearch-search', |
62 | | - 'vector-simplesearch-containing', |
63 | | - ), |
64 | | - 'dependencies' => array( |
65 | | - 'jquery.client', |
66 | | - 'jquery.suggestions', |
67 | | - 'jquery.autoEllipsis', |
68 | | - 'jquery.placeholder', |
69 | | - ), |
70 | | - 'group' => 'ext.vector', |
71 | | - ), |
72 | | - ); |
73 | | - |
74 | 14 | protected static $features = array( |
75 | 15 | 'collapsiblenav' => array( |
76 | 16 | 'preferences' => array( |
— | — | @@ -208,21 +148,4 @@ |
209 | 149 | } |
210 | 150 | return true; |
211 | 151 | } |
212 | | - |
213 | | - /* |
214 | | - * ResourceLoaderRegisterModules hook |
215 | | - * |
216 | | - * Adds modules to ResourceLoader |
217 | | - */ |
218 | | - public static function resourceLoaderRegisterModules( &$resourceLoader ) { |
219 | | - global $wgExtensionAssetsPath; |
220 | | - $localpath = dirname( __FILE__ ) . '/modules'; |
221 | | - $remotepath = "$wgExtensionAssetsPath/Vector/modules"; |
222 | | - foreach ( self::$modules as $name => $resources ) { |
223 | | - $resourceLoader->register( |
224 | | - $name, new ResourceLoaderFileModule( $resources, $localpath, $remotepath ) |
225 | | - ); |
226 | | - } |
227 | | - return true; |
228 | | - } |
229 | 152 | } |
Index: trunk/extensions/ProofreadPage/ProofreadPage_body.php |
— | — | @@ -47,7 +47,6 @@ |
48 | 48 | $wgHooks['LoadExtensionSchemaUpdates'][] = array( &$this, 'schema_update' ); |
49 | 49 | $wgHooks['EditPage::importFormData'][] = array( &$this, 'importFormData' ); |
50 | 50 | $wgHooks['OutputPageParserOutput'][] = array( &$this, 'OutputPageParserOutput' ); |
51 | | - $wgHooks['ResourceLoaderRegisterModules'][] = array( &$this, 'resourceLoaderRegisterModules' ); |
52 | 51 | |
53 | 52 | /* Namespaces */ |
54 | 53 | $this->page_namespace = preg_quote( wfMsgForContent( 'proofreadpage_namespace' ), '/' ); |
— | — | @@ -80,51 +79,6 @@ |
81 | 80 | return true; |
82 | 81 | } |
83 | 82 | |
84 | | - public static function resourceLoaderRegisterModules( &$resourceLoader ) { |
85 | | - global $wgExtensionAssetsPath; |
86 | | - $localpath = dirname( __FILE__ ); |
87 | | - $remotepath = "$wgExtensionAssetsPath/ProofreadPage"; |
88 | | - $resourceLoader->register( |
89 | | - 'ext.proofreadpage.page', |
90 | | - new ResourceLoaderFileModule( |
91 | | - array( |
92 | | - 'scripts' => 'proofread.js', |
93 | | - 'messages' => array( |
94 | | - 'proofreadpage_header', |
95 | | - 'proofreadpage_body', |
96 | | - 'proofreadpage_footer', |
97 | | - 'proofreadpage_toggleheaders', |
98 | | - 'proofreadpage_page_status', |
99 | | - 'proofreadpage_quality0_category', |
100 | | - 'proofreadpage_quality1_category', |
101 | | - 'proofreadpage_quality2_category', |
102 | | - 'proofreadpage_quality3_category', |
103 | | - 'proofreadpage_quality4_category', |
104 | | - ) |
105 | | - ), $localpath, $remotepath |
106 | | - ) |
107 | | - ); |
108 | | - |
109 | | - $resourceLoader->register( |
110 | | - 'ext.proofreadpage.article', |
111 | | - new ResourceLoaderFileModule( |
112 | | - array( |
113 | | - 'scripts' => 'proofread_article.js' |
114 | | - ), $localpath, $remotepath |
115 | | - ) |
116 | | - ); |
117 | | - |
118 | | - $resourceLoader->register( |
119 | | - 'ext.proofreadpage.index', |
120 | | - new ResourceLoaderFileModule( |
121 | | - array( 'scripts' => 'proofread_index.js' ), |
122 | | - $localpath, $remotepath |
123 | | - ) |
124 | | - ); |
125 | | - |
126 | | - return true; |
127 | | - } |
128 | | - |
129 | 83 | function schema_update( $updater = null ) { |
130 | 84 | $base = dirname( __FILE__ ); |
131 | 85 | if ( $updater === null ) { |
Index: trunk/extensions/ProofreadPage/ProofreadPage.php |
— | — | @@ -49,6 +49,35 @@ |
50 | 50 | # Group allowed to modify pagequality |
51 | 51 | $wgGroupPermissions['user']['pagequality'] = true; |
52 | 52 | |
| 53 | +# Client-side resources |
| 54 | +$prpResourceTemplate = array( |
| 55 | + 'localBasePath' => $dir, |
| 56 | + 'remoteExtPath' => 'ProofreadPage' |
| 57 | +); |
| 58 | +$wgResourceModules += array( |
| 59 | + 'ext.proofreadpage.page' => $prpResourceTemplate + array( |
| 60 | + 'scripts' => 'proofread.js', |
| 61 | + 'messages' => array( |
| 62 | + 'proofreadpage_header', |
| 63 | + 'proofreadpage_body', |
| 64 | + 'proofreadpage_footer', |
| 65 | + 'proofreadpage_toggleheaders', |
| 66 | + 'proofreadpage_page_status', |
| 67 | + 'proofreadpage_quality0_category', |
| 68 | + 'proofreadpage_quality1_category', |
| 69 | + 'proofreadpage_quality2_category', |
| 70 | + 'proofreadpage_quality3_category', |
| 71 | + 'proofreadpage_quality4_category', |
| 72 | + ) |
| 73 | + ), |
| 74 | + 'ext.proofreadpage.article' => $prpResourceTemplate + array( |
| 75 | + 'scripts' => 'proofread_article.js' |
| 76 | + ), |
| 77 | + 'ext.proofreadpage.index' => $prpResourceTemplate + array( |
| 78 | + 'scripts' => 'proofread_index.js' |
| 79 | + ), |
| 80 | +); |
| 81 | + |
53 | 82 | function wfProofreadPage() { |
54 | 83 | new ProofreadPage; |
55 | 84 | return true; |
Index: trunk/extensions/SemanticForms/includes/SF_GlobalFunctions.php |
— | — | @@ -41,7 +41,6 @@ |
42 | 42 | $wgHooks['AdminLinks'][] = 'sffAddToAdminLinks'; |
43 | 43 | $wgHooks['ParserBeforeStrip'][] = 'SFUtils::cacheFormDefinition'; |
44 | 44 | $wgHooks['ParserFirstCallInit'][] = 'SFParserFunctions::registerFunctions'; |
45 | | -$wgHooks['ResourceLoaderRegisterModules'][] = 'SFUtils::registerModules'; |
46 | 45 | $wgHooks['MakeGlobalVariablesScript'][] = 'SFFormUtils::setGlobalJSVariables'; |
47 | 46 | |
48 | 47 | $wgAPIModules['sfautocomplete'] = 'SFAutocompleteAPI'; |
— | — | @@ -117,6 +116,28 @@ |
118 | 117 | $wgExtensionMessagesFiles['SemanticForms'] = $sfgIP . '/languages/SF_Messages.php'; |
119 | 118 | $wgExtensionAliasesFiles['SemanticForms'] = $sfgIP . '/languages/SF_Aliases.php'; |
120 | 119 | |
| 120 | +// register client-side modules |
| 121 | +$sfgResourceTemplate = array( |
| 122 | + 'localBasePath' => $sfgIP, |
| 123 | + 'remoteExtPath' => 'SemanticForms' |
| 124 | +); |
| 125 | +$wgResourceModules += array( |
| 126 | + 'ext.semanticforms.main' => $sfgResourceTemplate + array( |
| 127 | + 'scripts' => 'libs/SemanticForms.js', |
| 128 | + 'styles' => array( |
| 129 | + 'skins/SemanticForms.css', |
| 130 | + 'skins/SF_jquery_ui_overrides.css', |
| 131 | + ), |
| 132 | + ), |
| 133 | + 'ext.semanticforms.fancybox' => $sfgResourceTemplate + array( |
| 134 | + 'scripts' => 'libs/jquery.fancybox-1.3.1.js', |
| 135 | + 'styles' => 'skins/jquery.fancybox-1.3.1.css', |
| 136 | + ), |
| 137 | + 'ext.semanticforms.autogrow' => $sfgResourceTemplate + array( |
| 138 | + 'scripts' => 'libs/SF_autogrow.js', |
| 139 | + ), |
| 140 | +); |
| 141 | + |
121 | 142 | /** |
122 | 143 | * Do the actual intialization of the extension. This is just a delayed init that makes sure |
123 | 144 | * MediaWiki is set up properly before we add our stuff. |
Index: trunk/extensions/SemanticForms/includes/SF_Utils.php |
— | — | @@ -102,47 +102,6 @@ |
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
106 | | - * Defines all the ResourceLoader modules needed for SF Javascript |
107 | | - * and CSS |
108 | | - */ |
109 | | - static function registerModules( $resourceLoader ) { |
110 | | - global $wgExtensionAssetsPath; |
111 | | - $localpath = dirname( dirname( __FILE__ ) ); |
112 | | - $remotepath = "$wgExtensionAssetsPath/SemanticForms"; |
113 | | - |
114 | | - $resourceLoader->register( |
115 | | - array( |
116 | | - 'ext.semanticforms.main' => new ResourceLoaderFileModule( |
117 | | - array( |
118 | | - 'scripts' => 'libs/SemanticForms.js', |
119 | | - 'styles' => array( |
120 | | - 'skins/SemanticForms.css', |
121 | | - 'skins/SF_jquery_ui_overrides.css', |
122 | | - ), |
123 | | - 'dependencies' => array( |
124 | | - 'jquery.ui.autocomplete', |
125 | | - 'jquery.ui.button' |
126 | | - ), |
127 | | - ), $localpath, $remotepath |
128 | | - ), |
129 | | - 'ext.semanticforms.fancybox' => new ResourceLoaderFileModule( |
130 | | - array( |
131 | | - 'scripts' => 'libs/jquery.fancybox-1.3.1.js', |
132 | | - 'styles' => 'skins/jquery.fancybox-1.3.1.css', |
133 | | - ), $localpath, $remotepath |
134 | | - ), |
135 | | - 'ext.semanticforms.autogrow' => new ResourceLoaderFileModule( |
136 | | - array( |
137 | | - 'scripts' => 'libs/SF_autogrow.js', |
138 | | - ), $localpath, $remotepath |
139 | | - ), |
140 | | - ) |
141 | | - ); |
142 | | - |
143 | | - return true; |
144 | | - } |
145 | | - |
146 | | - /** |
147 | 106 | * Uses the ResourceLoader (available with MediaWiki 1.17 and higher) |
148 | 107 | * to load all the necessary JS and CSS files for Semantic Forms. |
149 | 108 | */ |
Index: trunk/extensions/ArticleEmblems/ArticleEmblems.hooks.php |
— | — | @@ -84,18 +84,4 @@ |
85 | 85 | $wgOut->addHtml( '<ul id="articleEmblems">' . implode( $emblems ) . '</ul>' ); |
86 | 86 | return true; |
87 | 87 | } |
88 | | - |
89 | | - /* |
90 | | - * ResourceLoaderRegisterModules hook |
91 | | - */ |
92 | | - public static function resourceLoaderRegisterModules( &$resourceLoader ) { |
93 | | - global $wgExtensionAssetsPath; |
94 | | - $resourceLoader->register( |
95 | | - 'ext.articleEmblems', |
96 | | - new ResourceLoaderFileModule( array( |
97 | | - 'styles' => 'ext.articleEmblems.css', |
98 | | - ), dirname( __FILE__ ) . '/modules', "$wgExtensionAssetsPath/ArticleEmblems/modules" ) |
99 | | - ); |
100 | | - return true; |
101 | | - } |
102 | 88 | } |
Index: trunk/extensions/ArticleEmblems/ArticleEmblems.php |
— | — | @@ -27,4 +27,8 @@ |
28 | 28 | $wgHooks['ParserTestTables'][] = 'ArticleEmblemsHooks::parserTestTables'; |
29 | 29 | $wgHooks['ArticleViewHeader'][] = 'ArticleEmblemsHooks::articleViewHeader'; |
30 | 30 | $wgHooks['ArticleSaveComplete'][] = 'ArticleEmblemsHooks::articleSaveComplete'; |
31 | | -$wgHooks['ResourceLoaderRegisterModules'][] = 'ArticleEmblemsHooks::resourceLoaderRegisterModules'; |
\ No newline at end of file |
| 31 | +$wgResourceModules['ext.articleEmblems'] = array( |
| 32 | + 'styles' => 'ext.articleEmblems.css', |
| 33 | + 'localBasePath' => dirname( __FILE__ ) . '/modules', |
| 34 | + 'remoteExtPath' => 'ArticleEmblems/modules', |
| 35 | +); |
Index: trunk/extensions/ClickTracking/ClickTracking.hooks.php |
— | — | @@ -8,24 +8,6 @@ |
9 | 9 | |
10 | 10 | class ClickTrackingHooks { |
11 | 11 | |
12 | | - /* Protected Static Members */ |
13 | | - |
14 | | - protected static $modules = array( |
15 | | - 'jquery.clickTracking' => array( |
16 | | - 'scripts' => 'jquery.clickTracking.js', |
17 | | - 'dependencies' => 'jquery.cookie', |
18 | | - ), |
19 | | - 'ext.clickTracking' => array( |
20 | | - 'scripts' => 'ext.clickTracking.js', |
21 | | - 'dependencies' => 'jquery.clickTracking', |
22 | | - ), |
23 | | - 'ext.clickTracking.special' => array( |
24 | | - 'scripts' => 'ext.clickTracking.special.js', |
25 | | - 'styles' => 'ext.clickTracking.special.css', |
26 | | - 'dependencies' => array( 'jquery.ui.datepicker', 'jquery.ui.dialog' ), |
27 | | - ), |
28 | | - ); |
29 | | - |
30 | 12 | /* Static Methods */ |
31 | 13 | |
32 | 14 | /** |
— | — | @@ -94,25 +76,6 @@ |
95 | 77 | } |
96 | 78 | |
97 | 79 | /** |
98 | | - * ResourceLoaderRegisterModules hook |
99 | | - * Adds modules to ResourceLoader |
100 | | - * |
101 | | - * @param $resourceLoader Object: ResourceLoader object |
102 | | - * @return Boolean: always true |
103 | | - */ |
104 | | - public static function resourceLoaderRegisterModules( &$resourceLoader ) { |
105 | | - global $wgExtensionAssetsPath; |
106 | | - $localpath = dirname( __FILE__ ) . '/modules'; |
107 | | - $remotepath = "$wgExtensionAssetsPath/extensions/ClickTracking/modules"; |
108 | | - foreach ( self::$modules as $name => $module ) { |
109 | | - $resourceLoader->register( |
110 | | - $name, new ResourceLoaderFileModule( $module, $localpath, $remotepath ) |
111 | | - ); |
112 | | - } |
113 | | - return true; |
114 | | - } |
115 | | - |
116 | | - /** |
117 | 80 | * Get the number of revisions a user has made since a given time |
118 | 81 | * |
119 | 82 | * @param $ts beginning timestamp |
Index: trunk/extensions/ClickTracking/ClickTracking.php |
— | — | @@ -48,7 +48,6 @@ |
49 | 49 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'ClickTrackingHooks::loadExtensionSchemaUpdates'; |
50 | 50 | $wgHooks['BeforePageDisplay'][] = 'ClickTrackingHooks::beforePageDisplay'; |
51 | 51 | $wgHooks['MakeGlobalVariablesScript'][] = 'ClickTrackingHooks::makeGlobalVariablesScript'; |
52 | | -$wgHooks['ResourceLoaderRegisterModules'][] = 'ClickTrackingHooks::resourceLoaderRegisterModules'; |
53 | 52 | $wgHooks['ParserTestTables'][] = 'ClickTrackingHooks::parserTestTables'; |
54 | 53 | |
55 | 54 | // API modules |
— | — | @@ -64,4 +63,24 @@ |
65 | 64 | |
66 | 65 | // i18n |
67 | 66 | $wgExtensionMessagesFiles['ClickTracking'] = $dir . 'ClickTracking.i18n.php'; |
68 | | -$wgExtensionAliasesFiles['ClickTracking'] = $dir . 'ClickTracking.alias.php'; |
\ No newline at end of file |
| 67 | +$wgExtensionAliasesFiles['ClickTracking'] = $dir . 'ClickTracking.alias.php'; |
| 68 | + |
| 69 | +// Resource modules |
| 70 | +$ctResourceTemplate = array( |
| 71 | + 'localBasePath' => $dir . 'modules', |
| 72 | + 'remoteExtPath' => 'ClickTracking/modules', |
| 73 | +); |
| 74 | +$wgResourceModules['jquery.clickTracking'] = array( |
| 75 | + 'scripts' => 'jquery.clickTracking.js', |
| 76 | + 'dependencies' => 'jquery.cookie', |
| 77 | +) + $ctResourceTemplate; |
| 78 | +$wgResourceModules['ext.clickTracking'] = array( |
| 79 | + 'scripts' => 'ext.clickTracking.js', |
| 80 | + 'dependencies' => 'jquery.clickTracking', |
| 81 | +) + $ctResourceTemplate; |
| 82 | +$wgResourceModules['ext.clickTracking.special'] = array( |
| 83 | + 'scripts' => 'ext.clickTracking.special.js', |
| 84 | + 'styles' => 'ext.clickTracking.special.css', |
| 85 | + 'dependencies' => array( 'jquery.ui.datepicker', 'jquery.ui.dialog' ), |
| 86 | +) + $ctResourceTemplate; |
| 87 | + |
Index: trunk/extensions/PrefSwitch/PrefSwitch.php |
— | — | @@ -162,4 +162,12 @@ |
163 | 163 | $wgSpecialPageGroups['PrefSwitch'] = 'wiki'; |
164 | 164 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'PrefSwitchHooks::loadExtensionSchemaUpdates'; |
165 | 165 | $wgHooks['PersonalUrls'][] = 'PrefSwitchHooks::personalUrls'; |
166 | | -$wgHooks['ResourceLoaderRegisterModules'][] = 'PrefSwitchHooks::resourceLoaderRegisterModules'; |
| 166 | + |
| 167 | +$wgResourceModules['ext.prefSwitch'] = array( |
| 168 | + 'scripts' => 'ext.prefSwitch.js', |
| 169 | + 'styles' => 'ext.prefSwitch.css', |
| 170 | + 'dependencies' => 'jquery.client', |
| 171 | + 'localBasePath' => dirname( __FILE__ ) . '/modules', |
| 172 | + 'remoteExtPath' => 'PrefSwitch/modules', |
| 173 | +); |
| 174 | + |
Index: trunk/extensions/PrefSwitch/PrefSwitch.hooks.php |
— | — | @@ -79,17 +79,4 @@ |
80 | 80 | ); |
81 | 81 | return true; |
82 | 82 | } |
83 | | - |
84 | | - /* |
85 | | - * ResourceLoaderRegisterModules hook |
86 | | - */ |
87 | | - public static function resourceLoaderRegisterModules( &$resourceLoader ) { |
88 | | - global $wgExtensionAssetsPath; |
89 | | - $localpath = dirname( __FILE__ ) . '/modules'; |
90 | | - $remotepath = "$wgExtensionAssetsPath/PrefSwitch/moduless"; |
91 | | - foreach ( self::$modules as $name => $resources ) { |
92 | | - $resourceLoader->register( $name, new ResourceLoaderFileModule( $resources, $localpath, $remotepath ) ); |
93 | | - } |
94 | | - return true; |
95 | | - } |
96 | 83 | } |
Index: trunk/extensions/Translate/Translate.php |
— | — | @@ -51,7 +51,6 @@ |
52 | 52 | // Register initialization hook |
53 | 53 | $wgExtensionFunctions[] = 'efTranslateInit'; |
54 | 54 | $wgHooks['CanonicalNamespaces'][] = 'efTranslateNamespaces'; |
55 | | -$wgHooks['ResourceLoaderRegisterModules'][] = 'efTranslateResources'; |
56 | 55 | |
57 | 56 | // Register special pages into MediaWiki |
58 | 57 | $wgSpecialPages['Translate'] = 'SpecialTranslate'; |
— | — | @@ -114,6 +113,18 @@ |
115 | 114 | $wgAvailableRights[] = 'translate-import'; |
116 | 115 | $wgAvailableRights[] = 'translate-manage'; |
117 | 116 | |
| 117 | +// Client-side resource modules |
| 118 | +$wgResourceModules['translate-css'] = array( |
| 119 | + 'styles' => 'Translate.css', |
| 120 | + 'localBasePath' => dirname( __FILE__ ), |
| 121 | + 'remoteExtPath' => 'Translate' |
| 122 | +); |
| 123 | +$wgResourceModules['translationdisplay'] = array( |
| 124 | + 'scripts' => 'js/translationdisplay.js', |
| 125 | + 'localBasePath' => dirname( __FILE__ ), |
| 126 | + 'remoteExtPath' => 'Translate' |
| 127 | +); |
| 128 | + |
118 | 129 | /** @endcond */ |
119 | 130 | |
120 | 131 | |
— | — | @@ -421,23 +432,6 @@ |
422 | 433 | |
423 | 434 | |
424 | 435 | # Startup code |
425 | | -function efTranslateResources( &$resourceLoader ) { |
426 | | - global $wgExtensionAssetsPath; |
427 | | - $localPath = dirname( __FILE__ ); |
428 | | - $remotePath = "$wgExtensionAssetsPath/Translate"; |
429 | | - $resourceLoader->register( |
430 | | - array( |
431 | | - 'translate-css' => |
432 | | - new ResourceLoaderFileModule( array( 'styles' => 'Translate.css' ), |
433 | | - $localPath, $remotePath ), |
434 | | - 'translationdisplay' => |
435 | | - new ResourceLoaderFileModule( array( 'scripts' => 'js/translationdisplay.js' ), |
436 | | - $localPath, $remotePath ), |
437 | | - ) |
438 | | -); |
439 | | - return true; |
440 | | -} |
441 | | - |
442 | 436 | function efTranslateNamespaces( &$list ) { |
443 | 437 | global $wgPageTranslationNamespace; |
444 | 438 | if ( !defined( 'NS_TRANSLATIONS' ) ) { |
— | — | @@ -680,4 +674,4 @@ |
681 | 675 | $wgNamespacesToBeSearchedDefault[$id] = true; |
682 | 676 | } |
683 | 677 | |
684 | | -/** @defgroup TranslateSpecialPage Special pages of Translate extension */ |
\ No newline at end of file |
| 678 | +/** @defgroup TranslateSpecialPage Special pages of Translate extension */ |