|
Lines 731-736
function _dt_buttons(params){
Link Here
|
| 731 |
} |
731 |
} |
| 732 |
} |
732 |
} |
| 733 |
|
733 |
|
|
|
734 |
const export_format_print = { |
| 735 |
body: function (data, row, column, node) { |
| 736 |
const newnode = node.cloneNode(true); |
| 737 |
const no_export_nodes = newnode.querySelectorAll(".no-export"); |
| 738 |
no_export_nodes.forEach(child => { |
| 739 |
child.parentNode.removeChild(child); |
| 740 |
}); |
| 741 |
//Note: innerHTML is the same thing as the data variable, |
| 742 |
//minus the ".no-export" nodes that we've removed |
| 743 |
//Note: See dataTables.buttons.js for original function usage |
| 744 |
const str = DataTable.Buttons.stripData(newnode.innerHTML, { |
| 745 |
decodeEntities: false, |
| 746 |
stripHtml: true, |
| 747 |
stripNewlines: true, |
| 748 |
trim: true, |
| 749 |
}); |
| 750 |
return str; |
| 751 |
}, |
| 752 |
}; |
| 753 |
|
| 734 |
var export_format = { |
754 |
var export_format = { |
| 735 |
body: function ( data, row, column, node ) { |
755 |
body: function ( data, row, column, node ) { |
| 736 |
var newnode = $(node); |
756 |
var newnode = $(node); |
|
Lines 774-780
function _dt_buttons(params){
Link Here
|
| 774 |
text: __("Print"), |
794 |
text: __("Print"), |
| 775 |
exportOptions: { |
795 |
exportOptions: { |
| 776 |
columns: exportColumns, |
796 |
columns: exportColumns, |
| 777 |
format: export_format |
797 |
format: export_format_print, |
| 778 |
}, |
798 |
}, |
| 779 |
} |
799 |
} |
| 780 |
]; |
800 |
]; |
| 781 |
- |
|
|