mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-15 18:40:40 +00:00
Bug fixes
This commit is contained in:
@ -135,9 +135,11 @@
|
||||
<script>
|
||||
let languageSwitch = document.querySelector('#terms-of-use-modal-switch');
|
||||
let termsOfUseContent = document.querySelectorAll('.terms-of-use-modal-content');
|
||||
languageSwitch.addEventListener('change', function() {
|
||||
termsOfUseContent.forEach(content => {
|
||||
content.classList.toggle('hide');
|
||||
if (languageSwitch) {
|
||||
languageSwitch.addEventListener('change', function() {
|
||||
termsOfUseContent.forEach(content => {
|
||||
content.classList.toggle('hide');
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
@ -273,7 +273,7 @@ publicCorpusFollowerList.add(
|
||||
{% if cfr.has_permission('MANAGE_FILES') %}
|
||||
let followerBuildRequest = document.querySelector('#follower-build-request');
|
||||
followerBuildRequest.addEventListener('click', () => {
|
||||
requests.corpora.entity.build({{ corpus.hashid|tojson }})
|
||||
nopaque.requests.corpora.entity.build({{ corpus.hashid|tojson }})
|
||||
.then((response) => {
|
||||
window.location.reload();
|
||||
});
|
||||
@ -285,7 +285,7 @@ followerBuildRequest.addEventListener('click', () => {
|
||||
{% if current_user.is_following_corpus(corpus) %}
|
||||
let unfollowRequestElement = document.querySelector('.action-button[data-action="unfollow-request"]');
|
||||
unfollowRequestElement.addEventListener('click', () => {
|
||||
requests.corpora.entity.followers.entity.delete({{ corpus.hashid|tojson }}, {{ current_user.hashid|tojson }})
|
||||
nopaque.requests.corpora.entity.followers.entity.delete({{ corpus.hashid|tojson }}, {{ current_user.hashid|tojson }})
|
||||
.then((response) => {
|
||||
window.location.reload();
|
||||
});
|
||||
@ -335,7 +335,7 @@ M.Modal.init(
|
||||
|
||||
inviteUserModalInviteButtonElement.addEventListener('click', (event) => {
|
||||
let usernames = inviteUserModalSearch.chipsData.map((chipData) => chipData.tag);
|
||||
requests.corpora.entity.followers.add({{ corpus.hashid|tojson }}, usernames)
|
||||
nopaque.requests.corpora.entity.followers.add({{ corpus.hashid|tojson }}, usernames)
|
||||
.then((response) => {
|
||||
window.location.reload();
|
||||
});
|
||||
@ -383,7 +383,7 @@ M.Modal.init(
|
||||
shareLinkModalCreateButtonElement.addEventListener('click', (event) => {
|
||||
let role = shareLinkModalCorpusFollowerRoleSelectElement.value;
|
||||
let expiration = shareLinkModalExpirationDateDatepickerElement.value
|
||||
requests.corpora.entity.generateShareLink({{ corpus.hashid|tojson }}, role, expiration)
|
||||
nopaque.requests.corpora.entity.generateShareLink({{ corpus.hashid|tojson }}, role, expiration)
|
||||
.then((response) => {
|
||||
response.json()
|
||||
.then((json) => {
|
||||
|
Reference in New Issue
Block a user