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