diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-06-04 20:21:56 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-06-04 20:21:56 +0200 |
| commit | 7af3588c0ab756a491827f2cc17c6ab0a597a298 (patch) | |
| tree | c3abb4accf58f3c3ff956bc4966f82db02270664 /templates/chimere | |
| parent | 6276e56a0c0b847ffc7dd36ff226a7042e0293d0 (diff) | |
| parent | 9debc5422a42e743e8a7de6365cec7971c4a1c7d (diff) | |
| download | Chimère - projet Saclay-saclay-mobile.tar.bz2 Chimère - projet Saclay-saclay-mobile.zip | |
Merge branch 'saclay' into saclay-mobilesaclay-mobile
Conflicts:
static/saclay/css/saclay.css
static/saclay/css/styles.css
templates/chimere/base.html
templates/chimere/detail.html
templates/chimere/main_map.html
Diffstat (limited to 'templates/chimere')
| -rw-r--r-- | templates/chimere/base.html | 101 | ||||
| -rw-r--r-- | templates/chimere/blocks/map.html | 23 | ||||
| -rw-r--r-- | templates/chimere/blocks/map_menu.html | 14 | ||||
| -rw-r--r-- | templates/chimere/blocks/news.html | 8 | ||||
| -rw-r--r-- | templates/chimere/blocks/share_bar.html | 7 | ||||
| -rw-r--r-- | templates/chimere/blocks/submited.html | 6 | ||||
| -rw-r--r-- | templates/chimere/blocks/welcome.html | 4 | ||||
| -rw-r--r-- | templates/chimere/detail.html | 221 | ||||
| -rw-r--r-- | templates/chimere/main_map.html | 238 | ||||
| -rw-r--r-- | templates/chimere/main_map_simple.html | 116 |
10 files changed, 453 insertions, 285 deletions
diff --git a/templates/chimere/base.html b/templates/chimere/base.html index 9bca36c..8f13830 100644 --- a/templates/chimere/base.html +++ b/templates/chimere/base.html @@ -1,43 +1,58 @@ -{% extends "base.html" %}
-{% load chimere_tags i18n %}
-{% block extra_head %}
-<link rel="shortcut icon" href="{{ STATIC_URL }}saclay/images/favicon.png"/>
-<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/styles.css" />
-<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/print.css" media='print'/>
-<link rel="stylesheet" href="{{ STATIC_URL }}saclay/css/styles.css" />
-{% for css in EXTRA_CSS %}<link rel="stylesheet" href="{{ css }}" />{% endfor %}
-<link rel="stylesheet" href="{{ STATIC_URL }}saclay/css/print.css" media='print'/>
-{% if MOBILE %}
-<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/mobile.css" />
-<link rel="stylesheet" href="{{ STATIC_URL }}saclay/css/mobile.css" />
-<script src="{{ STATIC_URL }}chimere/js/mobile.chimere.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}saclay/js/mobile.chimere.js" type="text/javascript"></script>{%endif%}
-{% if css_area %}
-<link rel="stylesheet" href="{{ css_area }}" />{% endif %}
-{% endblock %}
-
-<!--
-{% block header %}
-<noscript>
- <div id="no-js-message">
- <p id='no-js' class='warning'>{% trans "You must enable JavaScript in your browser to display Chimère."%}</p>
- </div>
-</noscript>
- {% block page_title %}
- {% include "chimere/blocks/page_title.html" %}
- {% endblock %}
- {% block actions %}
- {% include "chimere/blocks/actions.html" %}
- {% endblock %}
-{% endblock %}
--->
-{% block content %}
- {% block top %}{% endblock %}
- {% block message_map %}{% endblock %}
- {% block message_edit %}{% endblock %}
- {% block bottom %}{% endblock %}
-{% endblock %}
-{% block footer %}
- {% include "chimere/blocks/footer.html" %}
-{% endblock %}
-
+{% extends "base.html" %} +{% load chimere_tags i18n %} +{% block extra_head %} +<link rel="shortcut icon" href="{{ STATIC_URL }}saclay/images/favicon.png"/> +<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/styles.css" /> +<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/print.css" media='print'/> +<link rel="stylesheet" href="{{ STATIC_URL }}saclay/css/styles.css" /> +{% for css in EXTRA_CSS %}<link rel="stylesheet" href="{{ css }}" />{% endfor %} +<link rel="stylesheet" href="{{ STATIC_URL }}saclay/css/print.css" media='print'/> +{% if MOBILE %} +<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/mobile.css" /> +<link rel="stylesheet" href="{{ STATIC_URL }}saclay/css/mobile.css" /> +<script src="{{ STATIC_URL }}chimere/js/mobile.chimere.js" type="text/javascript"></script> +<script src="{{ STATIC_URL }}saclay/js/mobile.chimere.js" type="text/javascript"></script>{%endif%} +{% if css_area %} +<link rel="stylesheet" href="{{ css_area }}" />{% endif %} + +<!-- Piwik --> +<script type="text/javascript"> + var _paq = _paq || []; + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + (function() { + var u="https://piwik.proxience.net/"; + _paq.push(['setTrackerUrl', u+'piwik.php']); + _paq.push(['setSiteId', 3]); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; + g.defer=true; g.async=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); + })(); +</script> +<noscript><p><img src="https://piwik.proxience.net/piwik.php?idsite=3" style="border:0;" alt="" /></p></noscript> +<!-- End Piwik Code --> +{% endblock %} +{% block header %} +{% comment %} +<-- app mobile !--> +<noscript> + <div id="no-js-message"> + <p id='no-js' class='warning'>{% trans "You must enable JavaScript in your browser to display Chimère."%}</p> + </div> +</noscript> + {% block page_title %} + {% include "chimere/blocks/page_title.html" %} + {% endblock %} + {% block actions %} + {% include "chimere/blocks/actions.html" %} + {% endblock %} +{% endcomment %} +{% endblock %} +{% block content %} + {% block top %}{% endblock %} + {% block message_map %}{% endblock %} + {% block message_edit %}{% endblock %} + {% block bottom %}{% endblock %} +{% endblock %} +{% block footer %} + {% include "chimere/blocks/footer.html" %} +{% endblock %} diff --git a/templates/chimere/blocks/map.html b/templates/chimere/blocks/map.html index 9e37b3f..6273576 100644 --- a/templates/chimere/blocks/map.html +++ b/templates/chimere/blocks/map.html @@ -7,7 +7,7 @@ $(function(){ $('#cluster_list').dialog({'autoOpen':false, 'resizable':false, 'width':340, - 'dialogClass':'no-titlebar'}); + 'dialogClass':'no-titlebar-small'}); }); // --> </script> @@ -27,16 +27,15 @@ $(function(){ <!-- //LIB iOS var connectWebViewJavascriptBridge = function(callback) { - if (window.WebViewJavascriptBridge) { - callback(WebViewJavascriptBridge); - } else { - document.addEventListener('WebViewJavascriptBridgeReady', function() { - callback(WebViewJavascriptBridge); - }, false); - } + if (window.WebViewJavascriptBridge) { + callback(WebViewJavascriptBridge); + } else { + document.addEventListener('WebViewJavascriptBridgeReady', function() { + callback(WebViewJavascriptBridge); + }, false); + } }; //fin lib ios - var routing_panel_open = function(){ $('#frm_categories').hide(); $('#chimere_itinerary_panel').show(); @@ -125,7 +124,7 @@ $(function(){ '{{STATIC_URL}}saclay/images/routing_step.png', new OpenLayers.Size(37, 42), new OpenLayers.Pixel(-(37/2), -42)); - var numZoomLevels = 6; + var numZoomLevels = 7; var maxZoomLevel = 19; var resolutions; var zoomOffset; @@ -155,6 +154,8 @@ $(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 %} + {% if p_routing_transport %}chimere_init_options["routing_transport"] = "{{ p_routing_transport }}";{% endif %} + {% if p_routing_speed %}chimere_init_options["routing_speed"] = "{{ p_routing_speed }}";{% endif %} chimere_init_options["icon_offset"] = new OpenLayers.Pixel({{icon_offset_x}}, {{icon_offset_y}}); chimere_init_options['marker_hover_offset'] = new OpenLayers.Pixel(7, 20); @@ -176,6 +177,8 @@ $(function(){ $('#maps').chimere('zoom', {'area':{{zoom}} }); {% endif %} + $('#{{map_id}}').chimere('addJSON', "{{STATIC_URL}}saclay/json/limites.json"); + // init layer selection $(function() { {% for layer_name, js, def in map_layers %} diff --git a/templates/chimere/blocks/map_menu.html b/templates/chimere/blocks/map_menu.html new file mode 100644 index 0000000..38fb4a8 --- /dev/null +++ b/templates/chimere/blocks/map_menu.html @@ -0,0 +1,14 @@ +{% load i18n %} +<div id='chimere_map_menu'> + <ul> + {% if routing %} + <li id='map_menu_from' class='routing_item'>{% trans "From" context "routing" %}</li> + <li id='map_menu_step' class='routing_item'>{% trans "Add a step" context "routing" %}</li> + <li id='map_menu_to' class='routing_item'>{% trans "To" context "routing" %}</li> + <li id='map_menu_clear' class='routing_item'>{% trans "Clear the itinerary" context "routing" %}</li> + {% endif%} + <li id='map_menu_zoomin'>{% trans "Zoom in" %}</li> + <li id='map_menu_zoomout'>{% trans "Zoom out" %}</li> + <li id='map_menu_center'>{% trans "Center the map here" %}</li> + </ul> +</div> diff --git a/templates/chimere/blocks/news.html b/templates/chimere/blocks/news.html index 84dfe04..3788b64 100644 --- a/templates/chimere/blocks/news.html +++ b/templates/chimere/blocks/news.html @@ -1,5 +1,4 @@ {% load i18n sanitize chimere_tags %} -{% if news_lst %} <script type='text/javascript'> <!-- $(function(){ @@ -14,6 +13,7 @@ $(function(){ <div id='news' style='display:none'> <h2>{% trans "News" %}</h2> <div class='news'> + {% if news_lst %} {% for news in news_lst %} <div class='info'> {% if news.title %} @@ -34,7 +34,11 @@ $(function(){ </p> </div> {%endfor%} + {% else %} + <div class='info'> + <em>{% trans "No news today."%}</em> + </div> + {% endif %} </div> </div> -{% endif %} diff --git a/templates/chimere/blocks/share_bar.html b/templates/chimere/blocks/share_bar.html index 73177fc..aaa9fc4 100644 --- a/templates/chimere/blocks/share_bar.html +++ b/templates/chimere/blocks/share_bar.html @@ -4,12 +4,11 @@ <a href='{{share_network.1}}'>{{share_network.0}}</a> {% endfor %}{%else%} <ul class='share'> - <li class='share-send'><a class='share_link share_id_{{share_networks.0.0}}{% if email_only %}_single{%endif%}' href='{{share_networks.0.1}}'>{% trans "Email" %}</a></li> + <li class='share-send'><a class='share_link share_id_{{share_networks.0.0}}{% if email_only %}_single{%endif%}' href='{{share_networks.0.1}}'><img src="{{share_network.0.2}}" alt="{{share_network.0.0}}"/></a></li> {% if not email_only %}<li class='share-icon'><a href="#">{% trans "Share" %}</a></li>{% for share_network in share_networks %} - {%if forloop.counter0%} - <li class='shared' style='display:none'><a class='share_link share_id_{{share_network.0}}' href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li>{%endif%} + <li class='shared'><a class='share_link share_id_{{share_network.0}}' href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li> {% endfor %} - <li class='shared' style='display:none'><a href='{% url chimere:feeds-global %}'><img src='{{STATIC_URL}}chimere/img/feed.png' alt='Feeds'/></a></li>{%endif%} + <li class='shared'><a href='{% url chimere:feeds-global %}'><img src='{{STATIC_URL}}chimere/img/feed.png' alt='Feeds'/></a></li>{%endif%} </ul>{% endif %} <script type='text/javascript'> <!-- diff --git a/templates/chimere/blocks/submited.html b/templates/chimere/blocks/submited.html index 93016c5..5e72617 100644 --- a/templates/chimere/blocks/submited.html +++ b/templates/chimere/blocks/submited.html @@ -2,8 +2,8 @@ <div class='edit' id='submited-window'> <p><strong>Merci pour votre contribution au projet !</strong></p> -<p>En proposant un nouvel élément, vous contribuez à enrichir la carte avec des données libres. Une fois validée, votre contribution sera disponible selon les termes de la licence <a href='https://creativecommons.org/licenses/by-sa/3.0/fr/'>Creative Commons Paternité - Pas d’Utilisation Commerciale 2.0 France</a>. Vous devez être l’auteur des éléments que vous nous faites partager ou bien vous être assuré de l’accord de leur auteur pour cette mise à disposition. Ceci concerne les textes, photos et tout contenu multimedia.</p> -<p>N’hésitez pas à nous contacter pour toute question : <a href='mailto:carteouverte@terreetcite.org'>carteouverte@terreetcite.org</a>.</p> +<p>En proposant un nouvel élément, vous contribuez à enrichir la carte avec des données libres. Une fois validée, votre contribution sera disponible selon les termes de la licence <a href='https://creativecommons.org/licenses/by-nc/2.0/fr/'>Creative Commons Paternité - Pas d’Utilisation Commerciale 2.0 France</a>. Vous devez être l’auteur des éléments que vous nous faites partager ou bien vous être assuré de l’accord de leur auteur pour cette mise à disposition. Ceci concerne les textes, photos et tout contenu multimedia.</p> +{% if contact_email %}<p>N’hésitez pas à nous contacter pour toute question : <a href='mailto:{{contact_email}}'>{{contact_email}}</a>.</p>{% endif%} </div> <script type='text/javascript'> <!-- @@ -11,7 +11,7 @@ $("#submited-window").dialog({ modal: true, dialogClass:'no-titlebar-small', - width:300, + width:340, resizable:false, beforeClose: function() { window.location = "{{index_url}}"; diff --git a/templates/chimere/blocks/welcome.html b/templates/chimere/blocks/welcome.html index b811257..8d7add2 100644 --- a/templates/chimere/blocks/welcome.html +++ b/templates/chimere/blocks/welcome.html @@ -7,7 +7,9 @@ $(function(){ $('#welcome video').each(function(index){$(this).pause()}); $('#welcome audio').each(function(index){$(this).pause()}); $("#welcome").dialog({width:826, height:410, dialogClass:'welcome-dialog' - {% if not display %}, autoOpen:false{% endif %}}); + {% if not display %}, autoOpen:false{% endif %}, + open: function () { $("#welcome_content").scrollTop(0); } + }); }); // --> </script> diff --git a/templates/chimere/detail.html b/templates/chimere/detail.html index 52165fc..5d386e0 100644 --- a/templates/chimere/detail.html +++ b/templates/chimere/detail.html @@ -1,108 +1,113 @@ -{% load i18n sanitize chimere_tags %}
-<a href='#' class='close_img'>{% trans "Close"%}</a>
-<h4>{{ marker.name }}</h4>
-<div id='detail_content'>
- {% if marker.default_pictures or marker.default_pictures or marker.default_multimedia_items%}
- <div class='small-gallery'>
- {% for picture in marker.default_pictures %}
- {% multimedia_render picture %}
- {%endfor%}
- {% for multimedia_item in marker.default_multimedia_items %}
- {% multimedia_render multimedia_item %}
- {%endfor%}
- </div>
- {%endif%}
- <div>
- {% if dated %}
- <p id='detail_start_date'><label>{% trans "Date:" %}</label> <span>{{marker.start_date|date:"D d M Y"}}
- {% if marker.end_date %} - {{marker.end_date|date:"D d M Y"}}</p>{% endif %}</span>
- {% endif %}
- {% if marker.description %}
- <div class='description description_short' id='description_short_{{marker.pk}}'>{{ marker.short_desc|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}{% if marker.description != marker.short_desc%}...{%endif%}</div>
- {% if marker.description != marker.short_desc%}
- <div id='description_long_{{marker.pk}}' class='description description_long'>{{ marker.description|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}</div>
- {% endif %}
- {% endif %}
- {% for property in marker.getProperties %}{% if property.value %}
- <div class='properties' id='{{property.propertymodel.getAttrName}}'><strong>{{property.propertymodel.name}}</strong> : {% if 'http://' in property.value %}<a href='{{ property.value|sanitize:""}}'>{%endif%}{{ property.value|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}{% if 'http://' in property.value %}</a>{%endif%}</div>
- {%endif%}{% endfor %}
- {% if marker.multimedia_items %}
- <a href='#' id='show_gallery_link'>{% trans "Show multimedia gallery" %}</a>
- {% endif %}
- </div>
-</div>
-<div id='detail_footer'>
-{% if marker.description and marker.description != marker.short_desc %}
- <p class='read_more' id='read_more_{{marker.pk}}'>{% trans "Read more" %}</p>
- <p class='read_less' id='read_less_{{marker.pk}}'>{% trans "Read less" %}</p>
-{% endif %}
- <div id='detail-action-bar'>
- <a class='detail_from' href='#'>{% trans "From" context "routing" %}</a>
- | <a class='detail_to' href='#'>{% trans "To" context "routing" %}</a>
- </div>
- {% comment %}
- <a href='{% if marker.route %}{% url chimere:editroute-item area_name_slash|default_if_none:"" marker.route.pk "" %}{%else%}{% url chimere:edit-item area_name_slash|default_if_none:"" marker.pk "" %}{%endif%}'>
- {% trans "Submit a modification" %}
- </a>
- {% endcomment %}
-</div>
-{% if marker.multimedia_items %}
-<div id='gallery-{{marker.pk}}' class='gallery'>
- <div class='tabs'>
- <ul>{% for item in marker.multimedia_items %}
- <li><a href="#tab-{{ forloop.counter }}">{{ item.name }}</a></li>{% endfor %}
- </ul>
- {% for multimedia_item in marker.multimedia_items %}
- <div id="tab-{{ forloop.counter }}" class='{% ifequal multimedia_item.multimedia_type.media_type 'V' %}video{% else %}other{% endifequal %}'>
- {% multimedia_render multimedia_item %}
- </div>{% endfor %}
- </div>
-</div>
-{% endif %}
-<script language='javascript' type='text/javascript'>
-<!--
-$('html').addClass('js-on');
-$(function(){
- $("#gallery-{{marker.pk}}").dialog({title:"{{marker.name}}", autoOpen: false,
- height: "auto", width: "auto", dialogClass:'no-titlebar'});
- $('div.media-player').jmeEmbedControls();
- $('.tabs').tabs({
- select: function(event, ui) {
- //pause all medias
- $('video').each(function(index){$(this).pause()});
- $('audio').each(function(index){$(this).pause()});
- //start current tabvideo
- $('ui.panel video').each(function(index){
- //prevents a Flash-Bug in IE with newest Flash-Player
- $(this).reinitMedia({queue: true})
- .play()
- ;});
- $('ui.panel audio').each(function(index){
- //prevents a Flash-Bug in IE with newest Flash-Player
- $(this).reinitMedia({queue: true})
- .play()
- ;});
- }
- });
- $('.video div.media-player').bind('useractive', function(){
- $('div.media-controls', this).stop().animate({opacity: 1});
- }).bind('userinactive', function(){
- $('div.media-controls', this).stop().animate({opacity: 0});
- });
-});
-$("#gallery-{{marker.pk}}").bind( "dialogopen", function(event, ui) {
- $("#gallery-{{marker.pk}}").dialog("option", "height", 'auto');
- $("#gallery-{{marker.pk}}").dialog("option", "width", 'auto');
- $("#gallery-{{marker.pk}}").dialog("option", "position", ['center', 'center']);
-});
-$("#gallery-{{marker.pk}}").bind( "dialogclose", function(event, ui) {
- //pause all medias
- $('video').each(function(index){$(this).pause()});
- $('audio').each(function(index){$(this).pause()});
-});
-$('#show_gallery_link').click(function(){
- $("#gallery-{{marker.pk}}").dialog('open');
- return false;
-});
-// -->
-</script>
+{% load i18n sanitize chimere_tags %} +<a href='#' class='close_img'>{% trans "Close"%}</a> +<h4>{{ marker.name }}</h4> +<div id='detail_content'> + {% if marker.default_pictures or marker.default_pictures or marker.default_multimedia_items%} + <div class='small-gallery'> + {% for picture in marker.default_pictures %} + {% multimedia_render picture %} + {%endfor%} + {% for multimedia_item in marker.default_multimedia_items %} + {% multimedia_render multimedia_item %} + {%endfor%} + {% for item in marker.multimedia_items %} + {% multimedia_render item %} + {%endfor%} + </div> + {%endif%} + <div> + {% if dated %} + <p id='detail_start_date'><label>{% trans "Date:" %}</label> <span>{{marker.start_date|date:"D d M Y"}} + {% if marker.end_date %} - {{marker.end_date|date:"D d M Y"}}</p>{% endif %}</span> + {% endif %} + {% if marker.description %} + <div id='description_long_{{marker.pk}}' class='description'>{{ marker.description|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}</div> + {% endif %} + {% for property in marker.getProperties %}{% if property.value %} + <div class='properties' id='{{property.propertymodel.getAttrName}}'><strong>{{property.propertymodel.name}}</strong> : {% if 'http://' in property.value or 'https://' in property.value %}<a href='{{ property.value|sanitize:""}}'>{%endif%}{{ property.value|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}{% if 'http://' in property.value or 'https://' in property.value %}</a>{%endif%}</div> + {%endif%}{% endfor %} + {% if marker.origin %} + <div class='origin'><label>Source :</label> {{marker.origin|safe}}</div> + {% if marker.multimedia_items %} + <a href='#' id='show_gallery_link'>{% trans "Show multimedia gallery" %}</a> + {% endif %} + </div> +</div> +<div id='detail_footer'> + <div id='detail-action-bar'> + {%if routing_enabled%}<a class='detail_from' href='#'>{% trans "From" context "routing" %}</a> + | <a class='detail_to' href='#'>{% trans "To" context "routing" %}</a> + | {% endif %}<a class='detail_zoomin' href='#'>{% trans "Zoom in" %}</a> + | <a class='detail_zoomout' href='#'>{% trans "Zoom out" %}</a> + </div> + <ul class='share'> + <li><a href="{{modif_by_email}}">{% trans "Propose a modification" %}</a></li> + <li class='sep'>–</li> + </ul> + {% share_bar marker.name %} + {% comment %} + <a href='{% if marker.route %}{% url chimere:editroute-item area_name_slash|default_if_none:"" marker.route.pk "" %}{%else%}{% url chimere:edit-item area_name_slash|default_if_none:"" marker.pk "" %}{%endif%}'> + {% trans "Submit a modification" %} + </a> + {% endcomment %} +</div> +{% if marker.multimedia_items %} +<div id='gallery-{{marker.pk}}' class='gallery'> + <div class='tabs'> + <ul>{% for item in marker.multimedia_items %} + <li><a href="#tab-{{ forloop.counter }}">{{ item.name }}</a></li>{% endfor %} + </ul> + {% for multimedia_item in marker.multimedia_items %} + <div id="tab-{{ forloop.counter }}" class='{% ifequal multimedia_item.multimedia_type.media_type 'V' %}video{% else %}other{% endifequal %}'> + {% multimedia_render multimedia_item %} + </div>{% endfor %} + </div> +</div> +{% endif %} +<script language='javascript' type='text/javascript'> +<!-- +$('html').addClass('js-on'); +$(function(){ + $("#gallery-{{marker.pk}}").dialog({title:"{{marker.name}}", autoOpen: false, + height: "auto", width: "auto", dialogClass:'no-titlebar'}); + $('div.media-player').jmeEmbedControls(); + $('.tabs').tabs({ + select: function(event, ui) { + //pause all medias + $('video').each(function(index){$(this).pause()}); + $('audio').each(function(index){$(this).pause()}); + //start current tabvideo + $('ui.panel video').each(function(index){ + //prevents a Flash-Bug in IE with newest Flash-Player + $(this).reinitMedia({queue: true}) + .play() + ;}); + $('ui.panel audio').each(function(index){ + //prevents a Flash-Bug in IE with newest Flash-Player + $(this).reinitMedia({queue: true}) + .play() + ;}); + } + }); + $('.video div.media-player').bind('useractive', function(){ + $('div.media-controls', this).stop().animate({opacity: 1}); + }).bind('userinactive', function(){ + $('div.media-controls', this).stop().animate({opacity: 0}); + }); +}); +$("#gallery-{{marker.pk}}").bind( "dialogopen", function(event, ui) { + $("#gallery-{{marker.pk}}").dialog("option", "height", 'auto'); + $("#gallery-{{marker.pk}}").dialog("option", "width", 'auto'); + $("#gallery-{{marker.pk}}").dialog("option", "position", ['center', 'center']); +}); +$("#gallery-{{marker.pk}}").bind( "dialogclose", function(event, ui) { + //pause all medias + $('video').each(function(index){$(this).pause()}); + $('audio').each(function(index){$(this).pause()}); +}); +$('#show_gallery_link').click(function(){ + $("#gallery-{{marker.pk}}").dialog('open'); + return false; +}); +// --> +</script> diff --git a/templates/chimere/main_map.html b/templates/chimere/main_map.html index 0e4ffd2..38c4bbe 100644 --- a/templates/chimere/main_map.html +++ b/templates/chimere/main_map.html @@ -1,114 +1,124 @@ -{% extends "chimere/base.html" %}
-{% load i18n unlocalize_point chimere_tags %}
-{% block extra_head %}
-{% head_jquery %}
-{% head_chimere %}
-{% head_jme %}
-{% head_form %}
-<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}saclay/js/SaclayCloud.js" type="text/javascript"></script>
-<script src="{{ STATIC_URL }}saclay/js/jquery.form.js" type="text/javascript"></script>
-
-<script type='text/javascript' language='javascript'>
- <!--
- var default_error_message = "{% trans "Error while loading the page... Refresh the page. If the problem persist contact the webmaster." %}";
- var edit_url = "{% url edit %}";
- var edit_event_url = "{% url edit-event %}";
- var edit_route_url = "{% url edit-route %}";
- // -->
-</script>
-<script src="{{ STATIC_URL }}saclay/js/interface.js" type="text/javascript"></script>
-{{ block.super }}
-{% endblock %}
-{% block message_edit %}{% endblock %}
-{% block sidebar %}
- <div class='sidebar-handler' id='sidebar-handler-hide'>
- </div>
- <!-- SUPPRIME POUR LA VUE MOBILE
- <div id='action-panel'>
- <ul id='map-actions' class='action'>
- <li id='action-categories' class='state-active'>
- <label>{% trans "Categories" %}</label>
- </li>{% if itinerary_form %}
- <li id='action-routing'>
- <label>{% trans "Routing" %}</label>
- </li>{% endif %}
- </ul>
- <ul id='edit-actions' class='action'>
- <li id='action-edit-marker' class='state-active'>
- <label>{% trans "Location" %}</label>
- </li>
- <li id='action-edit-route'>
- <label>{% trans "Wander" %}</label>
- </li>
- <li id='action-edit-event'>
- <label>{% trans "Event" %}</label>
- </li>
- </ul>
- </div>
- FIN SUPPRESSION POUR LA VUE -->
- <div id='panel'>
- <div id='map-panel'>
- <form action='.' method='post' name='frm_categories' id='frm_categories'>
- <div id='categories'>{# dynamic content #}
- </div>
- </form>
- {% routing %}
- </div>
- <div id='edit-panel'>
- <div id='frm-edit-marker'>{# dynamic content #}
- </div>
- <div id='frm-edit-route'>{# dynamic content #}
- </div>
- <div id='frm-edit-event'>{# dynamic content #}
- </div>
- </div>
- </div>
- <!-- SUPPRIME POUR LA VUE MOBILE
- <div class='footer' id='footer-panel'>
- {% if contact_email %}<a href='mailto:{{contact_email}}' id='contactus'>{% trans "contact us" %}</a> | {% endif %}
- <a href='{% url chimere:extra_page '' 'legal' %}' id='page-legal' class='dyn-page'>{% trans "terms of service, credits" %}</a>
- </div>
- FIN SUPPRESSION POUR LA VUE -->
-{% endblock %}
-{% block content %}
- <div id='category_description'>
- </div>
- <script type='text/javascript'>
- $(function(){
- $('#category_description').dialog({'autoOpen':false, width:630,
- 'dialogClass':'no-titlebar'});
- });
- </script>
- <div class='sidebar-handler' id='sidebar-handler-show'>
- </div>
- <div id='detail' class='ui-widget ui-corner-all'></div>
- {% if not itinerary_form %}<div class='map_button'>
- <a href='#' id='button-move-map' class='toggle-button toggle-button-active' onclick='toggleDrawOff();return false;'>
- {% trans "Move on the map" %}
- </a>
- <a href='#' id='button-draw-map' class='toggle-button toggle-button-inactive' onclick='toggleDrawOn();return false;'>
- {% trans "Draw" %}
- </a>
- </div>{% endif %}
- <div id='permalink'></div>
- {% display_news news_visible %}
- {{ block.super }}
- <div id='map-shadow'></div>
- <div id='default-message'></div>
-<script type="text/javascript">
- <!--
- $("#main-map").show();
- // -->
-</script>
- {% map_menu %}
- {% map 'main-map' %}
- <div id='chimere_message'></div>
- <script type='text/javascript'>
- $(function(){$('#chimere_message').dialog({'autoOpen':false,
- dialogClass:'no-titlebar-simple', position:'right bottom',
- resizable: false});});
- </script>
-{% endblock %}
-{% block footer %}
-{% endblock %}
+{% extends "chimere/base.html" %} +{% load i18n unlocalize_point chimere_tags %} +{% block extra_head %} +{% head_jquery %} +{% head_chimere %} +{% head_jme %} +{% head_form %} +<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js" type="text/javascript"></script> +<script src="{{ STATIC_URL }}saclay/js/SaclayCloud.js" type="text/javascript"></script> +<script src="{{ STATIC_URL }}saclay/js/jquery.form.js" type="text/javascript"></script> + +<script type='text/javascript' language='javascript'> + <!-- + var default_error_message = "{% trans "Error while loading the page... Refresh the page. If the problem persist contact the webmaster." %}"; + var edit_url = "{% url edit %}"; + var edit_event_url = "{% url edit-event %}"; + var edit_route_url = "{% url edit-route %}"; + // --> +</script> +<script src="{{ STATIC_URL }}saclay/js/interface.js" type="text/javascript"></script> +{{ block.super }} +{% endblock %} +{% block message_edit %}{% endblock %} +{% block sidebar %} + <div class='sidebar-handler' id='sidebar-handler-hide'> + </div> + {% comment %} + <!-- SUPPRIME POUR LA VUE MOBILE + <div id='action-panel'> + <ul id='map-actions' class='action'> + <li id='action-categories' class='state-active'> + <label>{% trans "Categories" %}</label> + </li>{% if itinerary_form %} + <li id='action-routing'> + <label>{% trans "Routing" %}</label> + </li>{% endif %} + </ul> + <ul id='edit-actions' class='action'> + <li id='action-edit-marker' class='state-active'> + <label>{% trans "Location" %}</label> + </li> + <li id='action-edit-route'> + <label>{% trans "Wander" %}</label> + </li> + <li id='action-edit-event'> + <label>{% trans "Event" %}</label> + </li> + </ul> + </div> + FIN SUPPRESSION POUR LA VUE --> + {% endcomment %} + <div id='panel'> + <div id='map-panel'> + <form action='.' method='post' name='frm_categories' id='frm_categories'> + <div id='categories'>{# dynamic content #} + </div> + </form> + {% routing %} + </div> + <div id='edit-panel'> + <div id='frm-edit-marker'>{# dynamic content #} + </div> + <div id='frm-edit-route'>{# dynamic content #} + </div> + <div id='frm-edit-event'>{# dynamic content #} + </div> + </div> + </div> + {% comment %} + <!-- SUPPRIME POUR LA VUE MOBILE + <div class='footer' id='footer-panel'> + {% if contact_email %}<a href='mailto:{{contact_email}}' id='contactus'>{% trans "contact us" %}</a> | {% endif %} + <a href='{% url chimere:extra_page '' 'legal' %}' id='page-legal' class='dyn-page'>{% trans "terms of service, credits" %}</a> + </div> + FIN SUPPRESSION POUR LA VUE --> + {% endcomment %} +{% endblock %} +{% block content %} + <div id='category_description'> + </div> + <script type='text/javascript'> + $(function(){ + $('#category_description').dialog({'autoOpen':false, width:630, + 'dialogClass':'no-titlebar'}); + }); + </script> + <div class='sidebar-handler' id='sidebar-handler-show'> + </div> + <div id='detail' class='ui-widget ui-corner-all'></div> + {% if not itinerary_form %}<div class='map_button'> + <a href='#' id='button-move-map' class='toggle-button toggle-button-active' onclick='toggleDrawOff();return false;'> + {% trans "Move on the map" %} + </a> + <a href='#' id='button-draw-map' class='toggle-button toggle-button-inactive' onclick='toggleDrawOn();return false;'> + {% trans "Draw" %} + </a> + </div>{% endif %} + <div id='permalink'></div> + {% if simple %} + {% display_welcome 0 %} + {%else%} + {% display_welcome news_visible %} + {% endif %} + {% display_news news_visible %} + {{ block.super }} + <div id='map-shadow'></div> + <div id='default-message'></div> +<script type="text/javascript"> + <!-- + $("#main-map").show(); + // --> +</script> + {% map_menu %} + {% map 'main-map' %} + <div id='chimere_message'></div> + <script type='text/javascript'> + $(function(){$('#chimere_message').dialog({'autoOpen':false, + dialogClass:'no-titlebar-simple', position:'right bottom', + resizable: false});}); + </script> +{% endblock %} +{% block footer %} + <p class='map-footer'>{% include "chimere/blocks/footer.html" %}</p> +{% endblock %} diff --git a/templates/chimere/main_map_simple.html b/templates/chimere/main_map_simple.html new file mode 100644 index 0000000..a14ea3f --- /dev/null +++ b/templates/chimere/main_map_simple.html @@ -0,0 +1,116 @@ +{% extends "chimere/base.html" %} +{% load i18n unlocalize_point chimere_tags %} +{% block extra_head %} +{% head_jquery %} +{% head_chimere %} +{% head_jme %} +{% head_form %} +<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js" type="text/javascript"></script> +<script src="{{ STATIC_URL }}saclay/js/SaclayCloud.js" type="text/javascript"></script> +<script src="{{ STATIC_URL }}saclay/js/jquery.form.js" type="text/javascript"></script> + +<script type='text/javascript' language='javascript'> + <!-- + var default_error_message = "{% trans "Error while loading the page... Refresh the page. If the problem persist contact the webmaster." %}"; + var edit_url = "{% url edit %}"; + var edit_event_url = "{% url edit-event %}"; + var edit_route_url = "{% url edit-route %}"; + // --> +</script> +<script src="{{ STATIC_URL }}saclay/js/interface.js" type="text/javascript"></script> +{{ block.super }} +{% endblock %} +{% block message_edit %}{% endblock %} +{% block sidebar %} + <div class='sidebar-handler' id='sidebar-handler-hide'> + </div> + <div id='action-panel'> + <ul id='map-actions' class='action'> + <li id='action-categories' class='state-active'> + <label>{% trans "Categories" %}</label> + </li>{% if itinerary_form %} + <li id='action-routing'> + <label>{% trans "Routing" %}</label> + </li>{% endif %} + </ul> + <ul id='edit-actions' class='action'> + <li id='action-edit-marker' class='state-active'> + <label>{% trans "Location" %}</label> + </li> + <li id='action-edit-route'> + <label>{% trans "Wander" %}</label> + </li> + <li id='action-edit-event'> + <label>{% trans "Event" %}</label> + </li> + </ul> + </div> + <div id='panel'> + <div id='map-panel'> + <form action='.' method='post' name='frm_categories' id='frm_categories'> + <div id='categories'>{# dynamic content #} + </div> + </form> + {% routing %} + </div> + <div id='edit-panel'> + <div id='frm-edit-marker'>{# dynamic content #} + </div> + <div id='frm-edit-route'>{# dynamic content #} + </div> + <div id='frm-edit-event'>{# dynamic content #} + </div> + </div> + </div> + <div class='footer' id='footer-panel'> + {% if contact_email %}<a href='mailto:{{contact_email}}' id='contactus'>{% trans "contact us" %}</a> | {% endif %} + <a href='{% url chimere:extra_page '' 'legal' %}' id='page-legal' class='dyn-page'>{% trans "terms of service, credits" %}</a> + </div> +{% endblock %} +{% block content %} + <div id='category_description'> + </div> + <script type='text/javascript'> + $(function(){ + $('#category_description').dialog({'autoOpen':false, width:630, + 'dialogClass':'no-titlebar'}); + }); + </script> + <div class='sidebar-handler' id='sidebar-handler-show'> + </div> + <div id='detail' class='ui-widget ui-corner-all'></div> + {% if not itinerary_form %}<div class='map_button'> + <a href='#' id='button-move-map' class='toggle-button toggle-button-active' onclick='toggleDrawOff();return false;'> + {% trans "Move on the map" %} + </a> + <a href='#' id='button-draw-map' class='toggle-button toggle-button-inactive' onclick='toggleDrawOn();return false;'> + {% trans "Draw" %} + </a> + </div>{% endif %} + <div id='permalink'></div> + {% if simple %} + {% display_welcome 0 %} + {%else%} + {% display_welcome news_visible %} + {% endif %} + {% display_news news_visible %} + {{ block.super }} + <div id='map-shadow'></div> + <div id='default-message'></div> +<script type="text/javascript"> + <!-- + $("#main-map").show(); + // --> +</script> + {% map_menu %} + {% map 'main-map' %} + <div id='chimere_message'></div> + <script type='text/javascript'> + $(function(){$('#chimere_message').dialog({'autoOpen':false, + dialogClass:'no-titlebar-simple', position:'right bottom', + resizable: false});}); + </script> +{% endblock %} +{% block footer %} + <p class='map-footer'>{% include "chimere/blocks/footer.html" %}</p> +{% endblock %} |
