From 7959c652201f98cdf9d07b67e8aa9b1c91406b68 Mon Sep 17 00:00:00 2001 From: Amit Kapadia Date: Mon, 24 Dec 2012 15:15:33 -0600 Subject: [PATCH] fixes for FF --- app/controllers/explore.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/explore.coffee b/app/controllers/explore.coffee index 821f9f5..7a321cc 100644 --- a/app/controllers/explore.coffee +++ b/app/controllers/explore.coffee @@ -207,7 +207,7 @@ class Explore extends Controller @hideAnimalMenu() target = e.target - species = e.target.innerText + species = target.textContent or target.innerText index = target.parentElement.dataset.index or target.parentElement.parentElement.dataset.index @["species#{index}"] = target.dataset.animal or target.parentElement.dataset.animal @@ -304,6 +304,7 @@ class Explore extends Controller do (cacheKey) => $.ajax({url: url, beforeSend: @ajaxStart}) .pipe( (response) -> + response = JSON.parse(response) # Need to parse the JSON for FF to work rows = response.rows rows.map((d) -> d.the_geom = JSON.parse(d.the_geom)) return rows