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
204e359d
Commit
204e359d
authored
Jun 10, 2020
by
Ubbo Veentjer
Browse files
js compatibility with chrome 30 / tolino
parent
431681b6
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/resources/static/js/advanced-search.js
View file @
204e359d
...
...
@@ -18,7 +18,7 @@ document.addEventListener("DOMContentLoaded", function(event) {
var
mdSearchActive
=
false
;
var
contentSearchActive
=
false
;
formArray
.
forE
ach
(
function
(
val
)
{
$
(
formArray
).
e
ach
(
function
(
id
,
val
)
{
if
(
val
.
name
===
'
fulltext
'
)
{
fulltext
=
val
.
value
;
}
...
...
src/main/resources/static/js/basket.js
View file @
204e359d
...
...
@@ -56,7 +56,7 @@ function removeFromAggregatorItemString(tgObjectUri) {
// are there any objects left on the shelf?
if
(
itemArr
.
length
>
0
)
{
basketItemString
=
itemArr
.
join
(
'
,
'
);
document
.
querySelectorAll
(
'
.aggregator-items
'
).
forEach
(
elem
=>
{
$
(
'
.aggregator-items
'
).
each
((
id
,
elem
)
=>
{
elem
.
href
=
elem
.
href
.
replace
(
basketItemStringOld
,
basketItemString
);
});
}
else
{
...
...
@@ -66,7 +66,7 @@ function removeFromAggregatorItemString(tgObjectUri) {
// disable download and voyant links if shelf is empty
function
removeUselessActionsFromEmptyShelf
()
{
document
.
querySelectorAll
(
'
.remove_on_shelf_empty
'
).
forEach
(
elem
=>
{
$
(
'
.remove_on_shelf_empty
'
).
each
((
id
,
elem
)
=>
{
elem
.
remove
();
});
}
\ No newline at end of file
src/main/resources/static/js/sentry.js
0 → 100644
View file @
204e359d
Sentry
.
init
({
dsn
:
'
https://0e2560ec0cda414897840b800e9c03e7@dev2.discuss-data.net/4
'
});
src/main/resources/static/js/theme.js
View file @
204e359d
...
...
@@ -122,13 +122,12 @@ $( function() {
/* retrieve number of basket items on page load to set number display */
document
.
addEventListener
(
"
DOMContentLoaded
"
,
event
=>
{
fetch
(
"
/service/shelf/count
"
)
.
then
(
response
=>
response
.
text
())
.
then
(
cnt
=>
setBasketCount
(
cnt
));
$
.
ajax
(
"
/service/shelf/count
"
)
.
done
(
response
=>
setBasketCount
(
response
));
});
/* show number of items in basket */
function
setBasketCount
(
num
)
{
document
.
querySelectorAll
(
'
.topbox_shelf-count
'
).
forEach
(
elem
=>
{
$
(
'
.topbox_shelf-count
'
).
each
((
id
,
elem
)
=>
{
elem
.
textContent
=
num
;
})
}
...
...
@@ -188,12 +187,12 @@ document.addEventListener("DOMContentLoaded", function(event) {
var
filters
=
[];
// get the filters from the left sidebar to append them to the search form
document
.
querySelectorAll
(
'
.tgrep.sidebar_item.-filter
'
).
forEach
(
elem
=>
{
$
(
'
.tgrep.sidebar_item.-filter
'
).
each
((
id
,
elem
)
=>
{
filters
.
push
(
elem
.
dataset
.
filter
);
});
function
addFiltersToSearchForm
(
filters
)
{
filters
.
forE
ach
(
function
(
filter
)
{
$
(
filters
).
e
ach
(
function
(
id
,
filter
)
{
$
(
'
form.search
'
).
append
(
$
(
'
<input type="hidden" class="hiddenFilterInput" name="filter" value="
'
+
filter
+
'
" />
'
));
});
}
...
...
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