Merge "Follow-up 6af8dcf: Remove duplicate styles in shared.css"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 4 Jul 2016 19:07:03 +0000 (19:07 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 4 Jul 2016 19:07:03 +0000 (19:07 +0000)
docs/extension.schema.json
resources/src/mediawiki/mediawiki.js

index c69cbe3..11adc61 100644 (file)
                                                                },
                                                                "group": {
                                                                        "type": "string",
-                                                                       "description": "Group which this module should be loaded together with"
+                                                                       "description": "Group with which this module should be loaded"
                                                                },
                                                                "position": {
                                                                        "type": "string",
                                                                }
                                                        }
                                                },
+                                               {
+                                                       "description": "A ResourceLoaderWikiModule definition",
+                                                       "additionalProperties": false,
+                                                       "properties": {
+                                                               "class": {
+                                                                       "enum": ["ResourceLoaderWikiModule"]
+                                                               },
+                                                               "group": {
+                                                                       "type": "string",
+                                                                       "description": "Group with which this module should be loaded"
+                                                               },
+                                                               "position": {
+                                                                       "type": "string",
+                                                                       "description": "Position on the page to load this module at",
+                                                                       "enum": [
+                                                                               "bottom",
+                                                                               "top"
+                                                                       ]
+                                                               },
+                                                               "targets": {
+                                                                       "type": ["string", "array"],
+                                                                       "description": "ResourceLoader target the module can run on",
+                                                                       "items": {
+                                                                               "type": "string"
+                                                                       }
+                                                               },
+                                                               "scripts": {
+                                                                       "type": "array",
+                                                                       "description": "A list of on-wiki pages containing JavaScript that should be loaded",
+                                                                       "items": {
+                                                                               "type": "string"
+                                                                       }
+                                                               },
+                                                               "styles": {
+                                                                       "type": "array",
+                                                                       "description": "A list of on-wiki pages containing CSS that should be loaded",
+                                                                       "items": {
+                                                                               "type": "string"
+                                                                       }
+                                                               }
+                                                       }
+                                               },
                                                {
                                                        "description": "A ResourceLoaderImageModule definition",
                                                        "additionalProperties": false,
index 8d42b98..335e0bf 100644 (file)
                                 *         OO.compare( [ 1 ], [ 1 ] );
                                 *     } );
                                 *
-                                * @param {string|Array} dependencies Module name or array of modules names the callback
-                                *  dependends on to be ready before executing
+                                * @param {string|Array} dependencies Module name or array of modules names the
+                                *  callback depends on to be ready before executing
                                 * @param {Function} [ready] Callback to execute when all dependencies are ready
                                 * @param {Function} [error] Callback to execute if one or more dependencies failed
                                 * @return {jQuery.Promise}
                                require: function ( moduleName ) {
                                        var state = mw.loader.getState( moduleName );
 
-                                       // Only ready mudules can be required
+                                       // Only ready modules can be required
                                        if ( state !== 'ready' ) {
                                                // Module may've forgotten to declare a dependency
                                                throw new Error( 'Module "' + moduleName + '" is not loaded.' );