Bug fixes

This commit is contained in:
Patrick Jentsch 2021-12-03 16:10:54 +01:00
parent 5b5d7a6601
commit b3f34648c4
2 changed files with 12 additions and 29 deletions

View File

@ -16,7 +16,7 @@ class CorpusDisplay extends RessourceDisplay {
this.setNumTokens(corpus.num_tokens); this.setNumTokens(corpus.num_tokens);
} }
patch(patch) { usersPatchHandler(patch) {
let filteredPatch; let filteredPatch;
let operation; let operation;
let re; let re;
@ -33,12 +33,12 @@ class CorpusDisplay extends RessourceDisplay {
} }
re = new RegExp(`^/users/${this.userId}/corpora/${this.corpusId}/num_tokens`); re = new RegExp(`^/users/${this.userId}/corpora/${this.corpusId}/num_tokens`);
if (re.test(operation.path)) { if (re.test(operation.path)) {
this.numTokens(operation.value); this.setNumTokens(operation.value);
break; break;
} }
re = new RegExp(`^/users/${this.userId}/corpora/${this.corpusId}/status$`); re = new RegExp(`^/users/${this.userId}/corpora/${this.corpusId}/status$`);
if (re.test(operation.path)) { if (re.test(operation.path)) {
this.status(operation.value); this.setStatus(operation.value);
break; break;
} }
break; break;

View File

@ -22,7 +22,7 @@
<p>Nopaque lets you create and upload as many text corpora as you want. It makes use of CQP Query Language, which allows for complex search requests with the aid of metadata and NLP tags. The results can either be displayed as text or abstract visualizations.</p> <p>Nopaque lets you create and upload as many text corpora as you want. It makes use of CQP Query Language, which allows for complex search requests with the aid of metadata and NLP tags. The results can either be displayed as text or abstract visualizations.</p>
</div> </div>
<div class="col s12" id="corpora"> <div class="col s12 nopaque-ressource-list" data-ressource-type="Corpus" data-user-id="{{ current_user.hashid }}" id="corpora">
<h2>My Corpora</h2> <h2>My Corpora</h2>
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
@ -31,15 +31,12 @@
<input id="search-corpus" class="search" type="search"></input> <input id="search-corpus" class="search" type="search"></input>
<label for="search-corpus">Search corpus</label> <label for="search-corpus">Search corpus</label>
</div> </div>
<table class="highlight ressource-list"> <table class="highlight">
<thead> <thead>
<tr> <tr>
<th></th> <th></th>
<th> <th>Title and Description</th>
<span class="sort" data-sort="title">Title</span> <th>Status</th>
<span class="sort" data-sort="description">Description</span>
</th>
<th><span class="sort" data-sort="status">Status</span></th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
@ -54,7 +51,7 @@
</div> </div>
</div> </div>
<div class="col s12" id="query-results"> <div class="col s12 nopaque-ressource-list" data-ressource-type="QueryResult" data-user-id="{{ current_user.hashid }}" id="query-results">
<h2>My query results</h2> <h2>My query results</h2>
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
@ -63,17 +60,11 @@
<input id="search-query-results" class="search" type="search"></input> <input id="search-query-results" class="search" type="search"></input>
<label for="search-query-results">Search query result</label> <label for="search-query-results">Search query result</label>
</div> </div>
<table class="highlight ressource-list"> <table class="highlight">
<thead> <thead>
<tr> <tr>
<th> <th>Title and Description</th>
<span class="sort" data-sort="title">Title</span> and<br> <th>Corpus and Query</th>
<span class="sort" data-sort="description">Description</span>
</th>
<th>
<span class="sort" data-sort="corpus">Corpus</span> and<br>
<span class="sort" data-sort="query">Query</span>
</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
@ -82,18 +73,10 @@
<ul class="pagination"></ul> <ul class="pagination"></ul>
</div> </div>
<div class="card-action right-align"> <div class="card-action right-align">
<a class="btn waves-effect waves-light" href="{{ url_for('corpora.add_query_result') }}">Add query result<i class="material-icons right">file_upload</i></a> <a class="btn waves-effect waves-light disabled">Add query result<i class="material-icons right">file_upload</i></a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{% endblock page_content %} {% endblock page_content %}
{% block scripts %}
{{ super() }}
<script>
let corpusList = new CorpusList(document.querySelector('#corpora'));
let queryResultList = new QueryResultList(document.querySelector('#query-results'));
</script>
{% endblock scripts %}