Lines 668-679
function _dt_buttons(params){
Link Here
|
668 |
// But ideally should be retrieved using table.data() |
668 |
// But ideally should be retrieved using table.data() |
669 |
let use_names = settings.bKohaColumnsUseNames; |
669 |
let use_names = settings.bKohaColumnsUseNames; |
670 |
let included_columns = []; |
670 |
let included_columns = []; |
671 |
if ( use_names ) { |
671 |
if (table_settings) { |
672 |
// bKohaColumnsUseNames is set, identify columns by their data-colname |
672 |
if (use_names) { |
673 |
included_columns = table_settings.columns.filter(c => !c.cannot_be_toggled).map(c => "[data-colname='%s']".format(c.columnname)).join(','); |
673 |
// bKohaColumnsUseNames is set, identify columns by their data-colname |
674 |
} else { |
674 |
included_columns = table_settings.columns |
675 |
// Not set, columns are ordered the same than in the columns settings |
675 |
.filter(c => !c.cannot_be_toggled) |
676 |
included_columns = table_settings.columns.map((c, i) => !c.cannot_be_toggled ? i : null).filter(i => i !== null); |
676 |
.map(c => "[data-colname='%s']".format(c.columnname)) |
|
|
677 |
.join(","); |
678 |
} else { |
679 |
// Not set, columns are ordered the same than in the columns settings |
680 |
included_columns = table_settings.columns |
681 |
.map((c, i) => (!c.cannot_be_toggled ? i : null)) |
682 |
.filter(i => i !== null); |
683 |
} |
677 |
} |
684 |
} |
678 |
if( included_columns.length > 0 ){ |
685 |
if( included_columns.length > 0 ){ |
679 |
buttons.push( |
686 |
buttons.push( |
680 |
- |
|
|