Commit 5237ca28 authored by Ivan Tyagov's avatar Ivan Tyagov

Show an warning box ofor unsaved changes only if save button do exists in page.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34375 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6733484f
...@@ -250,7 +250,8 @@ var resizeIFrameOnLoad = function() {\n ...@@ -250,7 +250,8 @@ var resizeIFrameOnLoad = function() {\n
var changed = false;\n var changed = false;\n
function installUnsavedChangesWarning(warning_message) {\n function installUnsavedChangesWarning(warning_message) {\n
window.onbeforeunload = function() {\n window.onbeforeunload = function() {\n
if (changed) \n if ((changed)&&(getFirstElementByTagAndClassName("button", "save")))\n
// show an warning box only if save button do exists\n
return warning_message;\n return warning_message;\n
};\n };\n
};\n };\n
......
918 920
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment