X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=public%2Fjs%2Fsyj.js;h=4b7f01d9a39dda1f010856080f130cc806577a0f;hp=5400ff3afcd7b4fd20516aef480a178748c3d2f8;hb=1d1b5940442782d78f796d8608e63328e2e8783b;hpb=2d66d0fe742edb3d91af7f76154619ecbcf75c6d diff --git a/public/js/syj.js b/public/js/syj.js index 5400ff3..4b7f01d 100644 --- a/public/js/syj.js +++ b/public/js/syj.js @@ -225,7 +225,6 @@ var SYJView = { map: null, wkt: new OpenLayers.Format.WKT({ internalProjection: Mercator, externalProjection: WGS84 }), needsFormResubmit: false, - hasInitialGeom: false, init: function() { var externalGraphic, baseURL, baseLayer, layerOptions, extent, hidemessenger; @@ -285,7 +284,6 @@ var SYJView = { // XXX: ie has not guessed height of map main div yet during map // initialisation. Now, it will read it correctly. this.map.updateSize(); - this.hasInitialGeom = true; } else { extent = new OpenLayers.Bounds(gMaxExtent.minlon, gMaxExtent.minlat, gMaxExtent.maxlon, gMaxExtent.maxlat) .transform(WGS84, Mercator); @@ -396,8 +394,8 @@ var SYJView = { }, saveSuccess: function(transport) { - if (!this.hasInitialGeom) { // we have created a new path, change location - location = "idx/" + transport.responseText; + if (transport.responseJSON && (typeof transport.responseJSON.redirect === "string")) { + location = transport.responseJSON.redirect; return; }