- function resizeContent() {
- var content = $("content");
- var rightMargin = parseInt(getStyle(content, "right"));
- var bottomMargin = parseInt(getStyle(content, "bottom"));
+ function remoteEditHandler(event) {
+ var extent = getMapExtent();
+ var loaded = false;
+
+ $("#linkloader").load(function () { loaded = true; });
+ $("#linkloader").attr("src", "http://127.0.0.1:8111/load_and_zoom?left=" + extent.left + "&top=" + extent.top + "&right=" + extent.right + "&bottom=" + extent.bottom);
+
+ setTimeout(function () {
+ if (!loaded) alert("<%=j t('site.index.remote_failed') %>");
+ }, 1000);
+
+ return false;
+ }
+
+ function installEditHandler() {
+ $("#remoteanchor").click(remoteEditHandler);
+
+ <% if preferred_editor == "remote" %>
+ $("#editanchor").click(remoteEditHandler);