summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
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;