diff --git a/web/app/static/js/modules/corpus_analysis/client/callbacks.js b/web/app/static/js/modules/corpus_analysis/client/callbacks.js index 2eaddb9dafc8adf08602f168b0f1e3ce378fa624..230cc195085ed4035ebcbdf20305d7742950752a 100644 --- a/web/app/static/js/modules/corpus_analysis/client/callbacks.js +++ b/web/app/static/js/modules/corpus_analysis/client/callbacks.js @@ -4,9 +4,11 @@ */ function saveMetaData() { let [payload, client, results, rest] = arguments; + client.notifyView('meta-data-recieving'); results.metaData.init(payload) console.info('Metada saved:', results); client.isBusy = false; + client.notifyView('meta-data-recieved'); } /** diff --git a/web/app/static/js/modules/corpus_analysis/view/callbacks.js b/web/app/static/js/modules/corpus_analysis/view/callbacks.js index 2ef4d1a689ed35def761a6fc792df69e058e6b0d..eeb71f0d78d5384adad863c739370c2dda944a73 100644 --- a/web/app/static/js/modules/corpus_analysis/view/callbacks.js +++ b/web/app/static/js/modules/corpus_analysis/view/callbacks.js @@ -35,8 +35,16 @@ function connectingCallback(resultsList, detail) { resultsList.analysisInitModal.open(); } -// Callback that closes teh loading modal from above. +// Callback that closes the loading modal from above. function connectedCallback(resultsList, detail) { + /** + * In the past this closed the init modal. But the init modal is now being + * closed when the meta data has also been recieved. See below. + */ +} + +// Callback that closes the loading modal from above. +function metaDataRecievedCallback(resultsList, detail) { resultsList.analysisInitModal.close(); } @@ -233,6 +241,7 @@ function resultsDataRecievedCallback(resultsList, detail) { export { connectingCallback, connectedCallback, + metaDataRecievedCallback, clientFailedCallback, queryDataPreparingCallback, queryDataRecievingCallback, diff --git a/web/app/static/js/modules/corpus_analysis/view/listeners.js b/web/app/static/js/modules/corpus_analysis/view/listeners.js index 1eb58c56aa5dbbfc745e5de1244c6d7951de099a..24aa51a3598fec442f7ebcc0ca5dd9516a2dac2b 100644 --- a/web/app/static/js/modules/corpus_analysis/view/listeners.js +++ b/web/app/static/js/modules/corpus_analysis/view/listeners.js @@ -10,6 +10,7 @@ import { connectingCallback, connectedCallback, + metaDataRecievedCallback, clientFailedCallback, queryDataPreparingCallback, queryDataRecievingCallback, @@ -38,6 +39,14 @@ function recieveClientNotification(eventType, resultsList) { console.info('View recieved notification:', caseIdentifier); connectedCallback(resultsList, event.detail); break; + case 'meta-data-recieving': + console.info('View recieved notification:', caseIdentifier); + break; + case 'meta-data-recieved': + console.info('View recieved notification:', caseIdentifier); + // execute + metaDataRecievedCallback(resultsList, event.detail); + break; case 'query-data-prepareing': console.info('View recieved notification:', caseIdentifier); // Hide all download buttons