Replace use of Event with jQuery methods

Versions of OpenLayers before 2.12 provided a global Event object
but this has now been removed, so use jQuery methods instead.
This commit is contained in:
Tom Hughes 2012-06-30 14:57:18 +01:00
parent f4a54c18c8
commit 98445b2ab9
2 changed files with 3 additions and 5 deletions

View file

@ -37,7 +37,7 @@
$("#tr-changeset-" + id).removeClass("selected");
}
function init() {
$(document).ready(function () {
var map = createMap("changeset_list_map", {
controls: [
new OpenLayers.Control.Navigation(),
@ -84,7 +84,5 @@
<% else %>
map.zoomToExtent(proj(bounds));
<% end %>
}
Event.observe(window, "load", init);
});
</script>

View file

@ -288,7 +288,7 @@ end
$(document).ready(function () {
$("#exportanchor").click(function (e) {
$.ajax({ url: "<%= url_for :controller => :export, :action => :start %>" });
Event.stop(e);
e.preventDefault();
});
<% if params[:action] == 'export' -%>