|
|
|
@ -677,6 +677,7 @@ function batchUpdate(){
|
|
|
|
|
}).then(function (response) { |
|
|
|
|
$("body").removeClass("loading"); |
|
|
|
|
localStorage.setItem('batchEntity', ''); |
|
|
|
|
sendStorage(); |
|
|
|
|
refresData(); |
|
|
|
|
}).catch(function (error) { |
|
|
|
|
$("body").removeClass("loading") |
|
|
|
@ -691,11 +692,14 @@ function batchUpdate(){
|
|
|
|
|
|
|
|
|
|
$(window).on('beforeunload', function(event) { |
|
|
|
|
let batchEntity = localStorage.getItem('batchEntity'); |
|
|
|
|
sendStorage(); |
|
|
|
|
if (batchEntity && batchEntity != '') { |
|
|
|
|
event.preventDefault() |
|
|
|
|
return event.returnValue = 'You have unsaved changes. Are you sure you want to leave this page?'; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const batchEntityData = localStorage.getItem('batchEntity'); |
|
|
|
|
window.parent.postMessage({ batchEntity: batchEntityData }, '*'); |
|
|
|
|
function sendStorage(){ |
|
|
|
|
const batchEntityData = localStorage.getItem('batchEntity'); |
|
|
|
|
window.parent.postMessage({ batchEntity: batchEntityData }, '*'); |
|
|
|
|
} |