mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°3914 Add row highlight colors to Datatables block when an object has a triggered tto/ttr
This commit is contained in:
@@ -165,6 +165,11 @@ var oTable{{ sListIfForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
|
||||
method: "post",
|
||||
pages: 1 // number of pages to cache
|
||||
}),
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if (data['@class'] !== undefined) {
|
||||
$(row).addClass(data['@class']);
|
||||
}
|
||||
},
|
||||
initComplete: function () {
|
||||
this.api().columns.adjust().draw();
|
||||
if (this.api().page.info().pages < 2)
|
||||
|
||||
@@ -31,7 +31,12 @@ var table{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
|
||||
} else {
|
||||
$(this).closest('.dataTables_wrapper').find('.dataTables_paginate, .dataTables_info').show();
|
||||
}
|
||||
}
|
||||
},
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if (data['@class'] !== undefined) {
|
||||
$(row).addClass(data['@class']);
|
||||
}
|
||||
},
|
||||
});
|
||||
if ($('#{{ oUIBlock.GetId() }}').find('thead').is(':visible')) {
|
||||
table{{ sListIDForVarSuffix }}.columns.adjust().draw();
|
||||
|
||||
Reference in New Issue
Block a user