diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-09-25 12:37:49 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2012-09-25 12:37:49 +0200 |
| commit | 512751c9bf026277d58e4a1cb904b444287d8cd2 (patch) | |
| tree | c027ac43cc5388f12e6eab47087dfacf4352f09c /chimere/static | |
| parent | 9011ad55d6b87736a5c5ab8448ba2a089bfa6fdd (diff) | |
| download | Chimère-512751c9bf026277d58e4a1cb904b444287d8cd2.tar.bz2 Chimère-512751c9bf026277d58e4a1cb904b444287d8cd2.zip | |
Main map: add a waiting image while loading markers/routes on the map
Diffstat (limited to 'chimere/static')
| -rw-r--r-- | chimere/static/chimere/css/styles.css | 20 | ||||
| -rw-r--r-- | chimere/static/chimere/js/jquery.chimere.js | 4 |
2 files changed, 24 insertions, 0 deletions
diff --git a/chimere/static/chimere/css/styles.css b/chimere/static/chimere/css/styles.css index f8ed3fe..336f6e2 100644 --- a/chimere/static/chimere/css/styles.css +++ b/chimere/static/chimere/css/styles.css @@ -596,6 +596,26 @@ table.inline-table td input[type=file]{ } +#waiting{ /* Fixed position to provide the vertical offset */ + position:fixed; + top:40%; + width:100%; + z-index:40002; + display:none; +} + +#waiting-content { + width:33px; + position:relative; + margin:0 auto; + background-color:white; + padding:10px; + border:1px solid black; +} + + + + /* openlayer customisation */ .olControlPermalink { display: block; diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js index 9ec51e6..7ad3a9b 100644 --- a/chimere/static/chimere/js/jquery.chimere.js +++ b/chimere/static/chimere/js/jquery.chimere.js @@ -229,6 +229,7 @@ OpenLayers.Layer.MapQuestOSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { * Load markers and route from DB */ loadGeoObjects: function () { + if($('#waiting').length){$('#waiting').show();} helpers.retrieve_checked_categories(); var ids = settings.checked_categories.join('_'); if (!ids) ids = '0'; @@ -251,6 +252,9 @@ OpenLayers.Layer.MapQuestOSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { error: function (data) { settings.layerMarkers.clearMarkers(); settings.layerVectors.removeAllFeatures(); + }, + complete: function () { + if($('#waiting').length){$('#waiting').hide();} } }); }, |
