some javascript fixes after namespace implementation

This commit is contained in:
Patrick Jentsch 2023-11-09 15:51:00 +01:00
parent e9ddb85f03
commit 61be3345be
6 changed files with 9 additions and 10 deletions

View File

@ -179,7 +179,7 @@ nopaque.App = class App {
{
dismissible: false,
onCloseEnd: (modalElement) => {
Requests.users.entity.acceptTermsOfUse();
nopaque.requests.users.entity.acceptTermsOfUse();
}
}
);

View File

@ -17,7 +17,7 @@
{{ super() }}
<script>
let corpusListElement = document.querySelector('#corpus-list');
let corpusList = new ResourceLists.CorpusList(corpusListElement);
let corpusList = new nopaque.resource_lists.CorpusList(corpusListElement);
corpusList.add(
[
{% for corpus in corpora %}

View File

@ -22,7 +22,7 @@
{{ super() }}
<script>
let adminUserListElement = document.querySelector('#admin-user-list');
let adminUserList = new ResourceLists.AdminUserList(adminUserListElement);
let adminUserList = new nopaque.resource_lists.AdminUserList(adminUserListElement);
adminUserList.add(
[
{% for user in users %}

View File

@ -242,7 +242,7 @@
{{ super() }}
<script>
let publicCorpusFileList = new ResourceLists.CorpusFileList(document.querySelector('#corpus-file-list'));
let publicCorpusFileList = new nopaque.resource_lists.CorpusFileList(document.querySelector('#corpus-file-list'));
publicCorpusFileList.add(
[
{% for corpus_file in corpus.files %}
@ -259,7 +259,7 @@ refreshButton.addEventListener('click', () => {
{% endif %}
{% if cfr.has_permission('MANAGE_FOLLOWERS') %}
let publicCorpusFollowerList = new ResourceLists.CorpusFollowerList(document.querySelector('.corpus-follower-list'));
let publicCorpusFollowerList = new nopaque.resource_lists.CorpusFollowerList(document.querySelector('.corpus-follower-list'));
publicCorpusFollowerList.add(
[
{% for cfa in cfas %}

View File

@ -50,7 +50,6 @@
<p>Find public corpora.</p>
<div class="card">
<div class="card-content">
<span class="card-title">Public Corpora</span>
<div id="public-corpus-list"></div>
</div>
</div>
@ -63,7 +62,7 @@
{{ super() }}
<script>
let publicUserListElement = document.querySelector('#public-user-list');
let publicUserList = new ResourceLists.PublicUserList(publicUserListElement);
let publicUserList = new nopaque.resource_lists.PublicUserList(publicUserListElement);
publicUserList.add(
[
{% for user in users %}
@ -73,7 +72,7 @@
);
let publicCorpusListElement = document.querySelector('#public-corpus-list');
let publicCorpusList = new ResourceLists.PublicCorpusList(publicCorpusListElement);
let publicCorpusList = new nopaque.resource_lists.PublicCorpusList(publicCorpusListElement);
publicCorpusList.add(
[
{% for corpus in corpora %}

View File

@ -122,7 +122,7 @@
{% block scripts %}
{{ super() }}
<script>
let followedCorpusList = new ResourceLists.PublicCorpusList(document.querySelector('.followed-corpus-list'));
let followedCorpusList = new nopaque.resource_lists.PublicCorpusList(document.querySelector('.followed-corpus-list'));
followedCorpusList.add(
[
{% for corpus in user.followed_corpora %}
@ -132,7 +132,7 @@ followedCorpusList.add(
{% endfor %}
]
);
let publicCorpusList = new ResourceLists.PublicCorpusList(document.querySelector('.public-corpus-list'));
let publicCorpusList = new nopaque.resource_lists.PublicCorpusList(document.querySelector('.public-corpus-list'));
publicCorpusList.add(
[
{% for corpus in user.corpora %}