diff --git a/javascript/LeftAndMain.js b/javascript/LeftAndMain.js index f755d65d..a99bee30 100644 --- a/javascript/LeftAndMain.js +++ b/javascript/LeftAndMain.js @@ -79,6 +79,7 @@ Behaviour.register({ '#MainMenu li' : { onclick : function(event) { + return LeftAndMain_window_unload(); // Confirm if there are unsaved changes window.location.href = this.getElementsByTagName('a')[0].href; Event.stop(event); } @@ -90,6 +91,14 @@ Behaviour.register({ w.focus(); return false; } + }, + + '#Logo' : { + onclick : function() { + var w = window.open(this.getElementsByTagName('a')[0].href); + w.focus(); + return false; + } } }) @@ -166,11 +175,12 @@ function isVisible(el) { LeftAndMain_window_unload = function() { window.exiting = true; // this is used by prototype - if(typeof autoSave == 'function') - autoSave(navigator.appName == "Microsoft Internet Explorer"); + if(typeof autoSave == 'function') { + return autoSave(true); + } } -Event.observe(window, 'beforeunload', LeftAndMain_window_unload); +// Event.observe(window, 'beforeunload', LeftAndMain_window_unload); /** * Unlock the locked status message. diff --git a/javascript/LeftAndMain_right.js b/javascript/LeftAndMain_right.js index 05da26e9..7dcf970b 100755 --- a/javascript/LeftAndMain_right.js +++ b/javascript/LeftAndMain_right.js @@ -410,7 +410,7 @@ function autoSave(confirmation, callAfter) { if(__callAfter) __callAfter(); } else { // Cancel was pressed, stay on the current page - return true; + return false; } } else { options.save();