Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
S
sidekick
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Privat - Marco Schmiedel
sidekick
Commits
e446df03
Commit
e446df03
authored
Jul 12, 2022
by
Kevin Yumang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SERV-2286 - datatable css WIP (no css for buttons yet)
parent
74f358de
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
16 deletions
+30
-16
datatables.init.js
src/Views/Limitless/Datatable/Attachments/datatables.init.js
+28
-9
jquery.dataTables.min.css
...Limitless/Datatable/Attachments/jquery.dataTables.min.css
+0
-1
Config.php
src/Views/Limitless/Datatable/Config.php
+2
-2
datatable.css
src/Views/Limitless/Datatable/datatable.css
+0
-4
No files found.
src/Views/Limitless/Datatable/Attachments/datatables.init.js
View file @
e446df03
...
...
@@ -99,8 +99,9 @@ function limitless_init_datatable() {
// Define the table control elements to appear on the page and in what order.
// https://datatables.net/reference/option/dom
let
dom
=
showExportButtons
?
'
Blfrtip
'
:
'
lfrtip
'
;
let
dom
=
showExportButtons
?
'
<"datatable-header"fl><"datatable-scroll"t><"datatable-footer"Bip>
'
:
'
<"datatable-header"fl><"datatable-scroll"t><"datatable-footer"ip>
'
;
// length menu
let
lengthMenu
=
[
...
...
@@ -121,7 +122,10 @@ function limitless_init_datatable() {
"
columnDefs
"
:
orderable
,
"
buttons
"
:
exportButtons
,
"
language
"
:
{
"
url
"
:
"
//cdn.datatables.net/plug-ins/1.10.19/i18n/German.json
"
"
search
"
:
'
_INPUT_
'
,
"
searchPlaceholder
"
:
'
Suchen
'
,
"
lengthMenu
"
:
'
<span>Einträge anzeigen</span> _MENU_
'
,
"
url
"
:
"
//cdn.datatables.net/plug-ins/1.10.19/i18n/German.json
"
,
},
"
lengthMenu
"
:
lengthMenu
,
"
drawCallback
"
:
function
(
settings
)
{
...
...
@@ -129,11 +133,7 @@ function limitless_init_datatable() {
// calculate height for animation
var
height
=
$
(
'
#
'
+
settings
.
sTableId
).
parents
(
'
.dataTables_wrapper
'
).
first
().
height
()
+
10
;
// add classes to filter and select dropdown
$
(
'
.dataTables_filter input
'
).
addClass
(
'
DatatableSearch
'
);
$
(
'
.dataTables_length label select
'
).
addClass
(
'
DatatableFilter
'
);
$
(
'
.dataTables_info
'
).
addClass
(
'
d-none d-lg-block d-md-block
'
);
$
(
'
.dataTables_length
'
).
addClass
(
'
d-none d-lg-block d-md-block
'
);
setSelect2
();
// get int from callback
var
callbbackid
=
settings
.
sTableId
.
replace
(
/
[^\d
.
]
/g
,
''
);
...
...
@@ -165,4 +165,23 @@ function limitless_init_datatable() {
},
300
);
}
$
(
document
).
ready
(
limitless_init_datatable
);
// Select2 for length menu styling
function
setSelect2
()
{
if
(
!
$
().
select2
)
{
console
.
warn
(
'
Warning - select2.min.js is not loaded.
'
);
return
;
}
// Initialize
$
(
'
.dataTables_length select
'
).
select2
({
minimumResultsForSearch
:
Infinity
,
dropdownAutoWidth
:
true
,
width
:
'
auto
'
});
}
$
(
document
).
ready
(
function
()
{
limitless_init_datatable
();
});
src/Views/Limitless/Datatable/Attachments/jquery.dataTables.min.css
deleted
100644 → 0
View file @
74f358de
This diff is collapsed.
Click to expand it.
src/Views/Limitless/Datatable/Config.php
View file @
e446df03
...
...
@@ -43,7 +43,6 @@
$this
->
assetAllocation
=
[
'Limitless::DatatableStart'
=>
[
'Attachments/jquery.dataTables.min.js'
,
'Attachments/jquery.dataTables.min.css'
,
'Attachments/exporting/buttons.dataTables.min.css'
,
'Attachments/exporting/dataTables.buttons.min.js'
,
'Attachments/exporting/jszip.min.js'
,
...
...
@@ -53,7 +52,8 @@
'Attachments/exporting/buttons.print.min.js'
,
'Attachments/datatables.init.js'
,
'Attachments/datatables.init.css'
,
'datatable.css'
'datatable.css'
,
secure_url
(
'/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/global_assets/js/plugins/forms/selects/select2.min.js'
),
]
];
}
...
...
src/Views/Limitless/Datatable/datatable.css
View file @
e446df03
.dataTables_filter
label
,
.dataTables_length
label
{
color
:
#aaa
;
}
table
.dataTable.display
>
tbody
>
tr
.odd
>
.sorting_1
{
box-shadow
:
inset
0
0
0
9999px
rgb
(
0
0
0
/
20%
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment