summaryrefslogtreecommitdiff
path: root/static
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
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')
-rw-r--r--static/main_map.js15
-rw-r--r--static/styles.css27
2 files changed, 40 insertions, 2 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) {
diff --git a/static/styles.css b/static/styles.css
index b29314e..5bb4377 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -184,17 +184,40 @@ height:90%;
width:280px;
}
-#detail_footer{
+.detail_footer{
text-align:center;
}
-#detail_footer a{
+.detail_footer a{
color:white;
background-color:purple;
display:block;
text-decoration:None;
}
+#category_detail{
+display:None;
+padding:6px 10px;
+border: 1px solid black;
+position:absolute;
+z-index:5;
+top:120px;
+bottom:180px;
+left:100px;
+right:50px;
+margin-right:360px;
+background-color:#FFF;
+opacity:0.9;
+-moz-border-radius:10px;
+-webkit-border-radius:10px;
+border-radius:10px;
+}
+
+#category_desc_content{
+overflow:auto;
+height:88%;
+}
+
#map{
position:absolute;
border: 1px solid black;