]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/edit.rhtml
0.6c: bunch of minor improvements and bugfixes
[rails.git] / app / views / site / edit.rhtml
index 5b1b8110818c75f17cb8f1aacb77fd7bfc605338..c5d40d9a8ee987ae30c3605a4b4880ccf561b3f5 100644 (file)
 <script type="text/javascript">
   var brokenContentSize = $("content").offsetWidth == 0;
   var fo = new SWFObject("/potlatch/potlatch.swf?d="+Math.round(Math.random()*1000), "potlatch", "700", "600", "6", "#FFFFFF");
+  var changesaved = true;
+
+  window.onbeforeunload=function() {
+       if (!changesaved) {
+         return "You have unsaved changes. (To save in Potlatch, you should deselect the current way or point.)";
+       }
+  }
 
   function doSWF(lat,lon,sc) {
     if (sc < 11) sc = 11;