Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -338,6 +338,9 @@ |
339 | 339 | 'anonnotice', |
340 | 340 | 'newsectionheaderdefaultlevel', |
341 | 341 | 'red-link-title', |
| 342 | + 'sort-descending', |
| 343 | + 'sort-ascending', |
| 344 | + |
342 | 345 | ), |
343 | 346 | 'nstab' => array( |
344 | 347 | 'nstab-main', |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -933,6 +933,8 @@ |
934 | 934 | 'anonnotice' => '-', # do not translate or duplicate this message to other languages |
935 | 935 | 'newsectionheaderdefaultlevel' => '== $1 ==', # do not translate or duplicate this message to other languages |
936 | 936 | 'red-link-title' => '$1 (page does not exist)', |
| 937 | +'sort-descending' => 'Sort descending', |
| 938 | +'sort-ascending' => 'Sort ascending', |
937 | 939 | |
938 | 940 | # Short words for each namespace, by default used in the namespace tab in monobook |
939 | 941 | 'nstab-main' => 'Page', |
Index: trunk/phase3/resources/jquery/jquery.tablesorter.js |
— | — | @@ -141,6 +141,7 @@ |
142 | 142 | // Check next parser, reset rows |
143 | 143 | i++; |
144 | 144 | rowIndex = 0; |
| 145 | + concurrent = 0; |
145 | 146 | } |
146 | 147 | } else { |
147 | 148 | // Empty cell |
— | — | @@ -255,7 +256,7 @@ |
256 | 257 | // } |
257 | 258 | } |
258 | 259 | |
259 | | - function buildHeaders( table ) { |
| 260 | + function buildHeaders( table, msg ) { |
260 | 261 | var maxSeen = 0; |
261 | 262 | var longest; |
262 | 263 | // if ( table.config.debug ) { |
— | — | @@ -289,7 +290,8 @@ |
290 | 291 | if ( $( this ).is( '.unsortable' ) ) this.sortDisabled = true; |
291 | 292 | |
292 | 293 | if ( !this.sortDisabled ) { |
293 | | - var $th = $( this ).addClass( table.config.cssHeader ); |
| 294 | + var $th = $( this ).addClass( table.config.cssHeader ).attr( 'title', msg[1] ); |
| 295 | + |
294 | 296 | //if ( table.config.onRenderHeader ) table.config.onRenderHeader.apply($th); |
295 | 297 | } |
296 | 298 | |
— | — | @@ -316,7 +318,7 @@ |
317 | 319 | return false; |
318 | 320 | } |
319 | 321 | |
320 | | - function setHeadersCss( table, $headers, list, css ) { |
| 322 | + function setHeadersCss( table, $headers, list, css, msg ) { |
321 | 323 | // remove all header information |
322 | 324 | $headers.removeClass( css[0] ).removeClass( css[1] ); |
323 | 325 | |
— | — | @@ -329,7 +331,7 @@ |
330 | 332 | |
331 | 333 | var l = list.length; |
332 | 334 | for ( var i = 0; i < l; i++ ) { |
333 | | - h[list[i][0]].addClass( css[list[i][1]] ); |
| 335 | + h[ list[i][0] ].addClass( css[ list[i][1] ] ).attr( 'title', msg[ list[i][1] ] ); |
334 | 336 | } |
335 | 337 | } |
336 | 338 | |
— | — | @@ -515,8 +517,13 @@ |
516 | 518 | $this = $( this ); |
517 | 519 | // save the settings where they read |
518 | 520 | $.data( this, "tablesorter", config ); |
| 521 | + |
| 522 | + // get the css class names, could be done else where. |
| 523 | + var sortCSS = [ config.cssDesc, config.cssAsc ]; |
| 524 | + var sortMsg = [ mw.msg( 'sort-descending' ), mw.msg( 'sort-ascending' ) ]; |
| 525 | + |
519 | 526 | // build headers |
520 | | - $headers = buildHeaders( this ); |
| 527 | + $headers = buildHeaders( this, sortMsg ); |
521 | 528 | // Grab and process locale settings |
522 | 529 | buildTransformTable(); |
523 | 530 | buildDateTable(); |
— | — | @@ -526,8 +533,6 @@ |
527 | 534 | //performance improvements in some browsers |
528 | 535 | cacheRegexs(); |
529 | 536 | |
530 | | - // get the css class names, could be done else where. |
531 | | - var sortCSS = [config.cssDesc, config.cssAsc]; |
532 | 537 | // apply event handling to headers |
533 | 538 | // this is to big, perhaps break it out? |
534 | 539 | $headers.click( |
— | — | @@ -584,7 +589,7 @@ |
585 | 590 | } |
586 | 591 | setTimeout( function () { |
587 | 592 | // set css for headers |
588 | | - setHeadersCss( $this[0], $headers, config.sortList, sortCSS ); |
| 593 | + setHeadersCss( $this[0], $headers, config.sortList, sortCSS, sortMsg ); |
589 | 594 | appendToTable( |
590 | 595 | $this[0], multisort( |
591 | 596 | $this[0], config.sortList, cache ) ); |
Index: trunk/phase3/resources/Resources.php |
— | — | @@ -137,7 +137,8 @@ |
138 | 138 | 'scripts' => 'resources/jquery/jquery.tabIndex.js', |
139 | 139 | ), |
140 | 140 | 'jquery.tablesorter' => array( |
141 | | - 'scripts' => 'resources/jquery/jquery.tablesorter.js' |
| 141 | + 'scripts' => 'resources/jquery/jquery.tablesorter.js', |
| 142 | + 'messages' => array( 'sort-descending', 'sort-ascending' ), |
142 | 143 | ), |
143 | 144 | 'jquery.textSelection' => array( |
144 | 145 | 'scripts' => 'resources/jquery/jquery.textSelection.js', |