summaryrefslogtreecommitdiff
path: root/static/main_map.js
diff options
context:
space:
mode:
authoretienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864>2008-11-23 22:37:53 +0000
committeretienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864>2008-11-23 22:37:53 +0000
commit4f3c2faf2844c23167c6b79cc6536b7257356d7b (patch)
tree91787bb07bbd3a978430502e97adae7c9fb1bad4 /static/main_map.js
parent6f97020d6b56f19d37a0941b299e68b2e8837d68 (diff)
downloadChimère-4f3c2faf2844c23167c6b79cc6536b7257356d7b.tar.bz2
Chimère-4f3c2faf2844c23167c6b79cc6536b7257356d7b.zip
Displaying details differently. Adding a news system.
git-svn-id: http://www.peacefrogs.net/svn/chimere/trunk@3 9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864
Diffstat (limited to 'static/main_map.js')
-rw-r--r--static/main_map.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/static/main_map.js b/static/main_map.js
index 1d5d845..0bcf972 100644
--- a/static/main_map.js
+++ b/static/main_map.js
@@ -97,10 +97,14 @@ function putMarker(mark) {
/*feature.closeBox = false;*/
feature.pk = mark.properties.pk;
feature.popupClass = OpenLayers.Class(OpenLayers.Popup.FramedCloud);
- feature.data.popupContentHTML = "<div class='cloud'>" + mark.properties.name + "<br/>&nbsp;</div>";
+ feature.data.popupContentHTML = "<div class='cloud'>";
+ feature.data.popupContentHTML += mark.properties.name;
+ feature.data.popupContentHTML += "<br/><div id='popup_link'>\
+<a href='javascript:showDetail()'>";
+ feature.data.popupContentHTML += gettext("Show details");
+ feature.data.popupContentHTML += "</a></div></div>";
feature.data.overflow = 'hidden';
var marker = feature.createMarker();
-
/* manage markers events */
var markerClick = function (evt) {
currentFeature = this;
@@ -145,13 +149,19 @@ function updateDetail(pk){
/* update the detail panel from an http response */
function setDetail(response){
if (response.responseText.indexOf('no results') == -1) {
- document.getElementById('detail_content').innerHTML = response.responseText;
+ document.getElementById('detail').innerHTML = response.responseText;
}
}
+
+/* show the detail windows */
+function showDetail(){
+ document.getElementById('detail').style.display = 'block';
+}
+
/* hide content of detail panel */
function hideDetail(){
- document.getElementById('detail_content').innerHTML = '';
+ document.getElementById('detail').style.display = 'None';
}
/* main initialisation function */