Add a container for buttons

This commit is contained in:
James Polley 2018-08-01 02:33:14 +00:00
parent 26520868e0
commit 0b6d23dc33

View file

@ -67,20 +67,19 @@
"pageLength": 100, "pageLength": 100,
"colReorder": true, "colReorder": true,
"buttons": [{ "buttons": [{
extend: 'collection', extend: 'collection',
text: 'Export', text: 'Export',
buttons: ["copy", "csv", "print"] buttons: ["copy", "csv", "print"]
}, },
{ extend: 'collection', { extend: 'collection',
text: 'Columns', text: 'Columns',
buttons: [ buttons: [
{ extend: 'columnsToggle', { extend: 'columnsToggle',
columns: '.toggle' }, columns: '.toggle' },
{ extend: 'columnToggle', { extend: 'columnToggle',
text: 'Vote details', text: 'Vote details',
columns: '.votes' columns: '.votes'
} }]}]});
] table.buttons().container().appendTo( $('.col-sm-6:eq(0)', table.table().container() ) );
}]});
</script> </script>
{% endblock %} {% endblock %}