Index: trunk/extensions/LiquidThreads/js/lqt.toolbar.js |
— | — | @@ -1572,11 +1572,14 @@ |
1573 | 1573 | <span rel="wikieditor-toolbar-tool-table-example"></span>\ |
1574 | 1574 | <div class="wikieditor-toolbar-table-preview-content">\ |
1575 | 1575 | <table id="wikieditor-toolbar-table-preview" class="wikieditor-toolbar-table-preview wikitable">\ |
| 1576 | + <thead>\ |
1576 | 1577 | <tr class="wikieditor-toolbar-table-preview-header">\ |
1577 | 1578 | <th rel="wikieditor-toolbar-tool-table-example-header"></th>\ |
1578 | 1579 | <th rel="wikieditor-toolbar-tool-table-example-header"></th>\ |
1579 | 1580 | <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;">\ |
1581 | 1584 | <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\ |
1582 | 1585 | <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\ |
1583 | 1586 | <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\ |
— | — | @@ -1593,6 +1596,7 @@ |
1594 | 1597 | <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\ |
1595 | 1598 | <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\ |
1596 | 1599 | </tr>\ |
| 1600 | + </tbody>\ |
1597 | 1601 | </table>\ |
1598 | 1602 | </div>\ |
1599 | 1603 | </div></div>', |
— | — | @@ -1611,15 +1615,14 @@ |
1612 | 1616 | |
1613 | 1617 | // Hack for sortable preview: dynamically adding |
1614 | 1618 | // sortable class doesn't work, so we use a clone |
1615 | | - // FIXME: Relies on sortable table internals |
1616 | 1619 | $j( '#wikieditor-toolbar-table-preview' ) |
1617 | 1620 | .clone() |
1618 | 1621 | .attr( 'id', 'wikieditor-toolbar-table-preview2' ) |
1619 | 1622 | .addClass( 'sortable' ) |
1620 | 1623 | .insertAfter( $j( '#wikieditor-toolbar-table-preview' ) ) |
1621 | 1624 | .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(); |
1624 | 1627 | $j( '#wikieditor-toolbar-table-sortable' ).click( function() { |
1625 | 1628 | // Swap the currently shown one clone with the other one |
1626 | 1629 | $j( '#wikieditor-toolbar-table-preview' ) |
— | — | @@ -1639,12 +1642,11 @@ |
1640 | 1643 | var hiddenHTML = $j( '.wikieditor-toolbar-table-preview-hidden' ).html(); |
1641 | 1644 | $j( '.wikieditor-toolbar-table-preview-header' ).html( hiddenHTML ); |
1642 | 1645 | $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' ) |
1646 | 1648 | .filter( '.sortable' ) |
1647 | | - .get( 0 ) |
1648 | | - ); |
| 1649 | + .tablesorter(); |
| 1650 | + } |
1649 | 1651 | }); |
1650 | 1652 | |
1651 | 1653 | }, |
Index: trunk/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.config.js |
— | — | @@ -730,11 +730,14 @@ |
731 | 731 | <span rel="wikieditor-toolbar-tool-table-example"></span>\ |
732 | 732 | <div class="wikieditor-toolbar-table-preview-content">\ |
733 | 733 | <table id="wikieditor-toolbar-table-preview" class="wikieditor-toolbar-table-preview wikitable">\ |
| 734 | + <thead>\ |
734 | 735 | <tr class="wikieditor-toolbar-table-preview-header">\ |
735 | 736 | <th rel="wikieditor-toolbar-tool-table-example-header"></th>\ |
736 | 737 | <th rel="wikieditor-toolbar-tool-table-example-header"></th>\ |
737 | 738 | <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;">\ |
739 | 742 | <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\ |
740 | 743 | <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\ |
741 | 744 | <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\ |
— | — | @@ -751,6 +754,7 @@ |
752 | 755 | <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\ |
753 | 756 | <td rel="wikieditor-toolbar-tool-table-example-cell-text"></td>\ |
754 | 757 | </tr>\ |
| 758 | + </tbody>\ |
755 | 759 | </table>\ |
756 | 760 | </div>\ |
757 | 761 | </div></div>', |
— | — | @@ -769,15 +773,14 @@ |
770 | 774 | |
771 | 775 | // Hack for sortable preview: dynamically adding |
772 | 776 | // sortable class doesn't work, so we use a clone |
773 | | - // FIXME: Relies on sortable table internals |
774 | 777 | $( '#wikieditor-toolbar-table-preview' ) |
775 | 778 | .clone() |
776 | 779 | .attr( 'id', 'wikieditor-toolbar-table-preview2' ) |
777 | 780 | .addClass( 'sortable' ) |
778 | 781 | .insertAfter( $( '#wikieditor-toolbar-table-preview' ) ) |
779 | 782 | .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(); |
782 | 785 | $( '#wikieditor-toolbar-table-sortable' ).click( function() { |
783 | 786 | // Swap the currently shown one clone with the other one |
784 | 787 | $( '#wikieditor-toolbar-table-preview' ) |
— | — | @@ -797,12 +800,11 @@ |
798 | 801 | var hiddenHTML = $( '.wikieditor-toolbar-table-preview-hidden' ).html(); |
799 | 802 | $( '.wikieditor-toolbar-table-preview-header' ).html( hiddenHTML ); |
800 | 803 | $( '.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' ) |
804 | 806 | .filter( '.sortable' ) |
805 | | - .get( 0 ) |
806 | | - ); |
| 807 | + .tablesorter(); |
| 808 | + } |
807 | 809 | }); |
808 | 810 | }, |
809 | 811 | dialog: { |