mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-04-07 01:34:22 +00:00
Add single inspect results download
This commit is contained in:
parent
e1f4b0f35e
commit
d6a19a9d7c
@ -223,6 +223,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
'#query-results-table',
|
'#query-results-table',
|
||||||
'#display-options-form-expert_mode',
|
'#display-options-form-expert_mode',
|
||||||
'.pagination',
|
'.pagination',
|
||||||
|
'#inspect-results-export',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -313,6 +314,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
* 2. Create sub-results
|
* 2. Create sub-results
|
||||||
* 3. Download full-results
|
* 3. Download full-results
|
||||||
* 4. Download sub-results
|
* 4. Download sub-results
|
||||||
|
* 5. Download single inspect-results
|
||||||
*/
|
*/
|
||||||
resultsList.fullResultsCreate.onclick = () => {
|
resultsList.fullResultsCreate.onclick = () => {
|
||||||
resultsList.fullResultsCreate.querySelector('i').classList.toggle('hide');
|
resultsList.fullResultsCreate.querySelector('i').classList.toggle('hide');
|
||||||
@ -336,7 +338,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
dataIndexes: dataIndexes});
|
dataIndexes: dataIndexes});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Before the downland events are added the needed modal is initialized.
|
* Before the download events are added the needed modal is initialized.
|
||||||
*/
|
*/
|
||||||
resultsList.queryResultsDownloadModal = M.Modal.init(resultsList.queryResultsDownloadModal);
|
resultsList.queryResultsDownloadModal = M.Modal.init(resultsList.queryResultsDownloadModal);
|
||||||
// Open download modal when full results export button is pressed
|
// Open download modal when full results export button is pressed
|
||||||
@ -346,7 +348,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
resultsList.downloadResultsJson.onclick = () => {
|
resultsList.downloadResultsJson.onclick = () => {
|
||||||
let filename = results.fullResultsData.createDownloadFilename('full-results');
|
let filename = results.fullResultsData.createDownloadFilename('full-results');
|
||||||
results.fullResultsData.addData(results.metaData);
|
results.fullResultsData.addData(results.metaData);
|
||||||
results.fullResultsData.downloadJSONRessource(filename, results.fullResultsData,
|
results.fullResultsData.downloadJSONRessource(filename,
|
||||||
|
results.fullResultsData,
|
||||||
resultsList.downloadResultsJson)};
|
resultsList.downloadResultsJson)};
|
||||||
}
|
}
|
||||||
// Open download modal when sub results export button is pressed
|
// Open download modal when sub results export button is pressed
|
||||||
@ -356,7 +359,19 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
resultsList.downloadResultsJson.onclick = () => {
|
resultsList.downloadResultsJson.onclick = () => {
|
||||||
let filename = results.subResultsData.createDownloadFilename('sub-results');
|
let filename = results.subResultsData.createDownloadFilename('sub-results');
|
||||||
results.subResultsData.addData(results.metaData);
|
results.subResultsData.addData(results.metaData);
|
||||||
results.subResultsData.downloadJSONRessource(filename, results.subResultsData,
|
results.subResultsData.downloadJSONRessource(filename,
|
||||||
|
results.subResultsData,
|
||||||
|
resultsList.downloadResultsJson)};
|
||||||
|
}
|
||||||
|
// Open download modal when inspect-results-export button is pressed
|
||||||
|
resultsList.inspectResultsExport.onclick = () => {
|
||||||
|
resultsList.queryResultsDownloadModal.open();
|
||||||
|
// add onclick to download JSON button and download the file
|
||||||
|
resultsList.downloadResultsJson.onclick = () => {
|
||||||
|
let filename = results.subResultsData.createDownloadFilename('inspect-results');
|
||||||
|
results.subResultsData.addData(results.metaData);
|
||||||
|
results.subResultsData.downloadJSONRessource(filename,
|
||||||
|
results.inspectResultsData,
|
||||||
resultsList.downloadResultsJson)};
|
resultsList.downloadResultsJson)};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a id="inspect-download-context" class="left waves-effect waves-light btn">
|
<a id="inspect-results-export" class="left waves-effect waves-light btn">
|
||||||
Export Single Context
|
Export Single Context
|
||||||
<i class="material-icons right">file_download</i>
|
<i class="material-icons right">file_download</i>
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user