Skip to content

Commit

Permalink
YDA-5406 - Modified code to check upload progress before unload.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaur16 committed Oct 18, 2023
1 parent 0685cc6 commit a9f0306
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion deposit/static/deposit/js/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ $(function () {

window.onbeforeunload = function(e){
if(!$('#uploads').hasClass('hidden')) {
return e.returnValue
if ($('.uploads-total-progress-bar-perc').html() != '100%') {
return e.returnValue
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion research/static/research/js/research.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ $(function () {

window.onbeforeunload = function(e){
if(!$('#uploads').hasClass('hidden')) {
return e.returnValue
if ($('.uploads-total-progress-bar-perc').html() != '100%') {
return e.returnValue
}
}
}

Expand Down

0 comments on commit a9f0306

Please sign in to comment.