diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/app.js | 7 | ||||
-rw-r--r-- | www/js/map-OpenLayers.js | 8 | ||||
-rw-r--r-- | www/js/views/around.js | 3 |
3 files changed, 17 insertions, 1 deletions
diff --git a/www/js/app.js b/www/js/app.js index 06b9e88..3caba69 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -129,6 +129,13 @@ var tpl = { localStorage.currentDraftID = null; }, + openExternal: function(e) { + e.preventDefault(); + var el = $(e.srcElement); + window.open(el.attr('href'), '_system'); + return false; + }, + initialize: function () { if ( this.initialized == 1 ) { return this; diff --git a/www/js/map-OpenLayers.js b/www/js/map-OpenLayers.js index e8defdf..9a0bf67 100644 --- a/www/js/map-OpenLayers.js +++ b/www/js/map-OpenLayers.js @@ -127,6 +127,9 @@ function fixmystreet_onload() { fixmystreet.map.removePopup(popup); popup.destroy(); feature.popup = null; + $('#view-my-reports').show(); + $('#login-options').show(); + $('#OpenLayers_Control_Crosshairs_crosshairs').show(); }); fixmystreet.markers.events.register( 'featureselected', fixmystreet.markers, function(evt) { var feature = evt.feature; @@ -134,11 +137,14 @@ function fixmystreet_onload() { var popup = new OpenLayers.Popup.FramedCloud("popup", feature.geometry.getBounds().getCenterLonLat(), null, - feature.attributes.title + "<br><a href=" + CONFIG.FMS_URL + "/report/" + feature.attributes.id + ">More details</a>", + feature.attributes.title + "<br><a onclick=\"FMS.openExternal(event); return false;\" href=\"" + CONFIG.FMS_URL + "/report/" + feature.attributes.id + "\">More details</a>", { size: new OpenLayers.Size(0,0), offset: new OpenLayers.Pixel(0,-40) }, true, onPopupClose); feature.popup = popup; fixmystreet.map.addPopup(popup); + $('#view-my-reports').hide(); + $('#login-options').hide(); + $('#OpenLayers_Control_Crosshairs_crosshairs').hide(); }); fixmystreet.map.addControl( fixmystreet.select_feature ); fixmystreet.select_feature.activate(); diff --git a/www/js/views/around.js b/www/js/views/around.js index 9bb1abe..ffc712f 100644 --- a/www/js/views/around.js +++ b/www/js/views/around.js @@ -74,6 +74,9 @@ } this.displayButtons(); FMS.locator.trackPosition(); + // FIXME: not sure why I need to do this + fixmystreet.select_feature.deactivate(); + fixmystreet.select_feature.activate(); }, positionUpdate: function( info ) { |