|
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 769-788
Link Here
|
| 769 |
[% END %] |
788 |
[% END %] |
| 770 |
], |
789 |
], |
| 771 |
initComplete: function( settings, json ){ |
790 |
initComplete: function( settings, json ){ |
| 772 |
let table = settings.oInstance.api(); |
|
|
| 773 |
table.columns().every(function(i){ |
| 774 |
let is_empty = true; |
| 775 |
let nodes = this.nodes(); |
| 776 |
nodes.each((td, ii) => { |
| 777 |
if ( $(td).html() !== '' ) { |
| 778 |
is_empty = false; |
| 779 |
return; |
| 780 |
} |
| 781 |
}); |
| 782 |
if ( is_empty ) { |
| 783 |
table.columns(i).visible(false); |
| 784 |
} |
| 785 |
}); |
| 786 |
itemSelectionBuildActionLinks(tab_id); |
791 |
itemSelectionBuildActionLinks(tab_id); |
| 787 |
}, |
792 |
}, |
| 788 |
drawCallback: function(settings){ |
793 |
drawCallback: function(settings){ |
|
Lines 822-827
Link Here
|
| 822 |
}); |
827 |
}); |
| 823 |
[% END %] |
828 |
[% END %] |
| 824 |
|
829 |
|
|
|
830 |
update_columns_visibility(settings); |
| 831 |
|
| 825 |
if ( drawcallback ) { drawcallback(this); } |
832 |
if ( drawcallback ) { drawcallback(this); } |
| 826 |
}, |
833 |
}, |
| 827 |
...dt_options, |
834 |
...dt_options, |
| 828 |
- |
|
|