Skip to content

Commit

Permalink
Updated datatable dependencies, fix styling
Browse files Browse the repository at this point in the history
This updates all data table script files to their most recent versions
as indicated in assets/source.txt

Template handling has been adjusted to load the JQuery-UI styling when a
template other than bootstrap3 is used. This should make the UI more
usable in any template, since JQuery-UI is included in DokuWiki core.
  • Loading branch information
splitbrain committed Jul 12, 2023
1 parent 42fec82 commit aeb9140
Show file tree
Hide file tree
Showing 192 changed files with 118,701 additions and 790 deletions.
27 changes: 11 additions & 16 deletions action.php
Expand Up @@ -142,27 +142,22 @@ public function datatables(Doku_Event &$event, $param)
$dt_scripts[] = "$base_url/datatables.net-buttons/js/buttons.html5.min.js";
$dt_scripts[] = "$base_url/datatables.net-buttons/js/buttons.print.min.js";

$dt_scripts[] = "$base_url/jszip/dist/jszip.min.js";
$dt_scripts[] = "$base_url/pdfmake/build/pdfmake.min.js";
$dt_scripts[] = "$base_url/pdfmake/build/vfs_fonts.js";
$dt_scripts[] = "$base_url/jszip/jszip.min.js";
$dt_scripts[] = "$base_url/pdfmake/pdfmake.min.js";
$dt_scripts[] = "$base_url/pdfmake/vfs_fonts.js";

switch ($conf['template']) {

case 'bootstrap3':

$dt_scripts[] = "$base_url/datatables.net-bs/js/dataTables.bootstrap.min.js";
$dt_styles[] = "$base_url/datatables.net-bs/css/dataTables.bootstrap.min.css";

//$dt_scripts[] = "$base_url/datatables.net-responsive-bs/js/responsive.bootstrap.min.js";
//$dt_syles[] = "$base_url/datatables.net-responsive-bs/css/responsive.bootstrap.min.css";

$dt_scripts[] = "$base_url/datatables.net-buttons-bs/js/buttons.bootstrap.min.js";
$dt_styes[] = "$base_url/datatables.net-buttons-bs/css/buttons.bootstrap.min.css";

$dt_scripts[] = "$base_url/datatables.net/js/dataTables.bootstrap.min.js";
$dt_styles[] = "$base_url/datatables.net/css/dataTables.bootstrap.min.css";
$dt_scripts[] = "$base_url/datatables.net-buttons/js/buttons.bootstrap.min.js";
$dt_styles[] = "$base_url/datatables.net-buttons/css/buttons.bootstrap.min.css";
break;

default:
//$dt_scripts[] = "$base_url/datatables.net-responsive/js/dataTables.responsive.min.js";
$dt_scripts[] = "$base_url/datatables.net/js/dataTables.jqueryui.min.js";
$dt_styles[] = "$base_url/datatables.net/css/dataTables.jqueryui.min.css";
$dt_scripts[] = "$base_url/datatables.net-buttons/js/buttons.jqueryui.min.js";
$dt_styles[] = "$base_url/datatables.net-buttons/css/buttons.jqueryui.min.css";
}

foreach ($dt_scripts as $script) {
Expand Down
1 change: 0 additions & 1 deletion assets/datatables.net-bs/css/dataTables.bootstrap.min.css

This file was deleted.

8 changes: 0 additions & 8 deletions assets/datatables.net-bs/js/dataTables.bootstrap.min.js

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions assets/datatables.net-buttons-bs/js/buttons.bootstrap.min.js

This file was deleted.

275 changes: 275 additions & 0 deletions assets/datatables.net-buttons/css/buttons.bootstrap.css
@@ -0,0 +1,275 @@
@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;
}

div.dt-button-info {
position: fixed;
top: 50%;
left: 50%;
width: 400px;
margin-top: -100px;
margin-left: -200px;
background-color: white;
border-radius: 0.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: 0.3em 0 0.5em;
margin-left: 0.5em;
margin-right: 0.5em;
font-size: 0.9em;
}

div.dt-button-collection-title:empty {
display: none;
}

span.dt-button-spacer {
display: inline-block;
margin: 0.5em;
white-space: nowrap;
}
span.dt-button-spacer.bar {
border-left: 1px solid rgba(0, 0, 0, 0.3);
vertical-align: middle;
padding-left: 0.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: 0.9em;
text-align: center;
margin: 0.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;
}

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 !important;
min-width: 200px;
margin-top: 3px !important;
z-index: 2002;
}
div.dt-buttons div.dt-button-collection .dropdown-menu {
margin-top: 4px;
display: block;
}
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;
}
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 span.caret {
margin-left: 0.5em;
}
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;
}

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: 0.5em;
}
div.dt-buttons a.btn {
float: none;
}
}

0 comments on commit aeb9140

Please sign in to comment.