X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/637799f1f57ab48254a5b6eaa0f78896ae41c456..104ba9c57ab55051988902dacc5e12a6b33554b2:/app/assets/javascripts/index/export.js diff --git a/app/assets/javascripts/index/export.js b/app/assets/javascripts/index/export.js index 02dcdd440..3d1dd3ce3 100644 --- a/app/assets/javascripts/index/export.js +++ b/app/assets/javascripts/index/export.js @@ -46,13 +46,12 @@ OSM.Export = function(map) { function validateControls() { $("#export_osm_too_large").toggle(getBounds().getSize() > OSM.MAX_REQUEST_AREA); + $("#export_commit").toggle(getBounds().getSize() < OSM.MAX_REQUEST_AREA); } page.pushstate = page.popstate = function(path) { $("#export_tab").addClass("current"); - $("#sidebar").removeClass("minimized"); - map.invalidateSize(); - $('#sidebar_content').load(path, page.load); + OSM.loadSidebarContent(path, page.load); }; page.load = function() { @@ -62,8 +61,10 @@ OSM.Export = function(map) { $("#maxlat, #minlon, #maxlon, #minlat").change(boundsChanged); $("#drag_box").click(enableFilter); + $("#sidebar_content .close").on("click", page.minimizeSidebar); update(); + return map.getState(); }; page.unload = function() {