Versions of OpenLayers before 2.12 provided a global Event object
but this has now been removed, so use jQuery methods instead.
$("#tr-changeset-" + id).removeClass("selected");
}
- function init() {
+ $(document).ready(function () {
var map = createMap("changeset_list_map", {
controls: [
new OpenLayers.Control.Navigation(),
<% else %>
map.zoomToExtent(proj(bounds));
<% end %>
- }
-
- Event.observe(window, "load", init);
+ });
</script>
$(document).ready(function () {
$("#exportanchor").click(function (e) {
$.ajax({ url: "<%= url_for :controller => :export, :action => :start %>" });
- Event.stop(e);
+ e.preventDefault();
});
<% if params[:action] == 'export' -%>