mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Some small fixes
This commit is contained in:
parent
8c707fa81c
commit
4241c13e13
@ -127,7 +127,7 @@ class Client {
|
|||||||
objectKey = 'fullResultsData';
|
objectKey = 'fullResultsData';
|
||||||
} else if (resultsType === 'sub-results') {
|
} else if (resultsType === 'sub-results') {
|
||||||
objectKey = 'subResultsData';
|
objectKey = 'subResultsData';
|
||||||
} else if (resultsType = 'inspect-results') {
|
} else if (resultsType === 'inspect-results') {
|
||||||
objectKey = 'inspectResultsData';
|
objectKey = 'inspectResultsData';
|
||||||
}
|
}
|
||||||
// Delete old data before new data is coming in.
|
// Delete old data before new data is coming in.
|
||||||
|
@ -123,8 +123,8 @@ function saveResultsData() {
|
|||||||
// Notify view to update progress bar
|
// Notify view to update progress bar
|
||||||
client.notifyView('results-data-recieving', {type: type,
|
client.notifyView('results-data-recieving', {type: type,
|
||||||
progress: payload.progress})
|
progress: payload.progress})
|
||||||
client.isBusy = false;
|
|
||||||
if (payload.progress === 100) {
|
if (payload.progress === 100) {
|
||||||
|
client.isBusy = false;
|
||||||
if (objectKey === 'fullResultsData') {
|
if (objectKey === 'fullResultsData') {
|
||||||
// Get match count per text from results.data only for fullResultsData
|
// Get match count per text from results.data only for fullResultsData
|
||||||
results[objectKey].text_lookup = results.data.text_lookup;
|
results[objectKey].text_lookup = results.data.text_lookup;
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
// Results class bundleing the different data objects.
|
// Results class bundleing the different data objects.
|
||||||
class Results {
|
class Results {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.data = new Data();
|
this.data = new Data();
|
||||||
this.metaData = new MetaData();
|
this.metaData = new MetaData();
|
||||||
this.fullResultsData = new Data();
|
this.fullResultsData = new Data();
|
||||||
this.subResultsData = new Data();
|
this.subResultsData = new Data();
|
||||||
this.inspectResultsData = new Data();
|
this.inspectResultsData = new Data();
|
||||||
console.info('Initialized the Results object.');
|
console.info('Initialized the Results object.');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset all the data objects in the results class and thus emptying them.
|
// Reset all the data objects in the results class and thus emptying them.
|
||||||
|
@ -58,20 +58,11 @@ class ResultsList extends List {
|
|||||||
this.notificationListeners = {};
|
this.notificationListeners = {};
|
||||||
this.knownHTMLElements = new Set();
|
this.knownHTMLElements = new Set();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* // TODO:
|
|
||||||
* Init function that gets all needed HTML Elements. Implement this, or not?
|
|
||||||
* Or build a check into the get HTMLElements function if element already exists.
|
|
||||||
* Also think about saving alle elements in resultsList.es.nameOfElement
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to clear/reset some class field values. Usefull if a new query
|
* Function to clear/reset some class field values. Usefull if a new query
|
||||||
* hase been issued by the user.
|
* hase been issued by the user.
|
||||||
*/
|
*/
|
||||||
resetFields() {
|
resetFields() {
|
||||||
this.addToSubResultsIdsToShow = new Set();
|
|
||||||
this.addToSubResultsStatus = {};
|
this.addToSubResultsStatus = {};
|
||||||
this.subResultsIndexes = {};
|
this.subResultsIndexes = {};
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ function queryDataPreparingCallback(resultsList, detail) {
|
|||||||
'#query-results-create',
|
'#query-results-create',
|
||||||
'#sub-results-indexes-display',
|
'#sub-results-indexes-display',
|
||||||
'#nr-marked-matches',
|
'#nr-marked-matches',
|
||||||
]);
|
]);
|
||||||
// show or enable some things for the user
|
// show or enable some things for the user
|
||||||
resultsList.interactionsMenu.classList.toggle('hide', false);
|
resultsList.interactionsMenu.classList.toggle('hide', false);
|
||||||
resultsList.queryResultsUserFeedback.classList.toggle('hide', false);
|
resultsList.queryResultsUserFeedback.classList.toggle('hide', false);
|
||||||
|
@ -181,13 +181,13 @@ function createFullResults(resultsList, results) {
|
|||||||
resultsList.fullResultsCreate.innerText = 'Creating...';
|
resultsList.fullResultsCreate.innerText = 'Creating...';
|
||||||
resultsList.fullResultsCreate.insertAdjacentHTML('afterbegin',
|
resultsList.fullResultsCreate.insertAdjacentHTML('afterbegin',
|
||||||
loadingSpinnerHTML);
|
loadingSpinnerHTML);
|
||||||
|
// .keys() is for a zero based array. I think...
|
||||||
let dataIndexes = [...Array(results.data.match_count).keys()];
|
let dataIndexes = [...Array(results.data.match_count).keys()];
|
||||||
// Empty fullResultsData so that no previous data is used.
|
// Empty fullResultsData so that no previous data is used.
|
||||||
results.fullResultsData.init();
|
results.fullResultsData.init();
|
||||||
resultsList.notifyClient('get-results', { resultsType: 'full-results',
|
resultsList.notifyClient('get-results', {resultsType: 'full-results',
|
||||||
dataIndexes: dataIndexes,
|
dataIndexes: dataIndexes,
|
||||||
resultsList: resultsList,
|
resultsList: resultsList,});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,10 +204,9 @@ function createSubResults(resultsList, results) {
|
|||||||
loadingSpinnerHTML);
|
loadingSpinnerHTML);
|
||||||
// Empty subResultsData so that no previous data is used.
|
// Empty subResultsData so that no previous data is used.
|
||||||
results.subResultsData.init();
|
results.subResultsData.init();
|
||||||
resultsList.notifyClient('get-results', { resultsType: 'sub-results',
|
resultsList.notifyClient('get-results', {resultsType: 'sub-results',
|
||||||
dataIndexes: dataIndexes,
|
dataIndexes: dataIndexes,
|
||||||
resultsList: resultsList,
|
resultsList: resultsList,});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 3. Open download modal when full results export button is pressed
|
// 3. Open download modal when full results export button is pressed
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
<div class="card-content" id="result-list" style="overflow: hidden;">
|
<div class="card-content" id="result-list" style="overflow: hidden;">
|
||||||
<div id="interactions-menu" class="row hide"
|
<div id="interactions-menu" class="row hide"
|
||||||
style="margin-bottom: 0px;">
|
style="margin-bottom: 0px;">
|
||||||
|
{# Importing menus for query settings, export etc. #}
|
||||||
{% include 'interactions/infos.html.j2' %}
|
{% include 'interactions/infos.html.j2' %}
|
||||||
{% include 'interactions/export.html.j2' %}
|
{% include 'interactions/export.html.j2' %}
|
||||||
{% include 'interactions/create.html.j2' %}
|
{% include 'interactions/create.html.j2' %}
|
||||||
|
@ -6,16 +6,6 @@ result.-->
|
|||||||
<h6 style="margin-top: 0px;">Infos</h6>
|
<h6 style="margin-top: 0px;">Infos</h6>
|
||||||
<div class="divider" style="margin-bottom: 10px;"></div>
|
<div class="divider" style="margin-bottom: 10px;"></div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12">
|
|
||||||
<button id="show-meta-data"
|
|
||||||
class="waves-effect
|
|
||||||
waves-light
|
|
||||||
btn-flat
|
|
||||||
flat-interaction"
|
|
||||||
type="submit">Corpus Meta Data
|
|
||||||
<i class="material-icons left">info_outline</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<button id="loading-matches"
|
<button id="loading-matches"
|
||||||
class="waves-effect
|
class="waves-effect
|
||||||
@ -36,6 +26,16 @@ result.-->
|
|||||||
<div class="determinate"></div>
|
<div class="determinate"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col s12">
|
||||||
|
<button id="show-meta-data"
|
||||||
|
class="waves-effect
|
||||||
|
waves-light
|
||||||
|
btn-flat
|
||||||
|
flat-interaction"
|
||||||
|
type="submit">Corpus Meta Data
|
||||||
|
<i class="material-icons left">info_outline</i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<button id="show-corpus-files"
|
<button id="show-corpus-files"
|
||||||
class="waves-effect
|
class="waves-effect
|
||||||
|
Loading…
Reference in New Issue
Block a user