]> git.openstreetmap.org Git - rails.git/commitdiff
Don't register a setHome handler unless we have the flag checkbox
authorTom Hughes <tom@compton.nu>
Sun, 19 Apr 2009 11:00:37 +0000 (11:00 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 19 Apr 2009 11:00:37 +0000 (11:00 +0000)
prsent on the page.

app/views/user/_friend_map.rhtml

index 9bdb39aae50796a7d802dbdc22a4e5bd7ca315a3..33d6e1f8566c1665c52b58a50bc2e8d98c438f3b 100644 (file)
@@ -56,7 +56,9 @@
       var nearmarker = addMarkerToMap(new OpenLayers.LonLat(nearest[i].home_lon, nearest[i].home_lat), near_icon.clone(), description);
     }
 
       var nearmarker = addMarkerToMap(new OpenLayers.LonLat(nearest[i].home_lon, nearest[i].home_lat), near_icon.clone(), description);
     }
 
-    map.events.register("click", map, setHome);
+    if (document.getElementById('updatehome')) {
+      map.events.register("click", map, setHome);
+    }
   }        
 
   function setHome( e ) { 
   }        
 
   function setHome( e ) {