プロジェクト

全般

プロフィール

Feature #1294

未完了

Do not add sort on certain tables

Marc Elbichon さんが10年以上前に追加.

ステータス:
新規(New)
優先度:
通常(Normal)
担当者:
-
対象バージョン:
-
開始日:
2013/11/08
期日:
進捗率:

0%

予定工数:

説明

Sorry, this is a duplicate for #1293 but for the good project !

The automatic sorting of tables breaks table when rowspan is used in header.
I think adding this option on all tables is bad. Best is to select table to sort.
To do this, tables to be sorted could have a sortable class, so wiki_extensions.js should be

function wiki_extension_create_table_header() {
    var tbodys = $('.wiki table.sortable tbody');
    for (var i = 0; i < tbodys.length; i++) {
        var tbody = tbodys[i];
        if (!is_table_for_sort(tbody)) {
            continue;
        }
        var table = tbody.parentNode;
        var header = tbody.removeChild(tbody.firstChild);
        var thead = table.insertBefore(document.createElement('thead'), tbody);
        thead.appendChild(header);

    }

    $('table.sortable').each(function(i) {
        $(this).tablesorter();
    });

}


To sort a table, just do :
table(sortable)
|_. Header |_. Header |
...

表示するデータがありません

他の形式にエクスポート: Atom PDF