Index: trunk/phase3/skins/common/wikibits.js |
— | — | @@ -612,9 +612,6 @@ |
613 | 613 | // might cause the function to terminate prematurely |
614 | 614 | doneOnloadHook = true; |
615 | 615 | |
616 | | - updateTooltipAccessKeys( null ); |
617 | | - setupCheckboxShiftClick(); |
618 | | - |
619 | 616 | // Run any added-on functions |
620 | 617 | for ( var i = 0; i < onloadFuncts.length; i++ ) { |
621 | 618 | onloadFuncts[i](); |
Index: trunk/phase3/resources/mediawiki/mediawiki.util.js |
— | — | @@ -250,15 +250,12 @@ |
251 | 251 | * otherwise, all the nodes that will probably have accesskeys by |
252 | 252 | * default are updated. |
253 | 253 | * |
254 | | - * @param nodeList mixed A jQuery object, or array of elements to update. |
| 254 | + * @param nodeList {Array|jQuery} (optional) A jQuery object, or array of elements to update. |
255 | 255 | */ |
256 | 256 | 'updateTooltipAccessKeys' : function( nodeList ) { |
257 | 257 | var $nodes; |
258 | | - if ( nodeList instanceof jQuery ) { |
259 | | - $nodes = nodeList; |
260 | | - } else if ( nodeList ) { |
261 | | - $nodes = $( nodeList ); |
262 | | - } else { |
| 258 | + if ( !nodeList ) { |
| 259 | + |
263 | 260 | // Rather than scanning all links, just the elements that |
264 | 261 | // contain the relevant links |
265 | 262 | this.updateTooltipAccessKeys( |
— | — | @@ -267,7 +264,13 @@ |
268 | 265 | // these are rare enough that no such optimization is needed |
269 | 266 | this.updateTooltipAccessKeys( $( 'input' ) ); |
270 | 267 | this.updateTooltipAccessKeys( $( 'label' ) ); |
| 268 | + |
271 | 269 | return; |
| 270 | + |
| 271 | + } else if ( nodeList instanceof jQuery ) { |
| 272 | + $nodes = nodeList; |
| 273 | + } else { |
| 274 | + $nodes = $( nodeList ); |
272 | 275 | } |
273 | 276 | |
274 | 277 | $nodes.each( function ( i ) { |
Index: trunk/phase3/resources/mediawiki.page/mediawiki.page.ready.js |
— | — | @@ -18,4 +18,7 @@ |
19 | 19 | /* Enable CheckboxShiftClick */ |
20 | 20 | $( 'input[type=checkbox]:not(.noshiftselect)' ).checkboxShiftClick(); |
21 | 21 | |
| 22 | + /* Add accesskey hints to the tooltips */ |
| 23 | + mw.util.updateTooltipAccessKeys(); |
| 24 | + |
22 | 25 | } ); |