Corpus Follower List Fix

This commit is contained in:
Inga Kirschnick 2023-04-28 13:24:30 +02:00
parent 6c76d27a32
commit c6db277436
4 changed files with 7 additions and 7 deletions

View File

@ -561,7 +561,6 @@ class ConcordanceQueryBuilder {
if (tokenIsEmpty === false) { if (tokenIsEmpty === false) {
tokenQueryText = '[' + tokenQueryText + ']'; tokenQueryText = '[' + tokenQueryText + ']';
} }
console.log(tokenQueryText);
this.queryChipFactory('token', tokenQueryContent, tokenQueryText); this.queryChipFactory('token', tokenQueryContent, tokenQueryText);
this.hideEverything(); this.hideEverything();
this.elements.positionalAttrArea.classList.add('hide'); this.elements.positionalAttrArea.classList.add('hide');

View File

@ -113,7 +113,6 @@ class CorpusFollowerList extends ResourceList {
} }
onChange(event) { onChange(event) {
console.log(event.target.tagName);
let listItemElement = event.target.closest('.list-item[data-id]'); let listItemElement = event.target.closest('.list-item[data-id]');
if (listItemElement === null) {return;} if (listItemElement === null) {return;}
let itemId = listItemElement.dataset.id; let itemId = listItemElement.dataset.id;

View File

@ -22,11 +22,13 @@
<a class="action-button btn waves-effect waves-light disabled" id="build-button" style="width: 100%;"><i class="nopaque-icons left">K</i>Build</a> <a class="action-button btn waves-effect waves-light disabled" id="build-button" style="width: 100%;"><i class="nopaque-icons left">K</i>Build</a>
{% endif %} {% endif %}
</div> </div>
{% if corpus.status.name in ['BUILT', 'STARTING_ANALYSIS_SESSION', 'RUNNING_ANALYSIS_SESSION', 'CANCELING_ANALYSIS_SESSION'] %}
<div class="col s12 l6" style="padding: 0 2.5px;"> <div class="col s12 l6" style="padding: 0 2.5px;">
{% if corpus.status.name in ['BUILT', 'STARTING_ANALYSIS_SESSION', 'RUNNING_ANALYSIS_SESSION', 'CANCELING_ANALYSIS_SESSION'] %}
<a class="btn waves-effect waves-light" href="{{ url_for('corpora.analysis', corpus_id=corpus.id) }}" style="width: 100%;"><i class="material-icons left">search</i>Analyze</a> <a class="btn waves-effect waves-light" href="{{ url_for('corpora.analysis', corpus_id=corpus.id) }}" style="width: 100%;"><i class="material-icons left">search</i>Analyze</a>
</div> {% else %}
<a class="btn waves-effect waves-light disabled" href="{{ url_for('corpora.analysis', corpus_id=corpus.id) }}" style="width: 100%;"><i class="material-icons left">search</i>Analyze</a>
{% endif %} {% endif %}
</div>
{% endif %} {% endif %}
{% if current_user.is_following_corpus(corpus) %} {% if current_user.is_following_corpus(corpus) %}
<div class="col s12 l6" style="padding: 5px 2.5px 0 2.5px;"> <div class="col s12 l6" style="padding: 5px 2.5px 0 2.5px;">

View File

@ -89,7 +89,7 @@
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<span class="card-title" id="files">Corpus files</span> <span class="card-title" id="files">Corpus files</span>
<div class="corpus-file-list" id="corpus-file-list" data-has-permission-view="{{ cfr.has_permission('VIEW')|tojson }}" data-has-permission-manage-files="{{ cfr.has_permission('MANAGE_FILES')|tojson }}" data-corpus-id="{{ corpus.hashid }}"></div> <div class="corpus-file-list" data-has-permission-view="{{ cfr.has_permission('VIEW')|tojson }}" data-has-permission-manage-files="{{ cfr.has_permission('MANAGE_FILES')|tojson }}" data-corpus-id="{{ corpus.hashid }}" data-user-id="{{ corpus.user.hashid }}"></div>
</div> </div>
{% if cfr.has_permission('MANAGE_FILES') %} {% if cfr.has_permission('MANAGE_FILES') %}
<div class="card-action right-align"> <div class="card-action right-align">
@ -240,14 +240,14 @@
let corpusDisplay = new CorpusDisplay(document.querySelector('#corpus-display')); let corpusDisplay = new CorpusDisplay(document.querySelector('#corpus-display'));
{% endif %} {% endif %}
let corpusFileList = new CorpusFileList(document.querySelector('#corpus-file-list')); {# let corpusFileList = new CorpusFileList(document.querySelector('#corpus-file-list'));
corpusFileList.add( corpusFileList.add(
[ [
{% for corpus_file in corpus.files %} {% for corpus_file in corpus.files %}
{{ corpus_file.to_json_serializeable()|tojson }}, {{ corpus_file.to_json_serializeable()|tojson }},
{% endfor %} {% endfor %}
] ]
); ); #}
{% if current_user.is_following_corpus(corpus) %} {% if current_user.is_following_corpus(corpus) %}
{% if cfr.has_permission('MANAGE_FILES') %} {% if cfr.has_permission('MANAGE_FILES') %}