summaryrefslogtreecommitdiff
path: root/static/main_map.js
diff options
context:
space:
mode:
authoretienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864>2009-11-24 00:36:13 +0000
committeretienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864>2009-11-24 00:36:13 +0000
commit6c847e3c20d75f91525733e959f00098840dbc6d (patch)
tree57ff1031c73006b3d6a58f148efd48cded74c2b9 /static/main_map.js
parent128a8cf8e2d7238dea16b1ffac507eb2b7c6c6c5 (diff)
downloadChimère-6c847e3c20d75f91525733e959f00098840dbc6d.tar.bz2
Chimère-6c847e3c20d75f91525733e959f00098840dbc6d.zip
Provide a description for categories - #61
git-svn-id: http://www.peacefrogs.net/svn/chimere/trunk@41 9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864
Diffstat (limited to 'static/main_map.js')
-rw-r--r--static/main_map.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/static/main_map.js b/static/main_map.js
index 7a9e070..bf69a9a 100644
--- a/static/main_map.js
+++ b/static/main_map.js
@@ -296,6 +296,21 @@ function setDetail(response){
}
}
+/* show the detail of a category */
+function displayCategoryDetail(category_id) {
+ var uri = "/" + extra_url + "getDescriptionDetail/" + category_id;
+ OpenLayers.loadURL(uri, '', this, setCategoryDetail);
+}
+
+/* update the category detail panel from an http response */
+function setCategoryDetail(response){
+ if (response.responseText.indexOf('no results') == -1) {
+ document.getElementById('category_detail').innerHTML =
+ response.responseText;
+ show('category_detail');
+ }
+}
+
/* new permalink createParams method - update when facilities are given to
personalize the permalink */
function createParams(center, zoom, layers) {