diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-01-21 20:08:15 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-01-21 20:08:15 +0100 |
commit | 0a593ffbd7ca726f0b38224954456d180db2a574 (patch) | |
tree | 21ced1780ac5a40a2201034db58ab2cb4312031d | |
parent | f66510453c93bc6c395781bf1d11fbd47bbac86c (diff) | |
download | Chimère - projet de référence-0a593ffbd7ca726f0b38224954456d180db2a574.tar.bz2 Chimère - projet de référence-0a593ffbd7ca726f0b38224954456d180db2a574.zip |
OL3 adaptations
-rw-r--r-- | settings.py | 58 | ||||
-rw-r--r-- | templates/chimere/blocks/map.html | 10 | ||||
-rw-r--r-- | templates/chimere/blocks/news.html | 2 | ||||
-rw-r--r-- | templates/chimere/blocks/welcome.html | 2 | ||||
-rw-r--r-- | templates/chimere/detail.html | 4 | ||||
-rw-r--r-- | templates/chimere/main_map.html | 1 |
6 files changed, 20 insertions, 57 deletions
diff --git a/settings.py b/settings.py index 87e7b16..f29c799 100644 --- a/settings.py +++ b/settings.py @@ -29,7 +29,6 @@ JQUERY_JS_URLS = ('/javascript/jquery/jquery.js', '/javascript/jquery-ui/jquery-ui.js',) JQUERY_CSS_URLS = ('/javascript/jquery-ui/css/smoothness/jquery-ui.css', '/javascript/jquery-ui-themes/base/jquery.ui.all.css') -OSM_CSS_URLS = ["http://www.openlayers.org/api/theme/default/style.css"] GPSBABEL = '/usr/bin/gpsbabel' GPSBABEL_OPTIONS = 'simplify,crosstrack,error=0.005k' # simplify with an @@ -61,8 +60,8 @@ CHIMERE_DIRECTORY = True CHIMERE_ICON_WIDTH = 21 CHIMERE_ICON_HEIGHT = 25 -CHIMERE_ICON_OFFSET_X = -10 -CHIMERE_ICON_OFFSET_Y = -25 +CHIMERE_ICON_OFFSET_X = 10 +CHIMERE_ICON_OFFSET_Y = 25 # display picture inside the description by default or inside a galery? CHIMERE_MINIATURE_BY_DEFAULT = False @@ -331,55 +330,16 @@ if 'CHIMERE_SHARE_NETWORKS' not in globals(): STATIC_URL + 'chimere/img/identica.png'), ) -if 'MAP_JS_URLS' not in globals(): - global MAP_JS_URLS - MAP_JS_URLS = { - 'openlayers':[ - STATIC_URL + "openlayers/OpenLayers.js", - STATIC_URL + "openlayers/SimplePanZoom.js", - "http://www.openstreetmap.org/openlayers/OpenStreetMap.js", - STATIC_URL + "chimere/js/jquery.chimere-ol.js" - ], - 'leaflet':[ - STATIC_URL + "leaflet/leaflet.js", - STATIC_URL + "chimere/js/jquery.chimere-leaflet.js", - "http://maps.stamen.com/js/tile.stamen.js?v1.2.1" - ] - } - if DEBUG: - MAP_JS_URLS['leaflet'][0] = STATIC_URL + "leaflet/leaflet-src.js" - if CHIMERE_ENABLE_CLUSTERING: - MAP_JS_URLS['leaflet'] += [ - STATIC_URL + "leaflet-markercluster/leaflet.markercluster.js" - ] if 'MAP_CSS_URLS' not in globals(): global MAP_CSS_URLS - MAP_CSS_URLS = { - 'openlayers':["http://www.openlayers.org/api/theme/default/style.css"], - 'leaflet':[STATIC_URL + "leaflet/leaflet.css", - STATIC_URL + "leaflet-markercluster/MarkerCluster.css", - STATIC_URL + "leaflet-markercluster/MarkerCluster.Default.css", - ] - } - # key: [(url, condition)] - MAP_CONDITIONNAL_CSS_URLS = { - 'openlayers':[("http://www.openlayers.org/api/theme/default/style.css", - None)], - 'leaflet':[ - (STATIC_URL + "leaflet/leaflet.css", None), - (STATIC_URL + "leaflet/leaflet.ie.css", 'lte IE 8'), - (STATIC_URL + "leaflet-markercluster/MarkerCluster.css", None), - (STATIC_URL + "leaflet-markercluster/MarkerCluster.Default.css", None), - (STATIC_URL + "leaflet-markercluster/MarkerCluster.Default.ie.css", - 'lte IE 8'), - ] - } + MAP_CSS_URLS = [STATIC_URL + "ol3/ol.css"] -if 'OSM_JS_URLS' not in globals(): - global OSM_JS_URLS - OSM_JS_URLS = [STATIC_URL + "openlayers/OpenLayers.js", - STATIC_URL + "openlayers/SimplePanZoom.js", - "http://www.openstreetmap.org/openlayers/OpenStreetMap.js"] +if 'MAP_JS_URLS' not in globals(): + global MAP_JS_URLS + if DEBUG: + MAP_JS_URLS = [STATIC_URL + "ol3/ol-debug.js"] + else: + MAP_JS_URLS = [STATIC_URL + "ol3/ol.js"] if 'OSM_MOBILE_JS_URLS' not in globals(): global OSM_MOBILE_URLS OSM_JS_MOBILE_URLS = [STATIC_URL + "openlayers/OpenLayers.mobile.js", diff --git a/templates/chimere/blocks/map.html b/templates/chimere/blocks/map.html index 5c85ddb..57cfe95 100644 --- a/templates/chimere/blocks/map.html +++ b/templates/chimere/blocks/map.html @@ -57,8 +57,9 @@ $(function(){ {% if p_routing_end_lon %}chimere_init_options["routing_end_lon"] = {{ p_routing_end_lon }};{% endif %} {% if p_routing_end_lat %}chimere_init_options["routing_end_lat"] = {{ p_routing_end_lat }};{% endif %} {% if p_routing_steps %}chimere_init_options["routing_steps_lonlat"] = [{{ p_routing_steps }}];{% endif %} - chimere_init_options["icon_offset"] = new OpenLayers.Pixel({{icon_offset_x}}, - {{icon_offset_y}}); + //chimere_init_options["icon_offset"] = new OpenLayers.Pixel({{icon_offset_x}}, + // {{icon_offset_y}}); + chimere_init_options["icon_offset"] = ({{icon_offset_x}}, {{icon_offset_y}}); chimere_init_options["dynamic_categories"] = {{ dynamic_categories }}; {% if p_display_submited %}chimere_init_options["display_submited"] = {{ p_display_submited }};{% endif %} chimere_init_options["checked_categories"] = [{% for cc in checked_categories %}{% if forloop.counter0 > 0 %}, {% endif %}{{cc}}{% endfor %}]; @@ -82,11 +83,11 @@ $(function(){ } $("#main-map").chimere(chimere_init_options); {% if zoom %} - $('#maps').chimere('zoom', {'area':{{zoom}} }); + //$('#maps').chimere('zoom', {'area':{{zoom}} }); {% endif %} // init layer selection - $(function() { + /* $(function() { {% for layer_name, js, def in map_layers %} $('#layer_list').append("<li><input type='radio' value='{{forloop.counter0}}' name='layer_type' id='layer_{{forloop.counter}}'{% if def %} checked='checked'{% endif %}><label for='layer_{{forloop.counter}}'>{{layer_name}}</li>");{% endfor %} {% for subcat in subcat_layer %} @@ -108,6 +109,7 @@ $(function(){ }); highlight_selected_categories(); }); + */ </script> <div id='marker_hover'><div id='marker_hover_content'></div></div> <div id='cluster_list'></div> diff --git a/templates/chimere/blocks/news.html b/templates/chimere/blocks/news.html index b622ef0..3f4d9ae 100644 --- a/templates/chimere/blocks/news.html +++ b/templates/chimere/blocks/news.html @@ -2,7 +2,7 @@ {% if news_lst %} <script type='text/javascript'> $(function(){ - $('#news div.media-player').jmeEmbedControls(); + // $('#news div.media-player').jmeEmbedControls(); $('#news video').each(function(index){$(this).pause()}); $('#news audio').each(function(index){$(this).pause()}); {% if display %}$('#news').modal('show');{%endif%} diff --git a/templates/chimere/blocks/welcome.html b/templates/chimere/blocks/welcome.html index 95d6402..a1dfb56 100644 --- a/templates/chimere/blocks/welcome.html +++ b/templates/chimere/blocks/welcome.html @@ -2,7 +2,7 @@ {% if news_lst or welcome_message %} <script type='text/javascript'> $(function(){ - $('#welcome div.media-player').jmeEmbedControls(); + //$('#welcome div.media-player').jmeEmbedControls(); $('#welcome video').each(function(index){$(this).pause()}); $('#welcome audio').each(function(index){$(this).pause()}); {% if display %}$('#welcome').modal('show');{%endif%} diff --git a/templates/chimere/detail.html b/templates/chimere/detail.html index 247a53e..91505a1 100644 --- a/templates/chimere/detail.html +++ b/templates/chimere/detail.html @@ -106,7 +106,7 @@ function manage_tab_opening (event, ui) { } function manage_gallery_opening (event) { - $('div.media-player').jmeEmbedControls(); + // $('div.media-player').jmeEmbedControls(); $('.video div.media-player').bind('useractive', function(){ $('div.media-controls', this).stop().animate({opacity: 1}); }).bind('userinactive', function(){ @@ -139,7 +139,7 @@ $(document).ready(function(){ manage_tab_opening(e); }) - $('div.media-player').jmeEmbedControls(); + // $('div.media-player').jmeEmbedControls(); $("a[rel^='prettyPhoto']").prettyPhoto({ show_title: false, social_tools: '' diff --git a/templates/chimere/main_map.html b/templates/chimere/main_map.html index 90b9587..00de374 100644 --- a/templates/chimere/main_map.html +++ b/templates/chimere/main_map.html @@ -29,6 +29,7 @@ {% block search_box %} {% endblock %} {% block content %} {{block.super}} + <div id='popup'></div> <div id='main-map'></div> <script type="text/javascript"> $("#main-map").show(); |