Lines 780-795
function _dt_buttons(params){
Link Here
|
780 |
return buttons; |
780 |
return buttons; |
781 |
} |
781 |
} |
782 |
|
782 |
|
783 |
function _dt_visibility(node, table_settings, settings){ |
783 |
function _dt_visibility(table_settings, settings, node){ |
784 |
var counter = 0; |
784 |
var counter = 0; |
785 |
let hidden_ids = []; |
785 |
let hidden_ids = []; |
786 |
let included_ids = []; |
786 |
let included_ids = []; |
787 |
if ( table_settings ) { |
787 |
if ( table_settings ) { |
788 |
var columns_settings = table_settings['columns']; |
788 |
var columns_settings = table_settings['columns']; |
789 |
$(columns_settings).each( function() { |
789 |
$(columns_settings).each( function() { |
790 |
let selector = '#' + node.attr('id'); |
790 |
let used_id = counter; |
791 |
var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( selector + ' th' ); |
791 |
if ( settings.bKohaColumnsUseNames ) { |
792 |
var used_id = settings.bKohaColumnsUseNames ? named_id : counter; |
792 |
if (!node){ |
|
|
793 |
console.err("settings.bKohaColumnsUseNames is set but node not passed"); |
794 |
return; |
795 |
} |
796 |
let selector = '#' + node.attr('id'); |
797 |
var named_id = $( 'thead th[data-colname="' + this.columnname + '"]', selector ).index( selector + ' th' ); |
798 |
used_id = named_id; |
799 |
} |
800 |
|
793 |
if ( used_id == -1 ) return; |
801 |
if ( used_id == -1 ) return; |
794 |
|
802 |
|
795 |
if ( this['is_hidden'] == "1" ) { |
803 |
if ( this['is_hidden'] == "1" ) { |
Lines 975-981
function _dt_add_delay(table_dt, table_node, delay_ms) {
Link Here
|
975 |
} |
983 |
} |
976 |
|
984 |
|
977 |
let hidden_ids, included_ids; |
985 |
let hidden_ids, included_ids; |
978 |
[hidden_ids, included_ids] = _dt_visibility(this, table_settings, settings) |
986 |
[hidden_ids, included_ids] = _dt_visibility(table_settings, settings, this) |
979 |
|
987 |
|
980 |
settings["buttons"] = _dt_buttons({included_ids, settings, table_settings}); |
988 |
settings["buttons"] = _dt_buttons({included_ids, settings, table_settings}); |
981 |
|
989 |
|
982 |
- |
|
|