Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.js |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | * Append a new style block to the head |
123 | 123 | * |
124 | 124 | * @param text String CSS to be appended |
125 | | - * @return the CSS stylesheet |
| 125 | + * @return CSSStyleSheet object |
126 | 126 | */ |
127 | 127 | 'addCSS' : function( text ) { |
128 | 128 | var s = document.createElement( 'style' ); |
— | — | @@ -139,8 +139,8 @@ |
140 | 140 | /** |
141 | 141 | * Hide/show the table of contents element |
142 | 142 | * |
143 | | - * @param text String CSS to be appended |
144 | | - * @return the CSS stylesheet |
| 143 | + * @param $toggleLink jQuery object of the toggle link |
| 144 | + * @return String boolean visibility of the toc (true means it's visible) |
145 | 145 | */ |
146 | 146 | 'toggleToc' : function( $toggleLink ) { |
147 | 147 | var $tocList = $( '#toc ul:first' ), |
— | — | @@ -152,6 +152,7 @@ |
153 | 153 | expires: 30, |
154 | 154 | path: '/' |
155 | 155 | } ); |
| 156 | + return true; |
156 | 157 | } else { |
157 | 158 | $tocList.slideUp( 'fast' ); |
158 | 159 | $toggleLink.text( mw.msg( 'showtoc' ) ); |
— | — | @@ -159,6 +160,7 @@ |
160 | 161 | expires: 30, |
161 | 162 | path: '/' |
162 | 163 | } ); |
| 164 | + return false; |
163 | 165 | } |
164 | 166 | }, |
165 | 167 | |