|
Lines 122-127
Link Here
|
| 122 |
} |
122 |
} |
| 123 |
} |
123 |
} |
| 124 |
|
124 |
|
|
|
125 |
function update_columns_visibility(settings){ |
| 126 |
let table = settings.oInstance.api(); |
| 127 |
table.columns().visible(true); |
| 128 |
table.columns().every(function(i){ |
| 129 |
let is_empty = true; |
| 130 |
let nodes = this.nodes(); |
| 131 |
nodes.each((td, ii) => { |
| 132 |
if ( $(td).html() !== '' ) { |
| 133 |
is_empty = false; |
| 134 |
return; |
| 135 |
} |
| 136 |
}); |
| 137 |
if ( is_empty ) { |
| 138 |
table.columns(i).visible(false); |
| 139 |
} |
| 140 |
}); |
| 141 |
} |
| 142 |
|
| 143 |
|
| 125 |
$(document).ready(function() { |
144 |
$(document).ready(function() { |
| 126 |
|
145 |
|
| 127 |
$(".SelectAll").on("click",function(e){ |
146 |
$(".SelectAll").on("click",function(e){ |
|
Lines 781-800
Link Here
|
| 781 |
[% END %] |
800 |
[% END %] |
| 782 |
], |
801 |
], |
| 783 |
initComplete: function( settings, json ){ |
802 |
initComplete: function( settings, json ){ |
| 784 |
let table = settings.oInstance.api(); |
|
|
| 785 |
table.columns().every(function(i){ |
| 786 |
let is_empty = true; |
| 787 |
let nodes = this.nodes(); |
| 788 |
nodes.each((td, ii) => { |
| 789 |
if ( $(td).html() !== '' ) { |
| 790 |
is_empty = false; |
| 791 |
return; |
| 792 |
} |
| 793 |
}); |
| 794 |
if ( is_empty ) { |
| 795 |
table.columns(i).visible(false); |
| 796 |
} |
| 797 |
}); |
| 798 |
itemSelectionBuildActionLinks(tab_id); |
803 |
itemSelectionBuildActionLinks(tab_id); |
| 799 |
}, |
804 |
}, |
| 800 |
drawCallback: function(settings){ |
805 |
drawCallback: function(settings){ |
|
Lines 834-839
Link Here
|
| 834 |
}); |
839 |
}); |
| 835 |
[% END %] |
840 |
[% END %] |
| 836 |
|
841 |
|
|
|
842 |
update_columns_visibility(settings); |
| 843 |
|
| 837 |
if ( drawcallback ) { drawcallback(this); } |
844 |
if ( drawcallback ) { drawcallback(this); } |
| 838 |
}, |
845 |
}, |
| 839 |
...dt_options, |
846 |
...dt_options, |
| 840 |
- |
|
|