Commit b0b36269 authored by Klaus Stein's avatar Klaus Stein
Browse files

Improve maps datatable

parent 11131f9d
......@@ -10,8 +10,9 @@ window.jQuery = window.$ = $;
import DataTable from 'datatables.net';
import 'datatables.net-searchbuilder-dt';
//import 'datatables.net-bs';
//import 'datatables.net-buttons-dt';
//require( 'datatables.net-buttons/js/buttons.html5.js' )();
import 'datatables.net-buttons-dt';
require( 'datatables.net-buttons/js/buttons.html5.js' )();
require( 'datatables.net-buttons/js/buttons.colVis.js' )();
//require( 'datatables.net-buttons/js/buttons.print.js' )();
//import 'datatables.net-fixedcolumns-dt';
......@@ -32,8 +33,16 @@ document.addEventListener("turbolinks:load", function(event) {
window.xxx = noorder_rows;
const options = {
"scrollX": true,
"lengthMenu": [15,9999],
"pageLength": 15,
dom: 'Qlfrtip'
buttons: [
'copy', 'csv', {
extend: 'colvis',
columns: 'th:nth-child(n+2)'
}
],
colReorder: true,
dom: 'QlBfrtip'
};
if(noorder_rows) {
options["columnDefs"] = [
......
......@@ -26,10 +26,24 @@ main.maps {
/* overflow: auto;*/
padding: 1rem;
.dt-buttons {
float: right;
margin-left: 1rem;
}
div.dt-button-collection div[role="menu"] {
background: grey;
padding: 2px;
border: 1px solid black;
z-index: 9999;
position: relative;
}
table#maps-table {
border-left: 1px solid black;
border-right: 1px solid black;
// th,td { box-sizing: border-box;}
// th,td { box-sizing: border-box;}
max-width: 100%;
max-height: 80vh;
a {
display: block;
......
......@@ -2548,10 +2548,27 @@ datatables.net-buttons@1.7.1:
datatables.net "^1.10.15"
jquery ">=1.7"
datatables.net-dt@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/datatables.net-dt/-/datatables.net-dt-1.1.0.tgz#a0650198fbd08dc6535dac5e1bb4926044cd2581"
integrity sha512-5V/jQaO6H++CmVfnKEG5lMZVnuCSBkhRpUS5bCl4jRdvVtr+woMbI0CZ9O1Ly32Yj5wmMHlhkxcz6j+hBhVqMw==
datatables.net-colreorder-dt@^1.5.5:
version "1.5.5"
resolved "https://registry.yarnpkg.com/datatables.net-colreorder-dt/-/datatables.net-colreorder-dt-1.5.5.tgz#4e787af880da320a92a24d348865be800dce9871"
integrity sha512-uVsr25sFPJUs9wYf9sPLKa/43gPIjk0KCIJoKlBUALHcGJ2YyW3NAPDoo5vwFkbYGCZuLWF2NxfQIuS6TqS6XQ==
dependencies:
datatables.net-colreorder ">=1.5.4"
datatables.net-dt ">=1.11.3"
jquery ">=1.7"
datatables.net-colreorder@>=1.5.4:
version "1.5.5"
resolved "https://registry.yarnpkg.com/datatables.net-colreorder/-/datatables.net-colreorder-1.5.5.tgz#0de93e460cba5eb0167c0c491a2da0c76a2e3b12"
integrity sha512-AUwv5A/87I4hg7GY/WbhRrDhqng9b019jLvvKutHibSPCEtMDWqyNtuP0q8zYoquqU9UQ1/nqXLW/ld8TzIDYQ==
dependencies:
datatables.net ">=1.11.3"
jquery ">=1.7"
datatables.net-dt@>=1.11.3, datatables.net-dt@^1.11.3:
version "1.11.3"
resolved "https://registry.yarnpkg.com/datatables.net-dt/-/datatables.net-dt-1.11.3.tgz#242556a490585b457b7d2b9f5fd8fb10761d621b"
integrity sha512-EX/thRwXpQRj8hZSb+ZMDNQ4uW1zLZa9BoAhhw1b5HIDH1nJ9WRTkERsoxE+3WISeX8bDiaEydf8TTQBSqxXVw==
dependencies:
datatables.net ">=1.10.25"
jquery ">=1.7"
......@@ -2605,6 +2622,13 @@ datatables.net@1.10.25, datatables.net@>=1.10.25, datatables.net@^1.10.15:
dependencies:
jquery ">=1.7"
datatables.net@>=1.11.3:
version "1.11.3"
resolved "https://registry.yarnpkg.com/datatables.net/-/datatables.net-1.11.3.tgz#80e691036efcd62467558ee64c07dd566cb761b4"
integrity sha512-VMj5qEaTebpNurySkM6jy6sGpl+s6onPK8xJhYr296R/vUBnz1+id16NVqNf9z5aR076OGcpGHCuiTuy4E05oQ==
dependencies:
jquery ">=1.7"
debug@2.6.9, debug@^2.2.0, debug@^2.3.3:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment