Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YDA-5406 - Added beforeunload event handling when data upload is active.
Browse files Browse the repository at this point in the history
kaur16 committed Oct 18, 2023
1 parent bacb3cf commit 26db0f6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions research/static/research/js/research.js
Original file line number Diff line number Diff line change
@@ -25,6 +25,12 @@ $(function () {
startBrowsing()
}

window.onbeforeunload = function(e){
if(!$('#uploads').hasClass('hidden')) {
return e.returnValue
}
}

$('.btn-go-to-vault').on('click', function () {
window.location.href = '/vault/?dir=' + encodeURIComponent('/' + $(this).attr('vault-area'))
})

0 comments on commit 26db0f6

Please sign in to comment.