From 077588fe3733341067c60e9ec64c106392a4a14c Mon Sep 17 00:00:00 2001 From: dtbuild Date: Thu, 10 Oct 2024 16:50:43 +0000 Subject: [PATCH] 7099db386b1f372bd2fc6db24739dcf34ec9f802 WIP: Improvements to dropdown icon to allow any button to have one Sync to source repo @7099db386b1f372bd2fc6db24739dcf34ec9f802 --- css/buttons.bootstrap.css | 5 +++++ css/buttons.bootstrap.min.css | 2 +- datatables.json | 2 +- js/buttons.bootstrap.js | 10 ++++------ js/buttons.bootstrap.min.js | 2 +- js/buttons.bootstrap.min.mjs | 2 +- js/buttons.bootstrap.mjs | 10 ++++------ 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/css/buttons.bootstrap.css b/css/buttons.bootstrap.css index da13ce7..1e7cf3e 100644 --- a/css/buttons.bootstrap.css +++ b/css/buttons.bootstrap.css @@ -205,6 +205,11 @@ div.dt-buttons div.dt-button-collection .dropdown-menu { div.dt-buttons div.dt-button-collection .dropdown-menu li { position: relative; } +div.dt-buttons div.dt-button-collection .dropdown-menu li span.caret { + position: absolute; + right: 9px; + top: 14px; +} div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split { display: flex; flex-direction: row; diff --git a/css/buttons.bootstrap.min.css b/css/buttons.bootstrap.min.css index 793fff0..3748c07 100644 --- a/css/buttons.bootstrap.min.css +++ b/css/buttons.bootstrap.min.css @@ -1 +1 @@ -@keyframes dtb-spinner{100%{transform:rotate(360deg)}}@-o-keyframes dtb-spinner{100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@-ms-keyframes dtb-spinner{100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dtb-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes dtb-spinner{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}div.dataTables_wrapper{position:relative}div.dt-buttons{position:initial}div.dt-buttons .dt-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border-radius:.75em;box-shadow:3px 4px 10px 1px rgba(0, 0, 0, 0.8);text-align:center;z-index:2003;overflow:hidden}div.dt-button-info h2{padding:2rem 2rem 1rem 2rem;margin:0;font-weight:normal}div.dt-button-info>div{padding:1em 2em 2em 2em}div.dtb-popover-close{position:absolute;top:6px;right:6px;width:22px;height:22px;text-align:center;border-radius:3px;cursor:pointer;z-index:2003}button.dtb-hide-drop{display:none !important}div.dt-button-collection-title{text-align:center;padding:.3em .5em .5em;margin-left:.5em;margin-right:.5em;font-size:.9em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}div.dt-button-collection-title:empty{display:none}span.dt-button-spacer{display:inline-block;margin:.5em;white-space:nowrap}span.dt-button-spacer.bar{border-left:1px solid rgba(0, 0, 0, 0.3);vertical-align:middle;padding-left:.5em}span.dt-button-spacer.bar:empty{height:1em;width:1px;padding-left:0}div.dt-button-collection .dt-button-active{padding-right:3em}div.dt-button-collection .dt-button-active:after{position:absolute;top:50%;margin-top:-10px;right:1em;display:inline-block;content:"✓";color:inherit}div.dt-button-collection .dt-button-active.dt-button-split{padding-right:0}div.dt-button-collection .dt-button-active.dt-button-split:after{display:none}div.dt-button-collection .dt-button-active.dt-button-split>*:first-child{padding-right:3em}div.dt-button-collection .dt-button-active.dt-button-split>*:first-child:after{position:absolute;top:50%;margin-top:-10px;right:1em;display:inline-block;content:"✓";color:inherit}div.dt-button-collection .dt-button-active-a a{padding-right:3em}div.dt-button-collection .dt-button-active-a a:after{position:absolute;right:1em;display:inline-block;content:"✓";color:inherit}div.dt-button-collection span.dt-button-spacer{width:100%;font-size:.9em;text-align:center;margin:.5em 0}div.dt-button-collection span.dt-button-spacer:empty{height:0;width:100%}div.dt-button-collection span.dt-button-spacer.bar{border-left:none;border-bottom:1px solid rgba(0, 0, 0, 0.1);padding-left:0}@media print{table.dataTable tr>*{box-shadow:none !important}}html.dark div.dt-button-info{background-color:var(--dt-html-background);border:1px solid rgba(255, 255, 255, 0.15)}div.dt-buttons div.btn-group{position:initial}div.dt-buttons div.dt-button-collection{position:absolute;min-width:200px;margin-top:3px;z-index:2002;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:4px;box-shadow:0 6px 12px rgba(0, 0, 0, 0.175)}div.dt-buttons div.dt-button-collection div.dt-button-collection-title{padding:.75em 0 .25em}div.dt-buttons div.dt-button-collection .dropdown-menu{position:relative;margin-top:4px;display:block;width:100%;background-color:transparent;border:none;border-radius:0;box-shadow:none}div.dt-buttons div.dt-button-collection .dropdown-menu li{position:relative}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:stretch}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split>*:first-child{min-width:auto;flex:1 0 50px;padding:3px 5px 3px 20px}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split>*:first-child a{color:#333;text-decoration:none}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split>*:first-child:hover{color:#262626;background-color:#f5f5f5}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split button:last-child{min-width:33px;flex:0;background:transparent;border:none;line-height:1rem;color:rgb(33, 37, 41);padding:0 16px;overflow:visible}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split button:last-child:hover{color:#16181b;background-color:#f8f9fa}div.dt-buttons div.dt-button-collection.fixed{position:fixed;display:block;top:50%;left:50%;margin-left:-75px;border-radius:5px;background-color:white;padding:.5em}div.dt-buttons div.dt-button-collection.fixed.two-column{margin-left:-200px}div.dt-buttons div.dt-button-collection.fixed.three-column{margin-left:-225px}div.dt-buttons div.dt-button-collection.fixed.four-column{margin-left:-300px}div.dt-buttons div.dt-button-collection.fixed.columns{margin-left:-409px}@media screen and (max-width: 1024px){div.dt-buttons div.dt-button-collection.fixed.columns{margin-left:-308px}}@media screen and (max-width: 640px){div.dt-buttons div.dt-button-collection.fixed.columns{margin-left:-203px}}@media screen and (max-width: 460px){div.dt-buttons div.dt-button-collection.fixed.columns{margin-left:-100px}}div.dt-buttons div.dt-button-collection.fixed>:last-child{max-height:100vh;overflow:auto}div.dt-buttons div.dt-button-collection.two-column>:last-child,div.dt-buttons div.dt-button-collection.three-column>:last-child,div.dt-buttons div.dt-button-collection.four-column>:last-child{display:block !important;column-gap:8px}div.dt-buttons div.dt-button-collection.two-column>:last-child>*,div.dt-buttons div.dt-button-collection.three-column>:last-child>*,div.dt-buttons div.dt-button-collection.four-column>:last-child>*{-webkit-column-break-inside:avoid;break-inside:avoid}div.dt-buttons div.dt-button-collection.two-column{width:400px}div.dt-buttons div.dt-button-collection.two-column>:last-child{padding-bottom:1px;column-count:2}div.dt-buttons div.dt-button-collection.three-column{width:450px}div.dt-buttons div.dt-button-collection.three-column>:last-child{padding-bottom:1px;column-count:3}div.dt-buttons div.dt-button-collection.four-column{width:600px}div.dt-buttons div.dt-button-collection.four-column>:last-child{padding-bottom:1px;column-count:4}div.dt-buttons div.dt-button-collection .dt-button{border-radius:0}div.dt-buttons div.dt-button-collection.columns{width:auto}div.dt-buttons div.dt-button-collection.columns>:last-child{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:6px;width:818px;padding-bottom:1px}div.dt-buttons div.dt-button-collection.columns>:last-child .dt-button{min-width:200px;flex:0 1;margin:0}div.dt-buttons div.dt-button-collection.columns.dtb-b3>:last-child,div.dt-buttons div.dt-button-collection.columns.dtb-b2>:last-child,div.dt-buttons div.dt-button-collection.columns.dtb-b1>:last-child{justify-content:space-between}div.dt-buttons div.dt-button-collection.columns.dtb-b3 .dt-button{flex:1 1 32%}div.dt-buttons div.dt-button-collection.columns.dtb-b2 .dt-button{flex:1 1 48%}div.dt-buttons div.dt-button-collection.columns.dtb-b1 .dt-button{flex:1 1 100%}@media screen and (max-width: 1024px){div.dt-buttons div.dt-button-collection.columns>:last-child{width:612px}}@media screen and (max-width: 640px){div.dt-buttons div.dt-button-collection.columns>:last-child{width:406px}div.dt-buttons div.dt-button-collection.columns.dtb-b3 .dt-button{flex:0 1 32%}}@media screen and (max-width: 460px){div.dt-buttons div.dt-button-collection.columns>:last-child{width:200px}}div.dt-buttons span.caret{margin-left:.5em}div.dt-buttons span.dt-button-spacer{float:left;font-size:1rem;padding-top:4px}div.dt-buttons span.dt-button-spacer.empty{margin:2px}div.dt-buttons span.dt-button-spacer.bar:empty{height:inherit}div.dt-buttons .btn.processing{color:rgba(0, 0, 0, 0.2)}div.dt-buttons .btn.processing:after{position:absolute;top:50%;left:50%;width:16px;height:16px;margin:-8px 0 0 -8px;box-sizing:border-box;display:block;content:" ";border:2px solid rgb(40, 40, 40);border-radius:50%;border-left-color:transparent;border-right-color:transparent;animation:dtb-spinner 1500ms infinite linear;-o-animation:dtb-spinner 1500ms infinite linear;-ms-animation:dtb-spinner 1500ms infinite linear;-webkit-animation:dtb-spinner 1500ms infinite linear;-moz-animation:dtb-spinner 1500ms infinite linear}div.dt-buttons div.dt-button-split button:last-child span{margin-left:0 !important;overflow:visible}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999}@media screen and (max-width: 767px){div.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:.5em}div.dt-buttons a.btn{float:none}} +@keyframes dtb-spinner{100%{transform:rotate(360deg)}}@-o-keyframes dtb-spinner{100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@-ms-keyframes dtb-spinner{100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dtb-spinner{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes dtb-spinner{100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}div.dataTables_wrapper{position:relative}div.dt-buttons{position:initial}div.dt-buttons .dt-button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}div.dt-button-info{position:fixed;top:50%;left:50%;width:400px;margin-top:-100px;margin-left:-200px;background-color:white;border-radius:.75em;box-shadow:3px 4px 10px 1px rgba(0, 0, 0, 0.8);text-align:center;z-index:2003;overflow:hidden}div.dt-button-info h2{padding:2rem 2rem 1rem 2rem;margin:0;font-weight:normal}div.dt-button-info>div{padding:1em 2em 2em 2em}div.dtb-popover-close{position:absolute;top:6px;right:6px;width:22px;height:22px;text-align:center;border-radius:3px;cursor:pointer;z-index:2003}button.dtb-hide-drop{display:none !important}div.dt-button-collection-title{text-align:center;padding:.3em .5em .5em;margin-left:.5em;margin-right:.5em;font-size:.9em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}div.dt-button-collection-title:empty{display:none}span.dt-button-spacer{display:inline-block;margin:.5em;white-space:nowrap}span.dt-button-spacer.bar{border-left:1px solid rgba(0, 0, 0, 0.3);vertical-align:middle;padding-left:.5em}span.dt-button-spacer.bar:empty{height:1em;width:1px;padding-left:0}div.dt-button-collection .dt-button-active{padding-right:3em}div.dt-button-collection .dt-button-active:after{position:absolute;top:50%;margin-top:-10px;right:1em;display:inline-block;content:"✓";color:inherit}div.dt-button-collection .dt-button-active.dt-button-split{padding-right:0}div.dt-button-collection .dt-button-active.dt-button-split:after{display:none}div.dt-button-collection .dt-button-active.dt-button-split>*:first-child{padding-right:3em}div.dt-button-collection .dt-button-active.dt-button-split>*:first-child:after{position:absolute;top:50%;margin-top:-10px;right:1em;display:inline-block;content:"✓";color:inherit}div.dt-button-collection .dt-button-active-a a{padding-right:3em}div.dt-button-collection .dt-button-active-a a:after{position:absolute;right:1em;display:inline-block;content:"✓";color:inherit}div.dt-button-collection span.dt-button-spacer{width:100%;font-size:.9em;text-align:center;margin:.5em 0}div.dt-button-collection span.dt-button-spacer:empty{height:0;width:100%}div.dt-button-collection span.dt-button-spacer.bar{border-left:none;border-bottom:1px solid rgba(0, 0, 0, 0.1);padding-left:0}@media print{table.dataTable tr>*{box-shadow:none !important}}html.dark div.dt-button-info{background-color:var(--dt-html-background);border:1px solid rgba(255, 255, 255, 0.15)}div.dt-buttons div.btn-group{position:initial}div.dt-buttons div.dt-button-collection{position:absolute;min-width:200px;margin-top:3px;z-index:2002;background-color:#fff;border:1px solid rgba(0, 0, 0, 0.15);border-radius:4px;box-shadow:0 6px 12px rgba(0, 0, 0, 0.175)}div.dt-buttons div.dt-button-collection div.dt-button-collection-title{padding:.75em 0 .25em}div.dt-buttons div.dt-button-collection .dropdown-menu{position:relative;margin-top:4px;display:block;width:100%;background-color:transparent;border:none;border-radius:0;box-shadow:none}div.dt-buttons div.dt-button-collection .dropdown-menu li{position:relative}div.dt-buttons div.dt-button-collection .dropdown-menu li span.caret{position:absolute;right:9px;top:14px}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:stretch}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split>*:first-child{min-width:auto;flex:1 0 50px;padding:3px 5px 3px 20px}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split>*:first-child a{color:#333;text-decoration:none}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split>*:first-child:hover{color:#262626;background-color:#f5f5f5}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split button:last-child{min-width:33px;flex:0;background:transparent;border:none;line-height:1rem;color:rgb(33, 37, 41);padding:0 16px;overflow:visible}div.dt-buttons div.dt-button-collection .dropdown-menu div.dt-button-split button:last-child:hover{color:#16181b;background-color:#f8f9fa}div.dt-buttons div.dt-button-collection.fixed{position:fixed;display:block;top:50%;left:50%;margin-left:-75px;border-radius:5px;background-color:white;padding:.5em}div.dt-buttons div.dt-button-collection.fixed.two-column{margin-left:-200px}div.dt-buttons div.dt-button-collection.fixed.three-column{margin-left:-225px}div.dt-buttons div.dt-button-collection.fixed.four-column{margin-left:-300px}div.dt-buttons div.dt-button-collection.fixed.columns{margin-left:-409px}@media screen and (max-width: 1024px){div.dt-buttons div.dt-button-collection.fixed.columns{margin-left:-308px}}@media screen and (max-width: 640px){div.dt-buttons div.dt-button-collection.fixed.columns{margin-left:-203px}}@media screen and (max-width: 460px){div.dt-buttons div.dt-button-collection.fixed.columns{margin-left:-100px}}div.dt-buttons div.dt-button-collection.fixed>:last-child{max-height:100vh;overflow:auto}div.dt-buttons div.dt-button-collection.two-column>:last-child,div.dt-buttons div.dt-button-collection.three-column>:last-child,div.dt-buttons div.dt-button-collection.four-column>:last-child{display:block !important;column-gap:8px}div.dt-buttons div.dt-button-collection.two-column>:last-child>*,div.dt-buttons div.dt-button-collection.three-column>:last-child>*,div.dt-buttons div.dt-button-collection.four-column>:last-child>*{-webkit-column-break-inside:avoid;break-inside:avoid}div.dt-buttons div.dt-button-collection.two-column{width:400px}div.dt-buttons div.dt-button-collection.two-column>:last-child{padding-bottom:1px;column-count:2}div.dt-buttons div.dt-button-collection.three-column{width:450px}div.dt-buttons div.dt-button-collection.three-column>:last-child{padding-bottom:1px;column-count:3}div.dt-buttons div.dt-button-collection.four-column{width:600px}div.dt-buttons div.dt-button-collection.four-column>:last-child{padding-bottom:1px;column-count:4}div.dt-buttons div.dt-button-collection .dt-button{border-radius:0}div.dt-buttons div.dt-button-collection.columns{width:auto}div.dt-buttons div.dt-button-collection.columns>:last-child{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:6px;width:818px;padding-bottom:1px}div.dt-buttons div.dt-button-collection.columns>:last-child .dt-button{min-width:200px;flex:0 1;margin:0}div.dt-buttons div.dt-button-collection.columns.dtb-b3>:last-child,div.dt-buttons div.dt-button-collection.columns.dtb-b2>:last-child,div.dt-buttons div.dt-button-collection.columns.dtb-b1>:last-child{justify-content:space-between}div.dt-buttons div.dt-button-collection.columns.dtb-b3 .dt-button{flex:1 1 32%}div.dt-buttons div.dt-button-collection.columns.dtb-b2 .dt-button{flex:1 1 48%}div.dt-buttons div.dt-button-collection.columns.dtb-b1 .dt-button{flex:1 1 100%}@media screen and (max-width: 1024px){div.dt-buttons div.dt-button-collection.columns>:last-child{width:612px}}@media screen and (max-width: 640px){div.dt-buttons div.dt-button-collection.columns>:last-child{width:406px}div.dt-buttons div.dt-button-collection.columns.dtb-b3 .dt-button{flex:0 1 32%}}@media screen and (max-width: 460px){div.dt-buttons div.dt-button-collection.columns>:last-child{width:200px}}div.dt-buttons span.caret{margin-left:.5em}div.dt-buttons span.dt-button-spacer{float:left;font-size:1rem;padding-top:4px}div.dt-buttons span.dt-button-spacer.empty{margin:2px}div.dt-buttons span.dt-button-spacer.bar:empty{height:inherit}div.dt-buttons .btn.processing{color:rgba(0, 0, 0, 0.2)}div.dt-buttons .btn.processing:after{position:absolute;top:50%;left:50%;width:16px;height:16px;margin:-8px 0 0 -8px;box-sizing:border-box;display:block;content:" ";border:2px solid rgb(40, 40, 40);border-radius:50%;border-left-color:transparent;border-right-color:transparent;animation:dtb-spinner 1500ms infinite linear;-o-animation:dtb-spinner 1500ms infinite linear;-ms-animation:dtb-spinner 1500ms infinite linear;-webkit-animation:dtb-spinner 1500ms infinite linear;-moz-animation:dtb-spinner 1500ms infinite linear}div.dt-buttons div.dt-button-split button:last-child span{margin-left:0 !important;overflow:visible}div.dt-button-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999}@media screen and (max-width: 767px){div.dt-buttons{float:none;width:100%;text-align:center;margin-bottom:.5em}div.dt-buttons a.btn{float:none}} diff --git a/datatables.json b/datatables.json index bd90ce3..b15e88f 100644 --- a/datatables.json +++ b/datatables.json @@ -14,5 +14,5 @@ ], "src-repo": "http://github.com/DataTables/Buttons", "last-tag": "3.1.2", - "last-sync": "70c236b07d2fb7c41887b178e59c10c3258fe9ab" + "last-sync": "7099db386b1f372bd2fc6db24739dcf34ec9f802" } \ No newline at end of file diff --git a/js/buttons.bootstrap.js b/js/buttons.bootstrap.js index 17da74e..f4ed198 100644 --- a/js/buttons.bootstrap.js +++ b/js/buttons.bootstrap.js @@ -60,12 +60,11 @@ $.extend(true, DataTable.Buttons.defaults, { }, button: { className: 'btn btn-default', - active: 'active' + active: 'active', + dropHtml: '', + dropClass: '' }, collection: { - action: { - dropHtml: '' - }, container: { tag: 'div', className: 'dt-button-collection', @@ -97,9 +96,8 @@ $.extend(true, DataTable.Buttons.defaults, { }, dropdown: { tag: 'button', - dropHtml: '', className: - 'btn btn-default dt-button-split-drop dropdown-toggle dropdown-toggle-split', + 'btn btn-default dt-button-split-drop dropdown-toggle-split', closeButton: false, align: 'split-left', splitAlignClass: 'dt-button-split-left' diff --git a/js/buttons.bootstrap.min.js b/js/buttons.bootstrap.min.js index 36ec34c..07ba649 100644 --- a/js/buttons.bootstrap.min.js +++ b/js/buttons.bootstrap.min.js @@ -1,4 +1,4 @@ /*! Bootstrap integration for DataTables' Buttons * © SpryMedia Ltd - datatables.net/license */ -!function(e){var a,o;"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs","datatables.net-buttons"],function(t){return e(t,window,document)}):"object"==typeof exports?(a=require("jquery"),o=function(t,n){n.fn.dataTable||require("datatables.net-bs")(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||a(t),o(t,n),e(n,0,t.document)}:(o(window,a),module.exports=e(a,window,window.document))):e(jQuery,window,document)}(function(t,n,e){"use strict";var a=t.fn.dataTable;return t.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group flex-wrap"},button:{className:"btn btn-default",active:"active"},collection:{action:{dropHtml:''},container:{tag:"div",className:"dt-button-collection",content:{tag:"ul",className:"dropdown-menu"}},closeButton:!1,button:{tag:"li",className:"dt-button",active:"dt-button-active-a",disabled:"disabled",liner:{tag:"a"},spacer:{className:"divider",tag:"li"}}},split:{action:{tag:"a",className:"btn btn-default dt-button-split-drop-button",closeButton:!1},dropdown:{tag:"button",dropHtml:'',className:"btn btn-default dt-button-split-drop dropdown-toggle dropdown-toggle-split",closeButton:!1,align:"split-left",splitAlignClass:"dt-button-split-left"},wrapper:{tag:"div",className:"dt-button-split btn-group",closeButton:!1}}}}),a}); \ No newline at end of file +!function(n){var a,o;"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs","datatables.net-buttons"],function(t){return n(t,window,document)}):"object"==typeof exports?(a=require("jquery"),o=function(t,e){e.fn.dataTable||require("datatables.net-bs")(t,e),e.fn.dataTable.Buttons||require("datatables.net-buttons")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||a(t),o(t,e),n(e,0,t.document)}:(o(window,a),module.exports=n(a,window,window.document))):n(jQuery,window,document)}(function(t,e,n){"use strict";var a=t.fn.dataTable;return t.extend(!0,a.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group flex-wrap"},button:{className:"btn btn-default",active:"active",dropHtml:'',dropClass:""},collection:{container:{tag:"div",className:"dt-button-collection",content:{tag:"ul",className:"dropdown-menu"}},closeButton:!1,button:{tag:"li",className:"dt-button",active:"dt-button-active-a",disabled:"disabled",liner:{tag:"a"},spacer:{className:"divider",tag:"li"}}},split:{action:{tag:"a",className:"btn btn-default dt-button-split-drop-button",closeButton:!1},dropdown:{tag:"button",className:"btn btn-default 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}}}}),a}); \ No newline at end of file diff --git a/js/buttons.bootstrap.min.mjs b/js/buttons.bootstrap.min.mjs index 1f416c9..4f91baf 100644 --- a/js/buttons.bootstrap.min.mjs +++ b/js/buttons.bootstrap.min.mjs @@ -1,4 +1,4 @@ /*! Bootstrap integration for DataTables' Buttons * © SpryMedia Ltd - datatables.net/license */ -import jQuery from"jquery";import DataTable from"datatables.net-bs";import Buttons from"datatables.net-buttons";let $=jQuery;$.extend(!0,DataTable.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group flex-wrap"},button:{className:"btn btn-default",active:"active"},collection:{action:{dropHtml:''},container:{tag:"div",className:"dt-button-collection",content:{tag:"ul",className:"dropdown-menu"}},closeButton:!1,button:{tag:"li",className:"dt-button",active:"dt-button-active-a",disabled:"disabled",liner:{tag:"a"},spacer:{className:"divider",tag:"li"}}},split:{action:{tag:"a",className:"btn btn-default dt-button-split-drop-button",closeButton:!1},dropdown:{tag:"button",dropHtml:'',className:"btn btn-default dt-button-split-drop dropdown-toggle dropdown-toggle-split",closeButton:!1,align:"split-left",splitAlignClass:"dt-button-split-left"},wrapper:{tag:"div",className:"dt-button-split btn-group",closeButton:!1}}}});export default DataTable; \ No newline at end of file +import jQuery from"jquery";import DataTable from"datatables.net-bs";import Buttons from"datatables.net-buttons";let $=jQuery;$.extend(!0,DataTable.Buttons.defaults,{dom:{container:{className:"dt-buttons btn-group flex-wrap"},button:{className:"btn btn-default",active:"active",dropHtml:'',dropClass:""},collection:{container:{tag:"div",className:"dt-button-collection",content:{tag:"ul",className:"dropdown-menu"}},closeButton:!1,button:{tag:"li",className:"dt-button",active:"dt-button-active-a",disabled:"disabled",liner:{tag:"a"},spacer:{className:"divider",tag:"li"}}},split:{action:{tag:"a",className:"btn btn-default dt-button-split-drop-button",closeButton:!1},dropdown:{tag:"button",className:"btn btn-default 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}}}});export default DataTable; \ No newline at end of file diff --git a/js/buttons.bootstrap.mjs b/js/buttons.bootstrap.mjs index c30fef3..b2c1872 100644 --- a/js/buttons.bootstrap.mjs +++ b/js/buttons.bootstrap.mjs @@ -17,12 +17,11 @@ $.extend(true, DataTable.Buttons.defaults, { }, button: { className: 'btn btn-default', - active: 'active' + active: 'active', + dropHtml: '', + dropClass: '' }, collection: { - action: { - dropHtml: '' - }, container: { tag: 'div', className: 'dt-button-collection', @@ -54,9 +53,8 @@ $.extend(true, DataTable.Buttons.defaults, { }, dropdown: { tag: 'button', - dropHtml: '', className: - 'btn btn-default dt-button-split-drop dropdown-toggle dropdown-toggle-split', + 'btn btn-default dt-button-split-drop dropdown-toggle-split', closeButton: false, align: 'split-left', splitAlignClass: 'dt-button-split-left'