mirror of
https://codeberg.org/scip/digiproof.git
synced 2025-12-16 20:21:00 +01:00
Changed the build process it generates a devel and a prod version
of the source, added some screenshots and a sample printout, couple bugfixes.
This commit is contained in:
21
js/confirm.js
Normal file
21
js/confirm.js
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
function confirminit() {
|
||||
window.onbeforeunload = function(e) {
|
||||
if(window.confirmExit) return confirmExit();
|
||||
};
|
||||
}
|
||||
|
||||
var hadConfirmExit = false;
|
||||
function checkUnsavedChanges() {
|
||||
if(App.store && App.store.isDirty && window.hadConfirmExit === false) {
|
||||
if(confirm("unsafed changes"))
|
||||
saveChanges();
|
||||
}
|
||||
}
|
||||
|
||||
function confirmExit() {
|
||||
hadConfirmExit = true;
|
||||
if(App.store && App.store.isDirty) {
|
||||
return "ok";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user