mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-08 07:38:54 +01:00
Fix window.onbeforeunload, nascondo main loading
https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload
This commit is contained in:
parent
d395b5a4b5
commit
73e66a2786
13
editor.php
13
editor.php
@ -273,12 +273,19 @@ if ($read_only || !empty($block_edit)) {
|
|||||||
content_was_modified = false;
|
content_was_modified = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
// questo controllo blocca il modulo vendita al banco, dopo la lettura con barcode, appare il messaggio di conferma
|
// questo controllo blocca il modulo vendita al banco, dopo la lettura con barcode, appare il messaggio di conferma
|
||||||
window.onbeforeunload = function(){
|
window.onbeforeunload = function(e){
|
||||||
if(content_was_modified) {
|
if(content_was_modified) {
|
||||||
return 'Uscire senza salvare?';
|
var dialogText = "Uscire senza salvare?";
|
||||||
|
e.returnValue = dialogText;
|
||||||
|
$("#main_loading").fadeOut();
|
||||||
|
return dialogText;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if ($advanced_sessions) {
|
if ($advanced_sessions) {
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user