mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
N°3912 - Polishing: Export : fix date entry + size of datatable
This commit is contained in:
@@ -26,27 +26,43 @@ var table{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({
|
||||
{% endif %}
|
||||
drawCallback: function () {
|
||||
// Hiding pagination if only one page
|
||||
if ($(this).closest('.dataTables_wrapper').find('.dataTables_paginate:last .paginate_button:not(.previous):not(.next)').length < 2) {
|
||||
if ($(this).closest('.dataTables_wrapper').find('.dataTables_paginate:last .paginate_button:not(.previous):not(.next)').length < 2)
|
||||
{
|
||||
$(this).closest('.dataTables_wrapper').find('.dataTables_paginate, .dataTables_info').hide();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).closest('.dataTables_wrapper').find('.dataTables_paginate, .dataTables_info').show();
|
||||
}
|
||||
},
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if (data['@class'] !== undefined) {
|
||||
createdRow: function (row, data, dataIndex) {
|
||||
if (data['@class'] !== undefined)
|
||||
{
|
||||
$(row).addClass(data['@class']);
|
||||
}
|
||||
},
|
||||
});
|
||||
if ($('#{{ oUIBlock.GetId() }}').find('thead').is(':visible')) {
|
||||
|
||||
{% if (oUIBlock.GetOption('bFullscreen')) %}
|
||||
var myheight = $("#ibo-main-content").height()-$("#ibo-main-content")[0].scrollHeight+$("#{{ oUIBlock.GetId() }}").height();
|
||||
if (myheight < 200)
|
||||
{
|
||||
myheight = 200;
|
||||
};
|
||||
$("#{{ oUIBlock.GetId() }}_wrapper").find(".dataTables_scrollBody").height(myheight);
|
||||
{% endif %}
|
||||
|
||||
if ($('#{{ oUIBlock.GetId() }}').find('thead').is(':visible'))
|
||||
{
|
||||
table{{ sListIDForVarSuffix }}.columns.adjust().draw();
|
||||
}
|
||||
|
||||
if(window.ResizeObserver){
|
||||
if (window.ResizeObserver)
|
||||
{
|
||||
let oFromTable{{ sListIDForVarSuffix }}ResizeTimeout = null;
|
||||
const oFromTable{{ sListIDForVarSuffix }}Resize = new ResizeObserver(function(){
|
||||
const oFromTable{{ sListIDForVarSuffix }}Resize = new ResizeObserver(function () {
|
||||
clearTimeout(oFromTable{{ sListIDForVarSuffix }}ResizeTimeout);
|
||||
oFromTable{{ sListIDForVarSuffix }}ResizeTimeout = setTimeout(function(){
|
||||
oFromTable{{ sListIDForVarSuffix }}ResizeTimeout = setTimeout(function () {
|
||||
$('#{{ oUIBlock.GetId() }}').DataTable().columns.adjust();
|
||||
}, 120);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user