From 59a277a289b5bde729cf338e227947ec8ee2e278 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 22 Oct 2013 13:04:12 +0200 Subject: JS: Manage marker with no pk --- chimere/static/chimere/js/jquery.chimere.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js index bb44011..39b3b61 100644 --- a/chimere/static/chimere/js/jquery.chimere.js +++ b/chimere/static/chimere/js/jquery.chimere.js @@ -790,6 +790,9 @@ OpenLayers.Layer.MapQuestOSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { marker.category_name = mark.properties.category_name; /* manage markers events */ var _popup = function() { + if (!feature.pk){ + return; + } /* show the popup */ if (settings.current_popup != null) { settings.current_popup.hide(); @@ -828,6 +831,10 @@ OpenLayers.Layer.MapQuestOSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { { methods.center_on_feature(); $('#chimere_map_menu').hide(); + if (!feature.pk){ + OpenLayers.Event.stop(evt); + return; + } // Default popup if (feature.popup && feature.popup.visible()) { if (settings.current_popup == feature.popup) { -- cgit v1.2.3