datatables.net-buttons-bs5
Version:
Buttons for DataTables with styling for [Bootstrap5](https://getbootstrap.com/)
4 lines • 1.67 kB
JavaScript
/*! Bootstrap integration for DataTables' Buttons
* © SpryMedia Ltd - datatables.net/license
*/
(e=>{var o,a;"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs5","datatables.net-buttons"],function(t){return e(t,window,document)}):"object"==typeof exports?(o=require("jquery"),a=function(t,n){n.fn.dataTable||require("datatables.net-bs5")(t,n),n.fn.dataTable.Buttons||require("datatables.net-buttons")(t,n)},"undefined"==typeof window?module.exports=function(t,n){return t=t||window,n=n||o(t),a(t,n),e(n,0,t.document)}:(a(window,o),module.exports=e(o,window,window.document))):e(jQuery,window,document)})(function(e,t,n){var o=e.fn.dataTable;return e.extend(!0,o.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group flex-wrap"},button:{className:"btn btn-secondary",active:"active",dropHtml:"",dropClass:"dropdown-toggle"},collection:{container:{tag:"div",className:"dt-button-collection",content:{tag:"ul",className:"dropdown-menu show"}},closeButton:!1,button:{tag:"li",className:"dt-button",active:"dt-button-active-a",disabled:"disabled",liner:{tag:"a",className:"dropdown-item"},spacer:{className:"divider",tag:"li"}}},split:{action:{tag:"a",className:"btn btn-secondary dt-button-split-drop-button",closeButton:!1},dropdown:{tag:"button",className:"btn btn-secondary dt-button-split-drop dropdown-toggle-split",closeButton:!1,align:"split-left",splitAlignClass:"dt-button-split-left"},wrapper:{tag:"div",className:"dt-button-split btn-group",closeButton:!1}}},buttonCreated:function(t,n){return t.buttons?e('<div class="btn-group"/>').append(n):n}}),o.ext.buttons.collection.rightAlignClassName="dropdown-menu-right",o});