mirror of
https://github.com/redmine/redmine.git
synced 2026-07-07 15:52:31 +02:00
Table column sorting (#1718).
Patch by Takenori TAKAKI. git-svn-id: http://svn.redmine.org/redmine/trunk@19833 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -969,6 +969,7 @@ $(document).ready(function(){
|
||||
data: "text=" + element + '&' + attachments,
|
||||
success: function(data){
|
||||
jstBlock.find('.wiki-preview').html(data);
|
||||
setupWikiTableSortableHeader();
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1010,6 +1011,17 @@ function setupAttachmentDetail() {
|
||||
$(window).resize(setFilecontentContainerHeight);
|
||||
}
|
||||
|
||||
function setupWikiTableSortableHeader() {
|
||||
$('div.wiki table').each(function(i, table){
|
||||
if (table.rows.length < 3) return true;
|
||||
var tr = $(table.rows).first();
|
||||
if (tr.find("TH").length > 0) {
|
||||
tr.attr('data-sort-method', 'none');
|
||||
tr.find("TD").attr('data-sort-method', 'none');
|
||||
new Tablesort(table);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$('[title]').tooltip({
|
||||
@@ -1080,6 +1092,7 @@ $(document).ready(defaultFocus);
|
||||
$(document).ready(setupAttachmentDetail);
|
||||
$(document).ready(setupTabs);
|
||||
$(document).ready(setupFilePreviewNavigation);
|
||||
$(document).ready(setupWikiTableSortableHeader);
|
||||
$(document).on('focus', '[data-auto-complete=true]', function(event) {
|
||||
inlineAutoComplete(event.target);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user