diff options
| author | etienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864> | 2010-04-05 16:27:14 +0000 |
|---|---|---|
| committer | etienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864> | 2010-04-05 16:27:14 +0000 |
| commit | 04371d1191f094eb6a2e1c16a37fe2f6a590ee36 (patch) | |
| tree | f8b6b396338dc706c195e183ed4ee70c116b9463 /chimere/static | |
| parent | 64004ac6382cc439dcd07876db95e5e85b9b2e0c (diff) | |
| download | Chimère-04371d1191f094eb6a2e1c16a37fe2f6a590ee36.tar.bz2 Chimère-04371d1191f094eb6a2e1c16a37fe2f6a590ee36.zip | |
Make available a simple version of the site #91 - Permalink don't check the categories anymore with dynamic categories #90
git-svn-id: http://www.peacefrogs.net/svn/chimere/trunk@75 9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864
Diffstat (limited to 'chimere/static')
| -rw-r--r-- | chimere/static/base.js | 11 | ||||
| -rw-r--r-- | chimere/static/main_map.js | 32 | ||||
| -rw-r--r-- | chimere/static/styles.css | 90 |
3 files changed, 86 insertions, 47 deletions
diff --git a/chimere/static/base.js b/chimere/static/base.js index 1eba699..91710af 100644 --- a/chimere/static/base.js +++ b/chimere/static/base.js @@ -42,6 +42,17 @@ function hide(id){ document.getElementById(id).style.display = 'None'; } +/* show or hide a panel */ +function showHide(id){ + var item = document.getElementById(id); + if (item.style.display == 'block'){ + hide(id); + } else { + show(id); + } +} + + function saveExtent() { /* save the current extent in a cookie */ if(!map) return; diff --git a/chimere/static/main_map.js b/chimere/static/main_map.js index 67d1bee..fb736f5 100644 --- a/chimere/static/main_map.js +++ b/chimere/static/main_map.js @@ -115,6 +115,9 @@ var markers = new Array(); var layerMarkers; var layerVectors; +var simple = false; +var first = true; + var currentPopup; var currentFeature; var clicked = false; @@ -239,7 +242,8 @@ function updateCategories(response){ /* load geo objects with an AJAX request */ function loadGeoObjects(){ - updateCheckedCategories(); + if (!first){ updateCheckedCategories(); } + first = false; /* 0 stand for all categories */ if (!checked_categories) checked_categories = '0'; var uri = extra_url + "getGeoObjects/" + checked_categories; @@ -255,7 +259,9 @@ function setGeoObjects(response){ /* clean the marker layer */ if (currentPopup) { currentPopup.hide(); - hide('detail'); + if (!simple){ + hide('detail'); + } } layerVectors = new OpenLayers.Layer.Vector("Vector Layer"); map.addLayer(layerVectors); @@ -329,7 +335,9 @@ function putMarker(layer, mark) { if (currentPopup == this.popup) { this.popup.hide(); clicked = false; - hide('detail'); + if (!simple){ + hide('detail'); + } } else { currentPopup.hide(); showPop(this); @@ -359,9 +367,11 @@ function putMarker(layer, mark) { var hidePopUp = function (evt) { if (clicked) { - currentPopup.hide(); - clicked = false; - hide('detail'); + currentPopup.hide(); + clicked = false; + if (!simple){ + hide('detail'); + } } } @@ -378,8 +388,13 @@ function updateDetail(pk){ /* update the detail panel from an http response */ function setDetail(response){ if (response.responseText.indexOf('no results') == -1) { - document.getElementById('detail').innerHTML = response.responseText; - show('detail'); + if (!simple){ + document.getElementById('detail').innerHTML = response.responseText; + show('detail'); + } else { + currentPopup.setContentHTML("<div class='cloud'>" + + response.responseText + "</div>"); + } } } @@ -491,6 +506,7 @@ function init(){ } } } + checked_categories = p_checked_categories.join('_'); } } /* if not zoom to the extent in cookies */ diff --git a/chimere/static/styles.css b/chimere/static/styles.css index 217cba3..8094bba 100644 --- a/chimere/static/styles.css +++ b/chimere/static/styles.css @@ -145,11 +145,9 @@ padding:2px; #panel{ padding:0; border:1px solid #888; -height:200px; position:absolute; z-index:5; top:50px; -bottom:20px; right:18px; width:300px; background-color:#FFF; @@ -159,6 +157,10 @@ opacity:0.8; border-radius:10px; } +.simple #panel{ +top:5px; +} + #areas{ padding:0; border:1px solid #888; @@ -297,6 +299,19 @@ right:8px; z-index:0; } +.simple #map{ +margin:0px; +padding:0px; +height:100%; +margin:0; +padding:0; +top:0; +bottom:0; +left:0; +right:0; +z-index:0; +} + .news{ } @@ -311,12 +326,17 @@ padding:10px; margin:0; } -#categories{ +#panel #categories{ margin:0; padding:0; width:290px; height:160px; overflow:auto; +z-index:5; +} + +.simple #panel #categories{ +display:None; } #categories input { @@ -392,42 +412,6 @@ p.warning{ text-align:center; } -#logos{ -text-align:center; -z-index:5; -position: absolute; -bottom:46px; -left:18px; -} - -#logos ul{ -margin:0; -margin-right:20px; -padding:4px; -border:1px solid #888; --moz-border-radius: 10px; --webkit-border-radius: 10px; -border-radius: 10px; -background-color:white; -height:40px; -float:left; -} - -#logos li{ -display:inline; -} - -#logos img{ -height:40px; -text-decoration:None; -border-width:0; -} - -#logos li a{ -text-decoration:None; -border-width:0; -} - #welcome_button { display: block; position: absolute; @@ -459,6 +443,10 @@ background-color:#b488ff; text-align:center; } +.simple .olControlPermalink { +display:None; +} + .olControlPermalink a{ color:white; font-size:14px; @@ -470,3 +458,27 @@ text-decoration:none; bottom:12px; left:220px; } + +.simple .olControlScaleLine { +bottom:50px; +left:10px; +} + +.simple .olControlPanPanel{ +top:40px; +} + +.simple .olControlZoomPanel{ +top:100px; +} + +.simple .cloud h2{ +font-size:14px; +text-align:center; +margin:0; +padding:0; +background-color:transparent; +color:#b488ff; +} +.simple .cloud img{display:None;} + |
