Lines 774-789
function _dt_buttons(params){
Link Here
|
774 |
return buttons; |
774 |
return buttons; |
775 |
} |
775 |
} |
776 |
|
776 |
|
777 |
function _dt_visibility(node, table_settings, settings){ |
777 |
function _dt_visibility(table_settings, settings, node){ |
778 |
var counter = 0; |
778 |
var counter = 0; |
779 |
let hidden_ids = []; |
779 |
let hidden_ids = []; |
780 |
let included_ids = []; |
780 |
let included_ids = []; |
781 |
if ( table_settings ) { |
781 |
if ( table_settings ) { |
782 |
var columns_settings = table_settings['columns']; |
782 |
var columns_settings = table_settings['columns']; |
783 |
$(columns_settings).each( function() { |
783 |
$(columns_settings).each( function() { |
784 |
let selector = '#' + node.attr('id'); |
784 |
let used_id = counter; |
785 |
var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( selector + ' th' ); |
785 |
if ( settings.bKohaColumnsUseNames ) { |
786 |
var used_id = settings.bKohaColumnsUseNames ? named_id : counter; |
786 |
if (!node){ |
|
|
787 |
console.err("settings.bKohaColumnsUseNames is set but node not passed"); |
788 |
return; |
789 |
} |
790 |
let selector = '#' + node.attr('id'); |
791 |
var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( selector + ' th' ); |
792 |
used_id = named_id; |
793 |
} |
794 |
|
787 |
if ( used_id == -1 ) return; |
795 |
if ( used_id == -1 ) return; |
788 |
|
796 |
|
789 |
if ( this['is_hidden'] == "1" ) { |
797 |
if ( this['is_hidden'] == "1" ) { |
Lines 969-975
function _dt_add_delay(table_dt, table_node, delay_ms) {
Link Here
|
969 |
} |
977 |
} |
970 |
|
978 |
|
971 |
let hidden_ids, included_ids; |
979 |
let hidden_ids, included_ids; |
972 |
[hidden_ids, included_ids] = _dt_visibility(this, table_settings, settings) |
980 |
[hidden_ids, included_ids] = _dt_visibility(table_settings, settings, this) |
973 |
|
981 |
|
974 |
settings["buttons"] = _dt_buttons({included_ids, settings, table_settings}); |
982 |
settings["buttons"] = _dt_buttons({included_ids, settings, table_settings}); |
975 |
|
983 |
|
976 |
- |
|
|