r87172 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87171‎ | r87172 | r87173 >
Date:18:58, 30 April 2011
Author:diebuche
Status:ok
Tags:
Comment:
Followup to r86108 per CR: Fix two calls to legacy tablesorter
Modified paths:
  • /trunk/extensions/LiquidThreads/js/lqt.toolbar.js (modified) (history)
  • /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.config.js (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/js/lqt.toolbar.js
@@ -1572,11 +1572,14 @@
15731573 <span rel="wikieditor-toolbar-tool-table-example"></span>\
15741574 <div class="wikieditor-toolbar-table-preview-content">\
15751575 <table id="wikieditor-toolbar-table-preview" class="wikieditor-toolbar-table-preview wikitable">\
 1576+ <thead>\
15761577 <tr class="wikieditor-toolbar-table-preview-header">\
15771578 <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
15781579 <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
15791580 <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
1580 - </tr><tr class="wikieditor-toolbar-table-preview-hidden" style="display: none;">\
 1581+ </tr>\
 1582+ </thead><tbody>\
 1583+ <tr class="wikieditor-toolbar-table-preview-hidden" style="display: none;">\
15811584 <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
15821585 <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
15831586 <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
@@ -1593,6 +1596,7 @@
15941597 <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
15951598 <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
15961599 </tr>\
 1600+ </tbody>\
15971601 </table>\
15981602 </div>\
15991603 </div></div>',
@@ -1611,15 +1615,14 @@
16121616
16131617 // Hack for sortable preview: dynamically adding
16141618 // sortable class doesn't work, so we use a clone
1615 - // FIXME: Relies on sortable table internals
16161619 $j( '#wikieditor-toolbar-table-preview' )
16171620 .clone()
16181621 .attr( 'id', 'wikieditor-toolbar-table-preview2' )
16191622 .addClass( 'sortable' )
16201623 .insertAfter( $j( '#wikieditor-toolbar-table-preview' ) )
16211624 .hide();
1622 - if ( typeof ts_makeSortable == 'function' )
1623 - ts_makeSortable( $j( '#wikieditor-toolbar-table-preview2' ).get( 0 ) );
 1625+ if ( typeof jQuery.fn.tablesorter == 'function' )
 1626+ $j( '#wikieditor-toolbar-table-preview2' ).tablesorter();
16241627 $j( '#wikieditor-toolbar-table-sortable' ).click( function() {
16251628 // Swap the currently shown one clone with the other one
16261629 $j( '#wikieditor-toolbar-table-preview' )
@@ -1639,12 +1642,11 @@
16401643 var hiddenHTML = $j( '.wikieditor-toolbar-table-preview-hidden' ).html();
16411644 $j( '.wikieditor-toolbar-table-preview-header' ).html( hiddenHTML );
16421645 $j( '.wikieditor-toolbar-table-preview-hidden' ).html( headerHTML );
1643 - if ( typeof ts_makeSortable == 'function' )
1644 - ts_makeSortable(
1645 - $j( '#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2' )
 1646+ if ( typeof jQuery.fn.tablesorter == 'function' ) {
 1647+ $( '#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2' )
16461648 .filter( '.sortable' )
1647 - .get( 0 )
1648 - );
 1649+ .tablesorter();
 1650+ }
16491651 });
16501652
16511653 },
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.config.js
@@ -730,11 +730,14 @@
731731 <span rel="wikieditor-toolbar-tool-table-example"></span>\
732732 <div class="wikieditor-toolbar-table-preview-content">\
733733 <table id="wikieditor-toolbar-table-preview" class="wikieditor-toolbar-table-preview wikitable">\
 734+ <thead>\
734735 <tr class="wikieditor-toolbar-table-preview-header">\
735736 <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
736737 <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
737738 <th rel="wikieditor-toolbar-tool-table-example-header"></th>\
738 - </tr><tr class="wikieditor-toolbar-table-preview-hidden" style="display: none;">\
 739+ </tr>\
 740+ </thead><tbody>\
 741+ <tr class="wikieditor-toolbar-table-preview-hidden" style="display: none;">\
739742 <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
740743 <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
741744 <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
@@ -751,6 +754,7 @@
752755 <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
753756 <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\
754757 </tr>\
 758+ </tbody>\
755759 </table>\
756760 </div>\
757761 </div></div>',
@@ -769,15 +773,14 @@
770774
771775 // Hack for sortable preview: dynamically adding
772776 // sortable class doesn't work, so we use a clone
773 - // FIXME: Relies on sortable table internals
774777 $( '#wikieditor-toolbar-table-preview' )
775778 .clone()
776779 .attr( 'id', 'wikieditor-toolbar-table-preview2' )
777780 .addClass( 'sortable' )
778781 .insertAfter( $( '#wikieditor-toolbar-table-preview' ) )
779782 .hide();
780 - if ( typeof ts_makeSortable == 'function' )
781 - ts_makeSortable( $( '#wikieditor-toolbar-table-preview2' ).get( 0 ) );
 783+ if ( typeof jQuery.fn.tablesorter == 'function' )
 784+ $( '#wikieditor-toolbar-table-preview2' ).tablesorter();
782785 $( '#wikieditor-toolbar-table-sortable' ).click( function() {
783786 // Swap the currently shown one clone with the other one
784787 $( '#wikieditor-toolbar-table-preview' )
@@ -797,12 +800,11 @@
798801 var hiddenHTML = $( '.wikieditor-toolbar-table-preview-hidden' ).html();
799802 $( '.wikieditor-toolbar-table-preview-header' ).html( hiddenHTML );
800803 $( '.wikieditor-toolbar-table-preview-hidden' ).html( headerHTML );
801 - if ( typeof ts_makeSortable == 'function' )
802 - ts_makeSortable(
803 - $( '#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2' )
 804+ if ( typeof jQuery.fn.tablesorter == 'function' ) {
 805+ $( '#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2' )
804806 .filter( '.sortable' )
805 - .get( 0 )
806 - );
 807+ .tablesorter();
 808+ }
807809 });
808810 },
809811 dialog: {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86108Followup ro r86088: Use data-sort-type instead of classes to specify the pars...diebuche08:23, 15 April 2011

Status & tagging log