mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 17:40:40 +00:00
More rework
This commit is contained in:
@ -61,7 +61,9 @@
|
||||
'js/Requests/contributions/contributions.js',
|
||||
'js/Requests/contributions/spacy_nlp_pipeline_models.js',
|
||||
'js/Requests/contributions/tesseract_ocr_pipeline_models.js',
|
||||
'js/Requests/Corpora.js'
|
||||
'js/Requests/corpora/corpora.js',
|
||||
'js/Requests/corpora/files.js',
|
||||
'js/Requests/corpora/followers.js'
|
||||
%}
|
||||
<script src="{{ ASSET_URL }}"></script>
|
||||
{%- endassets %}
|
||||
|
@ -226,7 +226,7 @@
|
||||
let publishingModalIsPublicSwitchElement = document.querySelector('#publishing-modal-is-public-switch');
|
||||
publishingModalIsPublicSwitchElement.addEventListener('change', (event) => {
|
||||
let newIsPublic = publishingModalIsPublicSwitchElement.checked;
|
||||
Requests.corpora.corpus.isPublic.update(corpusId, newIsPublic)
|
||||
Requests.corpora.entity.isPublic.update(corpusId, newIsPublic)
|
||||
.catch((response) => {
|
||||
publishingModalIsPublicSwitchElement.checked = !newIsPublic;
|
||||
});
|
||||
@ -236,7 +236,7 @@
|
||||
// #region delete_modal_js
|
||||
let deleteModalDeleteButtonElement = document.querySelector('#delete-modal-delete-button');
|
||||
deleteModalDeleteButtonElement.addEventListener('click', (event) => {
|
||||
Requests.corpora.corpus.delete(corpusId)
|
||||
Requests.corpora.entity.delete(corpusId)
|
||||
.then((response) => {window.location.href = '/dashboard';});
|
||||
});
|
||||
// #endregion delete_modal_js
|
||||
@ -280,7 +280,7 @@
|
||||
|
||||
inviteUserModalInviteButtonElement.addEventListener('click', (event) => {
|
||||
let usernames = inviteUserModalSearch.chipsData.map((chipData) => chipData.tag);
|
||||
Utils.addCorpusFollowersRequest(corpusId, usernames);
|
||||
Requests.corpora.entity.followers.add(corpusId, usernames);
|
||||
});
|
||||
// #endregion invite_user_modal_js
|
||||
|
||||
@ -323,10 +323,13 @@
|
||||
)
|
||||
|
||||
shareLinkModalCreateButtonElement.addEventListener('click', (event) => {
|
||||
Utils.generateCorpusShareLinkRequest(corpusId, shareLinkModalCorpusFollowerRoleSelectElement.value, shareLinkModalExpirationDateDatepickerElement.value)
|
||||
.then((shareLink) => {
|
||||
shareLinkModalOutputContainerElement.classList.remove('hide');
|
||||
shareLinkModalOutputFieldElement.value = shareLink;
|
||||
Requests.corpora.entity.generateShareLink(corpusId, shareLinkModalCorpusFollowerRoleSelectElement.value, shareLinkModalExpirationDateDatepickerElement.value)
|
||||
.then((response) => {
|
||||
response.json()
|
||||
.then((json) => {
|
||||
shareLinkModalOutputContainerElement.classList.remove('hide');
|
||||
shareLinkModalOutputFieldElement.value = json.corpusShareLink;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user