Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
DARIAH-DE
TextGridRep Portal
Commits
3ab08a09
Commit
3ab08a09
authored
May 14, 2020
by
Ubbo Veentjer
Browse files
remove inline css, add missing basket.js
parent
f02e8699
Pipeline
#134982
passed with stages
in 8 minutes and 12 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/static/css/more.css
0 → 100644
View file @
3ab08a09
/* tgrep css additions to custom.css */
/* from head.jsp */
ul
{
padding
:
0
;
}
dd
{
margin-left
:
0
;
}
dt
{
font-weight
:
bold
;
}
dd
+
dt
{
margin-top
:
13px
;
}
/* from browse.jsp */
iframe
{
width
:
100%
;
}
.clearboth
{
clear
:
both
;
}
.drunkenowl
{
float
:
right
;
width
:
30%
;
}
src/main/resources/static/js/basket.js
0 → 100644
View file @
3ab08a09
document
.
addEventListener
(
"
DOMContentLoaded
"
,
function
(
event
)
{
// TODO: does this overload the binding from theme.js?
$
(
document
).
on
(
'
click
'
,
'
.-remove-from-shelf
'
,
function
(
e
)
{
var
$this
=
$
(
this
);
var
tgObjectUri
=
$this
.
attr
(
'
data-textgrid-targeturi
'
);
$
.
ajax
({
url
:
'
/service/shelf/remove
'
,
type
:
'
POST
'
,
dataType
:
'
json
'
,
data
:
{
uri
:
tgObjectUri
},
success
:
function
(
data
)
{
$this
.
closest
(
'
li.tgrep.result
'
).
remove
();
$this
.
closest
(
'
li.tgrep.gallery-item
'
).
remove
();
$
(
'
.tgrep.header_count
'
).
html
(
data
);
setBasketCount
(
data
);
removeFromAggregatorItemString
(
tgObjectUri
)
}
});
});
$
(
document
).
on
(
'
click
'
,
'
.tgrep.header_button.-clear
'
,
function
(
e
)
{
$
.
ajax
({
url
:
'
/service/shelf/clear
'
,
type
:
'
POST
'
,
dataType
:
'
json
'
,
data
:
{
empty
:
'
empty
'
},
success
:
function
(
data
)
{
$
(
'
.tgrep.results_list
'
).
empty
();
$
(
'
.tgrep.results_gallery
'
).
empty
();
$
(
'
.tgrep.header_count
'
).
html
(
0
);
setBasketCount
(
data
);
removeUselessActionsFromEmptyShelf
();
}
});
});
basketItemString
=
document
.
querySelector
(
'
#basketItemString
'
).
dataset
.
value
;
});
// set by jsp
var
basketItemString
;
// removes the tguri from aggregatorUrl
function
removeFromAggregatorItemString
(
tgObjectUri
)
{
var
basketItemStringOld
=
basketItemString
;
var
itemArr
=
basketItemString
.
split
(
'
,
'
);
itemArr
.
splice
(
itemArr
.
indexOf
(
tgObjectUri
),
1
);
// are there any objects left on the shelf?
if
(
itemArr
.
length
>
0
)
{
basketItemString
=
itemArr
.
join
(
'
,
'
);
document
.
querySelectorAll
(
'
.aggregator-items
'
).
forEach
(
elem
=>
{
elem
.
href
=
elem
.
href
.
replace
(
basketItemStringOld
,
basketItemString
);
});
}
else
{
removeUselessActionsFromEmptyShelf
();
}
}
// disable download and voyant links if shelf is empty
function
removeUselessActionsFromEmptyShelf
()
{
document
.
querySelectorAll
(
'
.remove_on_shelf_empty
'
).
forEach
(
elem
=>
{
elem
.
remove
();
});
}
\ No newline at end of file
src/main/webapp/WEB-INF/jsp/base/head.jsp
View file @
3ab08a09
...
...
@@ -4,14 +4,7 @@
<title>
TextGrid Repository
</title>
<meta
charset=
"utf-8"
>
<link
rel=
"stylesheet"
href=
"/css/custom.css"
>
<style
type=
"text/css"
>
ul
{
padding
:
0
;
}
dd
{
margin-left
:
0
;
}
dt
{
font-weight
:
bold
;
}
dd
+
dt
{
margin-top
:
13px
;
}
</style>
<link
rel=
"stylesheet"
href=
"/css/more.css"
>
</head>
<body
class=
"html_body aui"
>
...
...
src/main/webapp/WEB-INF/jsp/browse.jsp
View file @
3ab08a09
...
...
@@ -6,12 +6,6 @@
<%@ include
file=
"base/head.jsp"
%>
<style>
iframe
{
width
:
100%
;
}
</style>
<div
class=
"tgrep wrap"
>
<c:if
test=
"
${
browseRootAggregations
}
"
>
...
...
@@ -260,7 +254,7 @@
<!-- Notes and License (e.g. for editions) -->
<c:if
test=
"
${
not
empty
metadata
.
object
.
edition
.
license
.
value
or
not
empty
metadata
.
object
.
generic
.
provided
.
notes
}
"
>
<div
style
=
"clear
:
both"
>
<div
class
=
"clearboth"
>
<hr/>
<dl>
<c:if
test=
"
${
not
empty
metadata
.
object
.
generic
.
provided
.
notes
}
"
>
...
...
@@ -283,7 +277,7 @@
</c:if>
<!-- Citation examples -->
<div
id=
"citation"
style
=
"clear
:
both"
>
<div
id=
"citation"
class
=
"clearboth"
>
<hr/>
<%@ include
file=
"components/citation.jsp"
%>
...
...
src/main/webapp/WEB-INF/jsp/error.jsp
View file @
3ab08a09
...
...
@@ -7,13 +7,13 @@
<%@ include
file=
"base/head.jsp"
%>
<img
src=
"/images/drunk.svg"
alt=
"drunk owl"
style=
"float:right; width: 30%;
"
>
<img
src=
"/images/drunk.svg"
alt=
"drunk owl"
class=
"drunkenowl
"
>
<h2>
Ups, an error occured
</h2>
<div>
Status code:
<b>
${statusCode}
</b></div>
<div>
Exception Message:
<b>
${exception}
</b></div>
<span
style
=
"clear
:
both
;
"
></span>
<span
class
=
"clearboth"
></span>
<pre>
<c:forEach
items=
"
${
stacktrace
}
"
var=
"stelem"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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