correcting comments in mw.util
authorKrinkle <krinkle@users.mediawiki.org>
Fri, 24 Dec 2010 01:06:29 +0000 (01:06 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Fri, 24 Dec 2010 01:06:29 +0000 (01:06 +0000)
resources/mediawiki.util/mediawiki.util.js

index 51adb0f..d214dba 100644 (file)
                 * Append a new style block to the head
                 *
                 * @param text String CSS to be appended
-                * @return the CSS stylesheet
+                * @return CSSStyleSheet object
                 */
                'addCSS' : function( text ) {
                        var s = document.createElement( 'style' );
                /**
                 * Hide/show the table of contents element
                 *
-                * @param text String CSS to be appended
-                * @return the CSS stylesheet
+                * @param $toggleLink jQuery object of the toggle link
+                * @return String boolean visibility of the toc (true means it's visible)
                 */
                'toggleToc' : function( $toggleLink ) {
                        var $tocList = $( '#toc ul:first' ),
                                        expires: 30,
                                        path: '/'
                                } );
+                               return true;
                        } else {
                                $tocList.slideUp( 'fast' );
                                $toggleLink.text( mw.msg( 'showtoc' ) );
                                        expires: 30,
                                        path: '/'
                                } );
+                               return false;
                        }
                },