From ba84d377dc19fe2b2c90e01ce6782d2ef6d79d14 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Thu, 20 Oct 2011 22:17:16 +0100 Subject: only add on change handler if there are open311 extra params --- web/js/map-OpenLayers.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'web/js/map-OpenLayers.js') diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js index dda50b1b9..e0b5a4436 100644 --- a/web/js/map-OpenLayers.js +++ b/web/js/map-OpenLayers.js @@ -317,7 +317,9 @@ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, { $('#form_category_row').html(data.category); /* Need to reset this here as it gets removed when we replace the HTML for the dropdown */ - $('#form_category').change( form_category_onchange ); + if ( data.has_open311 > 0 ) { + $('#form_category').change( form_category_onchange ); + } }); $('#side-form').show(); $('#side').hide(); -- cgit v1.2.3