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 780-799
Link Here
|
780 |
[% END %] |
799 |
[% END %] |
781 |
], |
800 |
], |
782 |
initComplete: function( settings, json ){ |
801 |
initComplete: function( settings, json ){ |
783 |
let table = settings.oInstance.api(); |
|
|
784 |
table.columns().every(function(i){ |
785 |
let is_empty = true; |
786 |
let nodes = this.nodes(); |
787 |
nodes.each((td, ii) => { |
788 |
if ( $(td).html() !== '' ) { |
789 |
is_empty = false; |
790 |
return; |
791 |
} |
792 |
}); |
793 |
if ( is_empty ) { |
794 |
table.columns(i).visible(false); |
795 |
} |
796 |
}); |
797 |
itemSelectionBuildActionLinks(tab_id); |
802 |
itemSelectionBuildActionLinks(tab_id); |
798 |
}, |
803 |
}, |
799 |
drawCallback: function(settings){ |
804 |
drawCallback: function(settings){ |
Lines 833-838
Link Here
|
833 |
}); |
838 |
}); |
834 |
[% END %] |
839 |
[% END %] |
835 |
|
840 |
|
|
|
841 |
update_columns_visibility(settings); |
842 |
|
836 |
if ( drawcallback ) { drawcallback(this); } |
843 |
if ( drawcallback ) { drawcallback(this); } |
837 |
}, |
844 |
}, |
838 |
...dt_options, |
845 |
...dt_options, |
839 |
- |
|
|