Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dariah
search-commons-webresources
Commits
0139f805
Commit
0139f805
authored
Feb 09, 2018
by
Gradl, Tobias
Browse files
803: Complete collection view
Task-Url:
https://pm.winseda.de/issues/803
parent
b6bb77d3
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
css/application.css
View file @
0139f805
...
...
@@ -109,6 +109,12 @@
border-right
:
1px
solid
;
}
.state-table
tbody
td
.dataTables_empty
{
border
:
1px
solid
#ABABAB
;
padding
:
10px
;
text-align
:
center
;
}
.state-table.state-table-navigatable
tbody
th
:last-child
{
width
:
30px
;
padding
:
10px
;
...
...
@@ -237,12 +243,19 @@ table.state-table tbody tr.state-row-ok td {
margin-bottom
:
8px
;
}
.state-table
tbody
td
.child
{
border
:
1px
solid
#ABABAB
;
border-top
:
none
;
border-bottom-width
:
3px
;
padding
:
5px
}
.center
{
text-align
:
center
;
}
/* Specifics for inner (data) lists */
.state-table
ul
{
.state-table
ul
.inner-state-list
{
width
:
100%
;
position
:
relative
;
list-style-type
:
none
;
...
...
@@ -250,12 +263,12 @@ table.state-table tbody tr.state-row-ok td {
padding
:
0
;
}
.state-table
li
{
.state-table
ul
.inner-state-list
li
{
padding
:
4px
5px
;
/*border-bottom: 1px solid #EEE;*/
}
.state-table
li
.state-heading
{
.state-table
ul
.inner-state-list
li
.state-heading
{
font-weight
:
bold
;
}
...
...
css/datatables/datatables.css
View file @
0139f805
...
...
@@ -4,10 +4,10 @@
*
* To rebuild or modify this file with the latest versions of the included
* software please visit:
* https://datatables.net/download/#bs/dt-1.10.16/b-1.5.1/b-colvis-1.5.1/r-2.2.1/rg-1.0.2/
sc
-1.
4.4
/s
l
-1.
2.5
* https://datatables.net/download/#bs/dt-1.10.16/b-1.5.1/b-colvis-1.5.1/
b-print-1.5.1/fc-3.2.4/fh-3.1.3/
r-2.2.1/rg-1.0.2/
rr
-1.
2.3
/s
c
-1.
4.4
*
* Included libraries:
* DataTables 1.10.16, Buttons 1.5.1, Column visibility 1.5.1, Responsive 2.2.1, RowGroup 1.0.2, Scroller 1.4.4
, Select 1.2.5
* DataTables 1.10.16, Buttons 1.5.1, Column visibility 1.5.1,
Print view 1.5.1, FixedColumns 3.2.4, FixedHeader 3.1.3,
Responsive 2.2.1, RowGroup 1.0.2,
RowReorder 1.2.3,
Scroller 1.4.4
*/
table
.dataTable
{
...
...
@@ -362,6 +362,78 @@ div.dt-buttons a.btn.processing:after {
}
table
.DTFC_Cloned
tr
{
background-color
:
white
;
margin-bottom
:
0
;
}
div
.DTFC_LeftHeadWrapper
table
,
div
.DTFC_RightHeadWrapper
table
{
border-bottom
:
none
!important
;
margin-bottom
:
0
!important
;
background-color
:
white
;
}
div
.DTFC_LeftBodyWrapper
table
,
div
.DTFC_RightBodyWrapper
table
{
border-top
:
none
;
margin
:
0
!important
;
}
div
.DTFC_LeftBodyWrapper
table
thead
.sorting
:after
,
div
.DTFC_LeftBodyWrapper
table
thead
.sorting_asc
:after
,
div
.DTFC_LeftBodyWrapper
table
thead
.sorting_desc
:after
,
div
.DTFC_LeftBodyWrapper
table
thead
.sorting
:after
,
div
.DTFC_LeftBodyWrapper
table
thead
.sorting_asc
:after
,
div
.DTFC_LeftBodyWrapper
table
thead
.sorting_desc
:after
,
div
.DTFC_RightBodyWrapper
table
thead
.sorting
:after
,
div
.DTFC_RightBodyWrapper
table
thead
.sorting_asc
:after
,
div
.DTFC_RightBodyWrapper
table
thead
.sorting_desc
:after
,
div
.DTFC_RightBodyWrapper
table
thead
.sorting
:after
,
div
.DTFC_RightBodyWrapper
table
thead
.sorting_asc
:after
,
div
.DTFC_RightBodyWrapper
table
thead
.sorting_desc
:after
{
display
:
none
;
}
div
.DTFC_LeftBodyWrapper
table
tbody
tr
:first-child
th
,
div
.DTFC_LeftBodyWrapper
table
tbody
tr
:first-child
td
,
div
.DTFC_RightBodyWrapper
table
tbody
tr
:first-child
th
,
div
.DTFC_RightBodyWrapper
table
tbody
tr
:first-child
td
{
border-top
:
none
;
}
div
.DTFC_LeftFootWrapper
table
,
div
.DTFC_RightFootWrapper
table
{
border-top
:
none
;
margin-top
:
0
!important
;
background-color
:
white
;
}
div
.DTFC_Blocker
{
background-color
:
white
;
}
table
.dataTable.fixedHeader-floating
,
table
.dataTable.fixedHeader-locked
{
background-color
:
white
;
margin-top
:
0
!important
;
margin-bottom
:
0
!important
;
}
table
.dataTable.fixedHeader-floating
{
position
:
fixed
!important
;
}
table
.dataTable.fixedHeader-locked
{
position
:
absolute
!important
;
}
@media
print
{
table
.fixedHeader-floating
{
display
:
none
;
}
}
table
.dataTable.dtr-inline.collapsed
>
tbody
>
tr
>
td
.child
,
table
.dataTable.dtr-inline.collapsed
>
tbody
>
tr
>
th
.child
,
table
.dataTable.dtr-inline.collapsed
>
tbody
>
tr
>
td
.dataTables_empty
{
...
...
@@ -550,6 +622,30 @@ table.dataTable tr.group td {
}
table
.dt-rowReorder-float
{
position
:
absolute
!important
;
opacity
:
0.8
;
table-layout
:
fixed
;
outline
:
2px
solid
#337ab7
;
outline-offset
:
-2px
;
z-index
:
2001
;
}
tr
.dt-rowReorder-moving
{
outline
:
2px
solid
#888
;
outline-offset
:
-2px
;
}
body
.dt-rowReorder-noOverflow
{
overflow-x
:
hidden
;
}
table
.dataTable
td
.reorder
{
text-align
:
center
;
cursor
:
move
;
}
div
.DTS
{
display
:
block
!important
;
}
...
...
@@ -576,120 +672,3 @@ div.DTS tbody tr {
}
table
.dataTable
tbody
>
tr
.selected
,
table
.dataTable
tbody
>
tr
>
.selected
{
background-color
:
#08C
;
}
table
.dataTable.stripe
tbody
>
tr
.odd.selected
,
table
.dataTable.stripe
tbody
>
tr
.odd
>
.selected
,
table
.dataTable.display
tbody
>
tr
.odd.selected
,
table
.dataTable.display
tbody
>
tr
.odd
>
.selected
{
background-color
:
#0085c7
;
}
table
.dataTable.hover
tbody
>
tr
.selected
:hover
,
table
.dataTable.hover
tbody
>
tr
>
.selected
:hover
,
table
.dataTable.display
tbody
>
tr
.selected
:hover
,
table
.dataTable.display
tbody
>
tr
>
.selected
:hover
{
background-color
:
#0083c5
;
}
table
.dataTable.order-column
tbody
>
tr
.selected
>
.sorting_1
,
table
.dataTable.order-column
tbody
>
tr
.selected
>
.sorting_2
,
table
.dataTable.order-column
tbody
>
tr
.selected
>
.sorting_3
,
table
.dataTable.order-column
tbody
>
tr
>
.selected
,
table
.dataTable.display
tbody
>
tr
.selected
>
.sorting_1
,
table
.dataTable.display
tbody
>
tr
.selected
>
.sorting_2
,
table
.dataTable.display
tbody
>
tr
.selected
>
.sorting_3
,
table
.dataTable.display
tbody
>
tr
>
.selected
{
background-color
:
#0085c8
;
}
table
.dataTable.display
tbody
>
tr
.odd.selected
>
.sorting_1
,
table
.dataTable.order-column.stripe
tbody
>
tr
.odd.selected
>
.sorting_1
{
background-color
:
#0081c1
;
}
table
.dataTable.display
tbody
>
tr
.odd.selected
>
.sorting_2
,
table
.dataTable.order-column.stripe
tbody
>
tr
.odd.selected
>
.sorting_2
{
background-color
:
#0082c2
;
}
table
.dataTable.display
tbody
>
tr
.odd.selected
>
.sorting_3
,
table
.dataTable.order-column.stripe
tbody
>
tr
.odd.selected
>
.sorting_3
{
background-color
:
#0083c4
;
}
table
.dataTable.display
tbody
>
tr
.even.selected
>
.sorting_1
,
table
.dataTable.order-column.stripe
tbody
>
tr
.even.selected
>
.sorting_1
{
background-color
:
#0085c8
;
}
table
.dataTable.display
tbody
>
tr
.even.selected
>
.sorting_2
,
table
.dataTable.order-column.stripe
tbody
>
tr
.even.selected
>
.sorting_2
{
background-color
:
#0086ca
;
}
table
.dataTable.display
tbody
>
tr
.even.selected
>
.sorting_3
,
table
.dataTable.order-column.stripe
tbody
>
tr
.even.selected
>
.sorting_3
{
background-color
:
#0087cb
;
}
table
.dataTable.display
tbody
>
tr
.odd
>
.selected
,
table
.dataTable.order-column.stripe
tbody
>
tr
.odd
>
.selected
{
background-color
:
#0081c1
;
}
table
.dataTable.display
tbody
>
tr
.even
>
.selected
,
table
.dataTable.order-column.stripe
tbody
>
tr
.even
>
.selected
{
background-color
:
#0085c8
;
}
table
.dataTable.display
tbody
>
tr
.selected
:hover
>
.sorting_1
,
table
.dataTable.order-column.hover
tbody
>
tr
.selected
:hover
>
.sorting_1
{
background-color
:
#007dbb
;
}
table
.dataTable.display
tbody
>
tr
.selected
:hover
>
.sorting_2
,
table
.dataTable.order-column.hover
tbody
>
tr
.selected
:hover
>
.sorting_2
{
background-color
:
#007ebd
;
}
table
.dataTable.display
tbody
>
tr
.selected
:hover
>
.sorting_3
,
table
.dataTable.order-column.hover
tbody
>
tr
.selected
:hover
>
.sorting_3
{
background-color
:
#007fbf
;
}
table
.dataTable.display
tbody
>
tr
:hover
>
.selected
,
table
.dataTable.display
tbody
>
tr
>
.selected
:hover
,
table
.dataTable.order-column.hover
tbody
>
tr
:hover
>
.selected
,
table
.dataTable.order-column.hover
tbody
>
tr
>
.selected
:hover
{
background-color
:
#007dbb
;
}
table
.dataTable
tbody
td
.select-checkbox
,
table
.dataTable
tbody
th
.select-checkbox
{
position
:
relative
;
}
table
.dataTable
tbody
td
.select-checkbox
:before
,
table
.dataTable
tbody
td
.select-checkbox
:after
,
table
.dataTable
tbody
th
.select-checkbox
:before
,
table
.dataTable
tbody
th
.select-checkbox
:after
{
display
:
block
;
position
:
absolute
;
top
:
1.2em
;
left
:
50%
;
width
:
12px
;
height
:
12px
;
box-sizing
:
border-box
;
}
table
.dataTable
tbody
td
.select-checkbox
:before
,
table
.dataTable
tbody
th
.select-checkbox
:before
{
content
:
' '
;
margin-top
:
-6px
;
margin-left
:
-6px
;
border
:
1px
solid
black
;
border-radius
:
3px
;
}
table
.dataTable
tr
.selected
td
.select-checkbox
:after
,
table
.dataTable
tr
.selected
th
.select-checkbox
:after
{
content
:
'\2714'
;
margin-top
:
-11px
;
margin-left
:
-4px
;
text-align
:
center
;
text-shadow
:
1px
1px
#B0BED9
,
-1px
-1px
#B0BED9
,
1px
-1px
#B0BED9
,
-1px
1px
#B0BED9
;
}
div
.dataTables_wrapper
span
.select-info
,
div
.dataTables_wrapper
span
.select-item
{
margin-left
:
0.5em
;
}
@media
screen
and
(
max-width
:
640px
)
{
div
.dataTables_wrapper
span
.select-info
,
div
.dataTables_wrapper
span
.select-item
{
margin-left
:
0
;
display
:
block
;
}
}
table
.dataTable
tbody
tr
.selected
,
table
.dataTable
tbody
th
.selected
,
table
.dataTable
tbody
td
.selected
{
color
:
white
;
}
table
.dataTable
tbody
tr
.selected
a
,
table
.dataTable
tbody
th
.selected
a
,
table
.dataTable
tbody
td
.selected
a
{
color
:
#a2d4ed
;
}
js/_common/baseTable.js
View file @
0139f805
...
...
@@ -31,6 +31,11 @@ function BaseTable(url, containerSelector) {
"
dom
"
:
"
<'row'<'col-sm-12 data-tables-table'tr>>
"
+
"
<'row'<'col-sm-5'i><'col-sm-7'p>>
"
,
"
autoWidth
"
:
false
,
"
responsive
"
:
{
"
details
"
:
{
"
display
"
:
$
.
fn
.
dataTable
.
Responsive
.
display
.
childRowImmediate
,
}
},
"
processing
"
:
true
,
"
ajax
"
:
{
"
url
"
:
url
!=
null
&&
url
!=
undefined
?
url
:
window
.
location
.
pathname
+
"
async/getData
"
,
...
...
js/collections/list.js
View file @
0139f805
...
...
@@ -23,11 +23,9 @@ CollectionsEditor.prototype = new BaseTable(__util.getBaseUrl() + "collections/a
CollectionsEditor
.
prototype
.
createTable
=
function
()
{
var
_this
=
this
;
this
.
_base
.
table
=
$
(
'
#collections-table
'
).
DataTable
(
$
.
extend
(
true
,
{
"
responsive
"
:
true
,
"
order
"
:
[[
5
,
"
asc
"
]],
"
order
"
:
[[
1
,
"
asc
"
]],
"
columnDefs
"
:
[
{
{
"
targets
"
:
[
0
],
"
class
"
:
"
center
"
,
"
cellType
"
:
"
th
"
,
"
data
"
:
function
(
row
,
type
,
val
,
meta
)
{
return
editor
.
renderStateColumn
(
row
,
type
,
val
,
meta
);
}
},
{
...
...
@@ -40,13 +38,12 @@ CollectionsEditor.prototype.createTable = function() {
"
targets
"
:
[
3
],
"
data
"
:
"
entity.endpoint.method
"
},
{
"
targets
"
:
[
4
],
"
targets
"
:
[
4
],
"
responsivePriority
"
:
1
,
// It has the right border
"
data
"
:
"
entity.dataset.datamodelPojo.name
"
},
{
"
targets
"
:
[
5
],
"
visible
"
:
false
,
"
data
"
:
"
entity.collection.name
"
}
"
targets
"
:
[
5
],
"
visible
"
:
false
,
"
data
"
:
"
entity.collection.name
"
}
],
"
rowCallback
"
:
this
.
setRowState
,
"
rowGroup
"
:
{
...
...
@@ -55,10 +52,14 @@ CollectionsEditor.prototype.createTable = function() {
}
},
this
.
baseSettings
));
$
(
'
#collections-table tbody
'
).
on
(
'
click
'
,
'
tr
'
,
function
()
{
/*
$('#collections-table tbody').on('click', 'tr', function () {
var data = _this._base.table.row(this).data()
window
.
location
=
__util
.
composeRelativeUrl
(
data
.
entity
.
id
);
});
if (data===undefined) {
window.location = __util.composeRelativeUrl($(this).prop("id") + "/");
} else {
window.location = __util.composeRelativeUrl(data.entity.id);
}
});*/
};
CollectionsEditor
.
prototype
.
setGroupRow
=
function
(
rows
,
group
)
{
...
...
@@ -75,9 +76,9 @@ CollectionsEditor.prototype.setGroupRow = function(rows, group) {
}
}
return
$
(
'
<tr class="state-row-
'
+
overallState
+
'
" />
'
)
return
$
(
'
<tr class="state-row-
'
+
overallState
+
'
"
id="
'
+
rows
.
data
()[
0
].
entity
.
collection
.
id
+
'
"
/>
'
)
.
append
(
'
<th class="state-
'
+
overallState
+
'
"></th>
'
)
.
append
(
'
<td colspan="
5
">
'
+
.
append
(
'
<td colspan="
4
">
'
+
'
<span class="group-heading">
'
+
rows
.
data
()[
0
].
entity
.
collection
.
name
+
'
</span><br />
'
+
'
ID:
'
+
group
+
'
</td>
'
);
...
...
js/datatables/datatables.js
View file @
0139f805
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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