Move export-related JS to export.js

This commit is contained in:
John Firebaugh 2012-10-05 16:11:54 -07:00 committed by Tom Hughes
parent 012d5b69c6
commit 52daf1dbc4
2 changed files with 283 additions and 281 deletions

View file

@ -108,17 +108,6 @@ $(document).ready(function () {
map.setCenter(centre, zoom);
});
$("#exportanchor").click(function (e) {
$.ajax({ url: $(this).data('url'), success: function (sidebarHtml) {
startExport(sidebarHtml);
}});
e.preventDefault();
});
if (window.location.pathname == "/export") {
$("#exportanchor").click();
}
$("#search_form").submit(function () {
var extent = unproj(map.getExtent());

View file

@ -1,4 +1,16 @@
function startExport(sidebarHtml) {
$(document).ready(function () {
$("#exportanchor").click(function (e) {
$.ajax({ url: $(this).data('url'), success: function (sidebarHtml) {
startExport(sidebarHtml);
}});
e.preventDefault();
});
if (window.location.pathname == "/export") {
$("#exportanchor").click();
}
function startExport(sidebarHtml) {
var vectors,
box,
transform,
@ -315,4 +327,5 @@ function startExport(sidebarHtml) {
validateControls();
}
}
}
});