Skip to content

Commit

Permalink
Fix #3733 - stop spinner on json export (#3735)
Browse files Browse the repository at this point in the history
  • Loading branch information
dnil authored Dec 21, 2022
1 parent ddbae5b commit 5fc45e3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ About changelog [here](https://keepachangelog.com/en/1.0.0/)
- Handle connection timeout when sending requests requests to external web services
- Validate any ClinVar submission regardless of its status
- Empty Phenopackets import crashes
- Stop Spinner on Phenopacket JSON download
### Changed
- Updated ClinVar submission instructions

Expand Down
6 changes: 6 additions & 0 deletions scout/server/blueprints/cases/templates/cases/case.html
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ <h5 class="modal-title" id="exampleModalLabel">Edit synopsis</h5>
container: 'body'})
})


$(function(){
function getHpoTerms(query, process) {
$.get("{{ url_for('cases.hpoterms') }}", {query: query}, function(data) {
Expand Down Expand Up @@ -596,6 +597,11 @@ <h5 class="modal-title" id="exampleModalLabel">Edit synopsis</h5>

});

function StopSpinner() {
// Avoid page spinner being stuck on file download
$(window).unbind('beforeunload');
return true;
}
function SidebarCollapse () {
$('.menu-collapsed').toggleClass('d-none');
$('.sidebar-submenu').toggleClass('d-none');
Expand Down
4 changes: 2 additions & 2 deletions scout/server/blueprints/cases/templates/cases/phenotype.html
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ <h6 class="mt-3"><span class="fa fa-stethoscope"></span>&nbsp;Phenotype terms (<
<button class="btn btn-secondary form-control" id="import-phenotype-modal-btn" data-bs-toggle="modal" data-bs-target="#import-phenotype">Import</button>
</div>
<div class="col">
<form method="POST" action="{{ url_for('cases.phenotype_export', institute_id=institute._id, case_name=case.display_name) }}">
<button class="btn btn-secondary form-control" id="export-phenotype-button" type="submit" data-bs-toggle='tooltip' title="Export Phenopacket JSON for affected individual">Export</button>
<form method="POST" action="{{ url_for('cases.phenotype_export', institute_id=institute._id, case_name=case.display_name) }}" onsubmit="return StopSpinner()">
<button class="btn btn-secondary form-control" id="export-phenotype-button" type="submit" data-bs-toggle="tooltip" title="Export Phenopacket JSON for affected individual">Export</button>
</form>
</div>
</div>
Expand Down

0 comments on commit 5fc45e3

Please sign in to comment.