mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 17:40:40 +00:00
Fix corpus follower on user page + optgroup models
This commit is contained in:
@ -85,7 +85,13 @@
|
||||
for (let optionElement of document.querySelectorAll('option[value=""]')) {
|
||||
optionElement.disabled = true;
|
||||
}
|
||||
|
||||
for (let optgroupElement of document.querySelectorAll('optgroup[label=""]')) {
|
||||
for (let c of optgroupElement.children) {
|
||||
optgroupElement.parentElement.insertAdjacentElement('afterbegin', c);
|
||||
}
|
||||
optgroupElement.remove();
|
||||
|
||||
}
|
||||
// Set the data-length attribute on textareas/inputs with the maxlength attribute
|
||||
for (let inputElement of document.querySelectorAll('textarea[maxlength], input[maxlength]')) {
|
||||
inputElement.dataset.length = inputElement.getAttribute('maxlength');
|
||||
|
@ -8,6 +8,9 @@
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h1>{{ corpus.title }}</h1>
|
||||
{% for cfa in cfas %}
|
||||
{{ cfa.follower.username|tojson }},
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="col s12 l7">
|
||||
<div class="card service-color-border border-darken" data-service="corpus-analysis" style="border-top: 10px solid">
|
||||
|
@ -126,7 +126,7 @@ let followedCorpusList = new PublicCorpusList(document.querySelector('.followed-
|
||||
followedCorpusList.add(
|
||||
[
|
||||
{% for corpus in user.followed_corpora %}
|
||||
{% if (corpus.is_public or corpus.user == current_user) %}
|
||||
{% if (corpus.is_public or corpus.user == current_user or user == current_user or current_user.is_following_corpus(corpus)) %}
|
||||
{{ corpus.to_json_serializeable(backrefs=True)|tojson }},
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user