From 8f51cabece4b49c27c5bd7542837e47f8da3afed Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 16 Jun 2015 20:06:52 +0200 Subject: Re-integrate patch from v2.1 --- chimere/static/chimere/js/jquery.chimere.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'chimere/static') diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js index 4303e14..78cb3dc 100644 --- a/chimere/static/chimere/js/jquery.chimere.js +++ b/chimere/static/chimere/js/jquery.chimere.js @@ -575,6 +575,7 @@ OpenLayers.Layer.MapQuestOSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { content += ""; $('#cluster_list').html(content); $('#cluster_list').dialog('open'); + $("#cluster_list").on("dialogclose", methods.cleanCluster); settings.map.setCenter( feature.geometry.getBounds().getCenterLonLat()); // register after the display @@ -777,8 +778,8 @@ OpenLayers.Layer.MapQuestOSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { var id = this.id.substr(this.id.lastIndexOf("_")+1); helpers.zoom_to_subcategories([id]); }); - $(".toggle_category").bind("click", function (e) { - var item = $(this); + $(".toggle_category").parent().bind("click", function (e) { + var item = $(this).children('.toggle_category'); var id = item.attr('id').substr(item.attr('id').lastIndexOf("_")+1); methods.toggle_category(id); }); -- cgit v1.2.3