Merge "Check validity and availability of usernames during signup via AJAX"
[lhc/web/wiklou.git] / resources / mediawiki / mediawiki.debug.js
index 04cfbb0..b6cc2b7 100644 (file)
@@ -1,37 +1,41 @@
-/**
- * JavaScript for the new debug toolbar, enabled through $wgDebugToolbar.
- *
- * @author John Du Hart
- * @since 1.19
- */
-
 ( function ( mw, $ ) {
        'use strict';
 
        var debug,
                hovzer = $.getFootHovzer();
 
+       /**
+        * Debug toolbar.
+        *
+        * Enabled server-side through `$wgDebugToolbar`.
+        *
+        * @class mw.Debug
+        * @singleton
+        * @author John Du Hart
+        * @since 1.19
+        */
        debug = mw.Debug = {
                /**
                 * Toolbar container element
                 *
-                * @var {jQuery}
+                * @property {jQuery}
                 */
                $container: null,
 
                /**
                 * Object containing data for the debug toolbar
                 *
-                * @var {Object}
+                * @property {Object}
                 */
                data: {},
 
                /**
-                * Initializes the debugging pane.
+                * Initialize the debugging pane
+                *
                 * Shouldn't be called before the document is ready
                 * (since it binds to elements on the page).
                 *
-                * @param {Object} data, defaults to 'debugInfo' from mw.config
+                * @param {Object} [data] Defaults to 'debugInfo' from mw.config
                 */
                init: function ( data ) {
 
                },
 
                /**
-                * Switches between panes
+                * Switch between panes
+                *
+                * Should be called with an HTMLElement as its thisArg,
+                * because it's meant to be an event handler.
+                *
+                * TODO: Store cookie for last pane open.
                 *
-                * @todo Store cookie for last pane open
-                * @context {Element}
                 * @param {jQuery.Event} e
                 */
                switchPane: function ( e ) {
@@ -91,7 +98,7 @@
                },
 
                /**
-                * Constructs the HTML for the debugging toolbar
+                * Construct the HTML for the debugging toolbar
                 */
                buildHtml: function () {
                        var $container, $bits, panes, id, gitInfo;
                        /**
                         * Returns a jQuery element for a debug-bit div
                         *
-                        * @param id
+                        * @ignore
+                        * @param {string} id
                         * @return {jQuery}
                         */
                        function bitDiv( id ) {
                        /**
                         * Returns a jQuery element for a pane link
                         *
-                        * @param id
-                        * @param text
+                        * @ignore
+                        * @param {string} id
+                        * @param {string} text
                         * @return {jQuery}
                         */
                        function paneLabel( id, text ) {
                        /**
                         * Returns a jQuery element for a debug-bit div with a for a pane link
                         *
-                        * @param id CSS id snippet. Will be prefixed with 'mw-debug-'
-                        * @param text Text to show
-                        * @param count Optional count to show
+                        * @ignore
+                        * @param {string} id CSS id snippet. Will be prefixed with 'mw-debug-'
+                        * @param {string} text Text to show
+                        * @param {string} count Optional count to show
                         * @return {jQuery}
                         */
                        function paneTriggerBitDiv( id, text, count ) {
                },
 
                /**
-                * Builds the console panel
+                * Build the console panel
                 */
                buildConsoleTable: function () {
                        var $table, entryTypeText, i, length, entry;
                },
 
                /**
-                * Query list pane
+                * Build query list pane
+                *
+                * @return {jQuery}
                 */
                buildQueryTable: function () {
                        var $table, i, length, query;
                },
 
                /**
-                * Legacy debug log pane
+                * Build legacy debug log pane
+                *
+                * @return {jQuery}
                 */
                buildDebugLogTable: function () {
                        var $list, i, length, line;
                },
 
                /**
-                * Request information pane
+                * Build request information pane
+                *
+                * @return {jQuery}
                 */
                buildRequestPane: function () {
 
                },
 
                /**
-                * Included files pane
+                * Build included files pane
+                *
+                * @return {jQuery}
                 */
                buildIncludesPane: function () {
                        var $table, i, length, file;