diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-09-21 10:36:49 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-09-21 10:36:49 +0200 |
commit | 1f3bcebdafa399d7c7c35f4d5a1904b5bfdf040a (patch) | |
tree | 073df5df41d3d38f2e8b1552baad51e66ed375e4 | |
parent | 5581b152ec6585ba286d61d0b5a688e10cbf6c7b (diff) | |
download | Chimère-1f3bcebdafa399d7c7c35f4d5a1904b5bfdf040a.tar.bz2 Chimère-1f3bcebdafa399d7c7c35f4d5a1904b5bfdf040a.zip |
Reorganize templates - remove dead templates
19 files changed, 220 insertions, 761 deletions
diff --git a/chimere/templates/chimere/base.html b/chimere/templates/chimere/base.html index 82f28c4..fc3afb8 100644 --- a/chimere/templates/chimere/base.html +++ b/chimere/templates/chimere/base.html @@ -8,6 +8,15 @@ {% if MOBILE %} <link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/mobile.css" /> <script src="{{ STATIC_URL }}chimere/js/mobile.chimere.js" type="text/javascript"></script>{%endif%} +<link rel="stylesheet" href="{{ STATIC_URL }}font-awesome/css/font-awesome.min.css" /> +<link rel="stylesheet" href="{{ STATIC_URL }}bootstrap/bootstrap.min.css" /> +<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/form-compat.css" /> +<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/extra-styles.css" /> +<script src="{{ STATIC_URL }}bootstrap/bootstrap.min.js" type="text/javascript"></script> + <script type='text/javascript'> + var has_search = {% if has_search %}true{% else %}false{% endif %}; + </script> +<script src="{{ STATIC_URL }}chimere/js/interface.js" type="text/javascript"></script> {% endblock %} {% block header %} <noscript> diff --git a/chimere/templates/chimere/blocks/actions.html b/chimere/templates/chimere/blocks/actions.html index 93debb0..e31e1cc 100644 --- a/chimere/templates/chimere/blocks/actions.html +++ b/chimere/templates/chimere/blocks/actions.html @@ -1,20 +1,61 @@ -<div id="topbar"> - <ul id='action' class='action'> - {% for action, subactions in actions %} - <li class='ui-widget ui-button ui-state-default ui-corner-all {% ifequal action.id action_selected.0 %} ui-state-active{% endifequal %}'> - <a href='{{ action.url }}' onclick='jQuery("#map").chimere("saveExtent");'>{{ action.label }}</a> - </li> - {% endfor %} - </ul> - <ul id='action-2' class='action'> +{% load i18n chimere_tags %}<div class="navbar navbar-default navbar-fixed-top"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + </div> + <div class="navbar-collapse collapse"> + + <div class='navbar-left'> + <ul class="nav nav-pills"> {% for action, subactions in actions %} {% ifequal action.id action_selected.0 %}{% if subactions %} {% for subaction in subactions %} - <li class='ui-widget ui-button ui-state-default ui-corner-all{% ifequal subaction.id action_selected.1 %} ui-state-active{% endifequal %}'> + <li{% ifequal subaction.id action_selected.1 %} class='active'{% endifequal %}> <a href='{{ subaction.url }}' onclick='saveExtent();'>{{ subaction.label }}</a> </li> {% endfor %} {% endif %}{% endifequal %} {% endfor %} - </ul> + {% if is_map %} + <li id='categories-lnk'{% if not has_search %} class='active'{%endif%}><a href='#categories' data-toggle='panel'><span class='fa fa-chimere-action fa-check-circle-o'></span> {% trans "Categories "%}</a></li> + {% if has_search %} + <li id='search-lnk' class='active'><a href='#search-box' data-toggle='panel'><span class="glyphicon glyphicon-search"></span> {% trans "Search" %}</a></li> + {% endif %} + {% if areas_visible %} + <li id='maps-lnk'><span class='fa fa-chimere-action fa-chimere-maps'></span>{% display_areas %}</li> + {% endif %} + {% comment %}OL3-TODO<li id='permalink-lnk'><span class='fa fa-chimere-action fa-bookmark'></span><span id='permalink'></span></li>{% endcomment %} + <li>{% routing %}</li> + <li id='news-lnk'> + <a data-toggle='modal' data-target="#news" href='#' id='news_button'><span class='fa fa-chimere-action fa-newspaper-o'></span><span class='lbl'>{% trans "News"%}</span></a> + </li> + <!-- <li id="simple_button-lnk"><a id='simple_button' href='{% url chimere:simple_index area_name_slash %}'><span class='fa fa-chimere-action fa-simplybuilt'></span><span class='lbl'> {% trans "Simple map" %}</span></a></li> --> + <li class='selection-sep'> </li> + {% endif %} + </ul> + </div> + + <div class='navbar-right'> + + <ul class="nav navbar-nav"> + <li class='selection-sep'> </li> + {% for action, subactions in actions %} + <li id='{{action.id}}-lnk'{% ifequal action.id action_selected.0 %} class="active"{% endifequal %}> + <a href='{{ action.url }}' onclick='jQuery("#map").chimere("saveExtent");'> + <span class='fa fa-chimere-action fa-chimere-{{action.id}}'></span> + <span class='lbl'>{{ action.label }}</span> + </a> + </li> + {% endfor %} + </ul> + + </div> + + </div> + </div> </div> + diff --git a/chimere/templates/chimere/blocks/categories.html b/chimere/templates/chimere/blocks/categories.html index c273ae4..b674e12 100644 --- a/chimere/templates/chimere/blocks/categories.html +++ b/chimere/templates/chimere/blocks/categories.html @@ -4,17 +4,17 @@ <li class='main_category'> <img class="control_image toggle_category" id="maincategory_img_{{category.id}}" alt="control" src="{{ STATIC_URL }}chimere/img/{% if category.selected %}minus.png{% else %}plus.png{% endif %}" /> <input type="checkbox" id='checkall_{{category.id}}'> - {% trans category.name %} - <img id="zoom_to_category_{{category.id}}" class="zoom_image zoom_to_category" alt='{% trans "Zoom to" %} {{category.name}}' src='{{ STATIC_URL }}chimere/img/zoom.png' /> + <span class='category_name'>{% trans category.name %}</span> + <span class="glyphicon glyphicon-zoom-in zoom_image zoom_to_category" id="zoom_to_category_{{category.id}}"></span> <ul class='subcategories' id='maincategory_{{category.id}}'{% if not category.selected %} style='display:None'{% endif %}> {% for sub_category in lst_sub_categories %} <li id='li_sub_{{sub_category.id}}' class='subcategory'> <input type='checkbox' name='category_{{sub_category.id}}' id='category_{{sub_category.id}}'{% if sub_category.selected %} checked='checked'{% endif %}/> <label for='category_{{sub_category.id}}'> - <img alt='{{ sub_category.name }}' src='{{ MEDIA_URL }}{{sub_category.icon.image}}'/> + <span class='cat_image'><img alt='{{ sub_category.name }}' src='{{ MEDIA_URL }}{{sub_category.icon.image}}'/></span> {% trans sub_category.name %} </label> - <img id="zoom_to_subcategory_{{sub_category.id}}" class="zoom_image zoom_to_subcategory" alt='{% trans "Zoom to" %} {{sub_category.name}}' src='{{ STATIC_URL }}chimere/img/zoom.png' /> + <span class="glyphicon glyphicon-zoom-in zoom_image zoom_to_subcategory" id="zoom_to_subcategory_{{sub_category.id}}"></span> </li> {% endfor %} {% if category.description %} diff --git a/chimere/templates/chimere/blocks/live_coordinates.html b/chimere/templates/chimere/blocks/live_coordinates.html index b4b7d1e..0853ff7 100644 --- a/chimere/templates/chimere/blocks/live_coordinates.html +++ b/chimere/templates/chimere/blocks/live_coordinates.html @@ -1,7 +1,6 @@ <script type='text/javascript'> var resolutions; var zoomOffset; - // OpenLayers.ImgPath = '%schimere/img/'; var EPSG_DISPLAY_PROJECTION = epsg_display_projection = 'EPSG:%s'; var EPSG_PROJECTION = epsg_projection = 'EPSG:%s'; var CENTER_LONLAT = centerLonLat = ol.proj.transform(%s, @@ -10,7 +9,6 @@ {{extra_js|safe}} var chimere_init_options = {}; chimere_init_options["input_id"] = 'id_{{name}}'; - //chimere_init_options["default_icon"] = new OpenLayers.Icon('%schimere/img/marker-green.png', new OpenLayers.Size(21, 25), new OpenLayers.Pixel(-(21/2), -25)); chimere_init_options["map_layers"] = [%s]; chimere_init_options['dynamic_categories'] = false; chimere_init_options['edition'] = true; diff --git a/chimere/templates/chimere/blocks/map.html b/chimere/templates/chimere/blocks/map.html index 9a39647..c37f5f9 100644 --- a/chimere/templates/chimere/blocks/map.html +++ b/chimere/templates/chimere/blocks/map.html @@ -40,7 +40,7 @@ $(function(){ $(".show-hide-panel").hide(); $("#categories-lnk").hide(); });{% endif %} - {{extra_js}} + {{extra_js|safe}} var chimere_init_options = {}; {% if MOBILE %}chimere_init_options["mobile"] = true;{% endif %} {% if enable_clustering %}chimere_init_options["enable_clustering"] = true;{% endif %} @@ -63,8 +63,6 @@ $(function(){ {% 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["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 %} diff --git a/chimere/templates/chimere/blocks/news.html b/chimere/templates/chimere/blocks/news.html index 6b0b691..3f4d9ae 100644 --- a/chimere/templates/chimere/blocks/news.html +++ b/chimere/templates/chimere/blocks/news.html @@ -1,20 +1,29 @@ {% load i18n sanitize chimere_tags %} {% if news_lst %} -<a href='#' id='news_button' class='ui-widget ui-button ui-state-default ui-corner-all'>{% trans "News"%}</a> <script type='text/javascript'> -function display_news(){$("#welcome").dialog({title:"{% trans "News"%}", - width:360});} -$("#news_button").bind('click', display_welcome); $(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 %}display_news();{%endif%} + {% if display %}$('#news').modal('show');{%endif%} }); </script> -<div id='news' style='display:none'> - <div id='detail_content'> - <div class='news'> + +<div class="modal fade" id="news" tabindex="-1" role="dialog" aria-labelledby="news-label" aria-hidden="true"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <h4 class="modal-title" id="news-label">{% trans "Upcoming events" %}</h4> + </div> + <div class="modal-body"> + <div id='news_content'> + {% if welcome_message %} + <div id='welcome_message'> + {{welcome_message|safe}} + </div> + {% endif %} + <div class='news'> {% if news_lst %} {% for news in news_lst %} <div class='info'> @@ -44,10 +53,10 @@ $(function(){ </div> {%endfor%} {% endif %} - <div class='info'> </div> - </div> + </div> + </div> </div> + </div> </div> {% endif %} - diff --git a/chimere/templates/chimere/blocks/share_bar.html b/chimere/templates/chimere/blocks/share_bar.html index e421a0f..5367628 100644 --- a/chimere/templates/chimere/blocks/share_bar.html +++ b/chimere/templates/chimere/blocks/share_bar.html @@ -5,7 +5,7 @@ {% endfor %}{%else%} <ul class='share'> <li>{% trans "Share"%}</li>{% for share_network in share_networks %} - <li><a class='share_link share_id_{{share_network.0}}' href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li> + <li><a class='share_link share_id_{{share_network.0}}' href='{{share_network.1}}'><span class='fa fa-chimere fa-chimere-{{share_network.0}}'></span></a></li> {% endfor %}</ul>{% endif %} <script language='text/javascript'> $(function(){ diff --git a/chimere/templates/chimere/blocks/welcome.html b/chimere/templates/chimere/blocks/welcome.html index 3ec2ccf..a1dfb56 100644 --- a/chimere/templates/chimere/blocks/welcome.html +++ b/chimere/templates/chimere/blocks/welcome.html @@ -1,32 +1,30 @@ {% load i18n sanitize chimere_tags %} {% if news_lst or welcome_message %} -<a href='#' id='welcome_button' class='ui-widget ui-button ui-state-default ui-corner-all'>{% trans "Welcome message"%}</a> <script type='text/javascript'> -function display_welcome(){ - var width = $(window).width(); - width = width - 40*width/100; - var height = $(window).height()-200; - $("#welcome").dialog({title:"{% trans "Welcome"%}", - width:width, height:height}); -} -$("#welcome_button").bind('click', display_welcome); $(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 %}display_welcome();{%endif%} + {% if display %}$('#welcome').modal('show');{%endif%} }); </script> -<div id='welcome' style='display:none'> - <div id='news_content'> - {% if welcome_message %} - <div id='welcome_message'> - {{welcome_message|safe}} - </div> - {% endif %} - <div class='news'> - {% if news_lst %} - {% for news in news_lst %} + +<div class="modal fade" id="welcome" tabindex="-1" role="dialog" aria-labelledby="welcome-label" aria-hidden="true"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <h4 class="modal-title" id="welcome-label">{% trans "Upcoming events" %}</h4> + </div> + <div class="modal-body"> + <div id='news_content'> + {% if welcome_message %} + <div id='welcome_message'> + {{welcome_message|safe}} + </div> + {% endif %} + <div class='news'> + {% if news_lst %}{% for news in news_lst %} <div class='info'> {% if news.title %} <h3>{{news.title}} – {{ news.date }}</h3> @@ -52,11 +50,13 @@ $(function(){ <p class='marker_link'><a href='{% get_tinyfied_url news area_name %}'>{% trans "See it on the map"%}</a></p> {% endif %} </div> - {%endfor%} - {% endif %} - <div class='info'> + {%endfor%}{% endif %} + <div class='info'> + </div> </div> - </div> + </div> + </div> </div> + </div> </div> {% endif %} diff --git a/chimere/templates/chimere/detail.html b/chimere/templates/chimere/detail.html index d73d8a5..93388b5 100644 --- a/chimere/templates/chimere/detail.html +++ b/chimere/templates/chimere/detail.html @@ -1,4 +1,5 @@ {% load i18n sanitize chimere_tags %} +<div id='detail-wrapper'> <button onclick='$("#detail").fadeOut();return false;' type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h2>{{ marker.name }}</h2> <div class='detail_content'> @@ -26,11 +27,11 @@ {% if marker.origin %}<p class='detail_source'><strong>{% trans "Source:" %}</strong> <span>{{marker.origin}}</span></p>{% endif %} {% if marker.license %}<p class='detail_license'><strong>{% trans "License:" %}</strong> <span>{{marker.license}}</span></p>{% endif %} {% if marker.multimedia_items %}<p class='detail_multimedia'> - <a href='#' class='show_gallery_link'>{% trans "Show multimedia gallery" %}</a> + <a data-toggle='modal' data-target="#multimedia-gallery-{{time_now}}" href='#' id='multimedia-gallery-button'><span class='fa fa-chimere-action fa-camera'></span> <span class='lbl'>{% trans "Show the gallery"%}</span></a> </p>{% endif %} </div> {% share_bar marker.name %} - <p class='detail_amendment'><a href='{% if marker.polygon %}{% url chimere:editpolygon-item area_name_slash|default_if_none:"" marker.pk "" %}{% else %}{% if marker.route %}{% url chimere:editroute-item area_name_slash|default_if_none:"" marker.route.pk "" %}{% else %}{% url chimere:editmarker-item area_name_slash|default_if_none:"" marker.pk "" %}{% endif %}{% endif %}'> + <p class='detail_amendment'><a href='{% if marker.polygon %}{% url chimere:editpolygon-item area_name_slash|default_if_none:"" marker.pk "" %}{% else %}{% if marker.route %}{% url chimere:editroute-item area_name_slash|default_if_none:"" marker.pk "" %}{% else %}{% url chimere:editmarker-item area_name_slash|default_if_none:"" marker.pk "" %}{% endif %}{% endif %}'> {% trans "Submit an amendment" %} </a> {% if moderator_emails %} @@ -39,70 +40,111 @@ </a>{%endif%} </p> </div> +</div> + + {% if marker.multimedia_items %} -<div id='gallery-{{time_now}}' class='gallery'> - <div class='tabs'> - <ul>{% for item in marker.multimedia_items %} - <li><a href="#tab-{{time_now}}-{{ forloop.counter }}">{{ item.name }}</a></li>{% endfor %} - </ul> - {% for multimedia_item in marker.multimedia_items %} - <div id="tab-{{time_now}}-{{ forloop.counter }}" class='{% ifequal multimedia_item.multimedia_type.media_type 'V' %}video{% else %}other{% endifequal %}'> - {% multimedia_render multimedia_item %} - </div>{% endfor %} +<div class="modal fade" id="multimedia-gallery-{{time_now}}" tabindex="-1" role="dialog" aria-labelledby='multimedia-gallery-label' aria-hidden="true"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <h4 class="modal-title" id="multimedia-gallery-label">{% trans "Gallery" %}</h4> + </div> + <div class="modal-body"> + +<div role="tabpanel"> + + <ul class="nav nav-pills" role="tablist" id="pills-{{time_now}}"> + {% for item in marker.multimedia_items %} + <li role="presentation"{% if forloop.counter0 == 0%} class="active"{% endif %}> + <a href="#tab-{{time_now}}-{{ forloop.counter }}" aria-controls="tab-{{time_now}}-{{ forloop.counter }}" role="tab" data-toggle="pill"> + {{ item.name }} + </a> + </li>{% endfor %} + </ul> + + <div class="tab-content"> + {% for multimedia_item in marker.multimedia_items %} + <div id="tab-{{time_now}}-{{ forloop.counter }}" role="tabpanel" class="tab-pane{% if forloop.counter0 == 0%} active{% endif %} {% ifequal multimedia_item.multimedia_type.media_type 'V' %}video{% else %}other{% endifequal %}" id="home"> + {% multimedia_render multimedia_item %} </div> + {% endfor %} + </div> + +</div> + + </div> + </div> + </div> +</div> + + + +<div id='gallery-{{time_now}}' class='gallery'> </div> {% endif %} + <script language='javascript' type='text/javascript'> $('html').addClass('js-on'); -$(document).ready(function(){ - $("#gallery-{{time_now}}").dialog({title:"{{marker.name}}", autoOpen: false, - height: "auto", width: "auto", - open: function(event,ui) { - $('.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() - ;}); - } - }); - $('div.media-player').jmeEmbedControls(); - $('.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-{{time_now}}").dialog("option", "height", 'auto'); - $("#gallery-{{time_now}}").dialog("option", "width", 'auto'); - $("#gallery-{{time_now}}").dialog("option", "position", - ['center', 'center']); - }, - close: function(event, ui){ - //pause all medias - $('video').each(function(index){$(this).pause()}); - $('audio').each(function(index){$(this).pause()}); - $('.tabs').tabs('destroy'); - - } - }); - $('div.media-player').jmeEmbedControls(); - $('.show_gallery_link').click(function(){ - $("#gallery-{{time_now}}").dialog('open'); - return false; + + +function manage_tab_opening (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() + ;}); +} + +function manage_gallery_opening (event) { + // $('div.media-player').jmeEmbedControls(); + $('.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-{{time_now}}").dialog("option", "height", 'auto'); + //$("#gallery-{{time_now}}").dialog("option", "width", 'auto'); + //$("#gallery-{{time_now}}").dialog("option", "position", + // ['center', 'center']); +} + +function manage_gallery_close (event){ + //pause all medias + $('video').each(function(index){$(this).pause()}); + $('audio').each(function(index){$(this).pause()}); +} + +$(document).ready(function(){ + + $('#multimedia-gallery-{{time_now}}').on('shown.bs.modal', function (e) { + manage_gallery_opening(); + manage_tab_opening(e); + }) + + $('#multimedia-gallery-{{time_now}}').on('hide.bs.modal', function (e) { + manage_gallery_close(); + }) + + $('a[data-toggle="pill"]').on('shown.bs.tab', function (e) { + manage_tab_opening(e); + }) + + // $('div.media-player').jmeEmbedControls(); $("a[rel^='prettyPhoto']").prettyPhoto({ show_title: false, social_tools: '' }); + }); </script> diff --git a/chimere/templates/chimere/main_map.html b/chimere/templates/chimere/main_map.html index 45423ba..7909523 100644 --- a/chimere/templates/chimere/main_map.html +++ b/chimere/templates/chimere/main_map.html @@ -12,37 +12,21 @@ {% endblock %} {% block message_edit %}{% endblock %} {% block sidebar %} - <div id='panel' class='draggable ui-widget ui-corner-all'> - <h2 class='ui-widget ui-state-default ui-corner-all ui-widget-header'>{% trans "Categories"%}</h2> - <form method='post' name='frm_categories' id='frm_categories'> - <div id='categories'> - {# Categories are displayed in JS #} - </div> - </form> +{% display_news %} + <div class='show-hide-panel' id='hide-panel'><span class='fa fa-arrow-circle-left'></span></div> + <div class='show-hide-panel' id='show-panel'><span class='fa fa-arrow-circle-right'></span></div> + <div id='panel' class='navbar-default'> + <form id="frm_categories"><div id='categories'></div></form> + <div id='search-box' class='ui-widget ui-corner-all'></div> </div> - <div id='category_description'> </div> <script type='text/javascript'> $(function(){$('#category_description').dialog({'autoOpen':false});}); </script> - - <div id='utils-div' class='ui-widget ui-state-default ui-corner-all'> - {% if areas_visible %} - {% display_areas %} - {% endif %} - {% routing %} - {% display_welcome %} - {% display_news news_visible %} - <div id='permalink' class='ui-widget ui-button ui-state-default ui-corner-all'></div> - <a id='simple_button' class='ui-widget ui-button ui-state-default ui-corner-all' href='{% url chimere:simple_index area_name_slash %}'>{% trans "Simple map" %}</a> - </div> - <div id='detail' class='ui-widget ui-corner-all'></div> -{% endblock %} -{% block search_box %} -<div id='search-box' class='ui-widget ui-corner-all'> -</div> + <div id='detail'></div> {% endblock %} +{% block search_box %} {% endblock %} {% block content %} {{block.super}} <div id='popup'></div> @@ -53,17 +37,16 @@ </script> {% map_menu %} {% map 'main-map' %} - <div id='chimere_message'></div> <script type='text/javascript'> var has_search = {% if has_search %}true{% else %}false{% endif %}; // array to keep trace of already displayed items var search_result = new Array(); var search_url = "/search/"; $(function(){ - $('#chimere_message').dialog({'autoOpen':false}); if (has_search){ load_search_box(); } + {%if news_visible %}$('#news').modal();{% endif %} }); </script> {% endblock %} diff --git a/chimere_example_project/templates/chimere/base.html b/chimere_example_project/templates/chimere/base.html deleted file mode 100644 index 70b5929..0000000 --- a/chimere_example_project/templates/chimere/base.html +++ /dev/null @@ -1,41 +0,0 @@ -{% extends "base.html" %} -{% load chimere_tags i18n %} -{% block extra_head %} -<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/styles.css" /> -<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/print.css" media='print'/> -{% if css_area %} -<link rel="stylesheet" href="{{ css_area }}" />{% endif %} -{% if MOBILE %} -<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/mobile.css" /> -<script src="{{ STATIC_URL }}chimere/js/mobile.chimere.js" type="text/javascript"></script>{%endif%} -<link rel="stylesheet" href="{{ STATIC_URL }}font-awesome/css/font-awesome.min.css" /> -<link rel="stylesheet" href="{{ STATIC_URL }}bootstrap/bootstrap.min.css" /> -<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/form-compat.css" /> -<link rel="stylesheet" href="{{ STATIC_URL }}chimere/css/extra-styles.css" /> -<script src="{{ STATIC_URL }}bootstrap/bootstrap.min.js" type="text/javascript"></script> - <script type='text/javascript'> - var has_search = {% if has_search %}true{% else %}false{% endif %}; - </script> -<script src="{{ STATIC_URL }}chimere/js/interface.js" type="text/javascript"></script> -{% 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 %}{% 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 %} - diff --git a/chimere_example_project/templates/chimere/blocks/actions.html b/chimere_example_project/templates/chimere/blocks/actions.html deleted file mode 100644 index e31e1cc..0000000 --- a/chimere_example_project/templates/chimere/blocks/actions.html +++ /dev/null @@ -1,61 +0,0 @@ -{% load i18n chimere_tags %}<div class="navbar navbar-default navbar-fixed-top"> - <div class="container"> - <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - <span class="icon-bar"></span> - </button> - </div> - <div class="navbar-collapse collapse"> - - <div class='navbar-left'> - <ul class="nav nav-pills"> - {% for action, subactions in actions %} - {% ifequal action.id action_selected.0 %}{% if subactions %} - {% for subaction in subactions %} - <li{% ifequal subaction.id action_selected.1 %} class='active'{% endifequal %}> - <a href='{{ subaction.url }}' onclick='saveExtent();'>{{ subaction.label }}</a> - </li> - {% endfor %} - {% endif %}{% endifequal %} - {% endfor %} - {% if is_map %} - <li id='categories-lnk'{% if not has_search %} class='active'{%endif%}><a href='#categories' data-toggle='panel'><span class='fa fa-chimere-action fa-check-circle-o'></span> {% trans "Categories "%}</a></li> - {% if has_search %} - <li id='search-lnk' class='active'><a href='#search-box' data-toggle='panel'><span class="glyphicon glyphicon-search"></span> {% trans "Search" %}</a></li> - {% endif %} - {% if areas_visible %} - <li id='maps-lnk'><span class='fa fa-chimere-action fa-chimere-maps'></span>{% display_areas %}</li> - {% endif %} - {% comment %}OL3-TODO<li id='permalink-lnk'><span class='fa fa-chimere-action fa-bookmark'></span><span id='permalink'></span></li>{% endcomment %} - <li>{% routing %}</li> - <li id='news-lnk'> - <a data-toggle='modal' data-target="#news" href='#' id='news_button'><span class='fa fa-chimere-action fa-newspaper-o'></span><span class='lbl'>{% trans "News"%}</span></a> - </li> - <!-- <li id="simple_button-lnk"><a id='simple_button' href='{% url chimere:simple_index area_name_slash %}'><span class='fa fa-chimere-action fa-simplybuilt'></span><span class='lbl'> {% trans "Simple map" %}</span></a></li> --> - <li class='selection-sep'> </li> - {% endif %} - </ul> - </div> - - <div class='navbar-right'> - - <ul class="nav navbar-nav"> - <li class='selection-sep'> </li> - {% for action, subactions in actions %} - <li id='{{action.id}}-lnk'{% ifequal action.id action_selected.0 %} class="active"{% endifequal %}> - <a href='{{ action.url }}' onclick='jQuery("#map").chimere("saveExtent");'> - <span class='fa fa-chimere-action fa-chimere-{{action.id}}'></span> - <span class='lbl'>{{ action.label }}</span> - </a> - </li> - {% endfor %} - </ul> - - </div> - - </div> - </div> -</div> - diff --git a/chimere_example_project/templates/chimere/blocks/categories.html b/chimere_example_project/templates/chimere/blocks/categories.html deleted file mode 100644 index 9ef4e29..0000000 --- a/chimere_example_project/templates/chimere/blocks/categories.html +++ /dev/null @@ -1,32 +0,0 @@ -{% load i18n %} -<ul id='ul_categories'> - {% for category, lst_sub_categories in sub_categories %} - <li class='main_category'> - <img class="control_image toggle_category" id="maincategory_img_{{category.id}}" alt="control" src="{{ STATIC_URL }}chimere/img/{% if category.selected %}minus.png{% else %}plus.png{% endif %}" /> - <input type="checkbox" id='checkall_{{category.id}}'> - <span class='category_name'>{% trans category.name %}</span> - <span class="glyphicon glyphicon-zoom-in zoom_image zoom_to_category" id="zoom_to_category_{{category.id}}"></span> - <ul class='subcategories' id='maincategory_{{category.id}}'{% if not category.selected %} style='display:None'{% endif %}> - {% for sub_category in lst_sub_categories %} - <li id='li_sub_{{sub_category.id}}' class='subcategory'> - <input type='checkbox' name='category_{{sub_category.id}}' id='category_{{sub_category.id}}'{% if sub_category.selected %} checked='checked'{% endif %}/> - <label for='category_{{sub_category.id}}'> - <span class='cat_image'><img alt='{{ sub_category.name }}' src='{{ MEDIA_URL }}{{sub_category.icon.image}}'/></span> - {% trans sub_category.name %} - </label> - <span class="glyphicon glyphicon-zoom-in zoom_image zoom_to_subcategory" id="zoom_to_subcategory_{{sub_category.id}}"></span> - </li> - {% endfor %} - {% if category.description %} - <li><a href="#" onclick="$('#map').chimere('category_detail', {{category.id}});">{% trans "Tell me more..." %}</a></li> - {% endif %} - </ul> - </li> - {% endfor %} - {% if sub_categories %} - <li id='display_submited'> - <input type='checkbox' name='display_submited' id='display_submited_check'/> {% trans "Display markers and routes waiting for validation"%} - </li> - {% endif %} -</ul> - diff --git a/chimere_example_project/templates/chimere/blocks/map.html b/chimere_example_project/templates/chimere/blocks/map.html deleted file mode 100644 index e3fef74..0000000 --- a/chimere_example_project/templates/chimere/blocks/map.html +++ /dev/null @@ -1,120 +0,0 @@ -{% load i18n %} -<div id='category_description' class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"> - <div class="modal-dialog"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="{% trans "Close" %}"><span aria-hidden="true">×</span></button> - <h4 class="modal-title" id="category_description-label"></h4> - </div> - <div class="modal-body" id="category_description-content"> - </div> - </div> - </div> -</div> - -<div id='{{map_id}}'></div> -<script type="text/javascript"> -$("#{{map_id}}").show(); -$(function(){ - $('#cluster_list').dialog({'autoOpen':false, - 'resizable':false, - 'width':340, - 'dialogClass':'no-titlebar'}); -}); -</script> -<div id="waiting"> - <div id="waiting-content"> - <img alt='Ajax loader' src='{{STATIC_URL}}chimere/img/ajax-loader.gif'/> - </div> -</div> -<div id="layer_selection"> - <h4>{% trans "Display options" %}</h4> - <ul id='layer_list'> - <li class='head layer_map_type'>{% trans "Map type"%}</li> - </ul> -</div> -<script type="text/javascript"> - {% if not display_category_menu %} - $(function() { - $('#panel').hide(); - $(".show-hide-panel").hide(); - $("#categories-lnk").hide(); - });{% endif %} - {{extra_js|safe}} - var chimere_init_options = {}; - {% if MOBILE %}chimere_init_options["mobile"] = true;{% endif %} - {% if enable_clustering %}chimere_init_options["enable_clustering"] = true;{% endif %} - chimere_init_options["default_icon"] = '{{STATIC_URL}}img/marker-green.png'; - {% if js_map_layers %}chimere_init_options["map_layers"] = [{{js_map_layers|safe|escape}}];{% endif %} - chimere_init_options['permalink_label'] = '{%trans "Permalink"%}'; - chimere_init_options['permalink_element'] = document.getElementById('permalink'); - chimere_init_options['routing'] = {{routing}}; - {% if dynamic_categories %}chimere_init_options['dynamic_categories'] = true;{% endif %} - {% if default_area %} - chimere_init_options["default_area"] = new Array({{default_area.upper_left_corner.x}}, {{default_area.upper_left_corner.y}}, {{default_area.lower_right_corner.x}}, {{default_area.lower_right_corner.y}}); - {% endif %} - {% if p_zoom %}chimere_init_options["zoom"] = {{ p_zoom }};{% endif %} - {% if p_lat %}chimere_init_options["lat"] = {{ p_lat }};{% endif %} - {% if p_lon %}chimere_init_options["lon"] = {{ p_lon }};{% endif %} - {% if p_routing_start_lon %}chimere_init_options["routing_start_lon"] = {{ p_routing_start_lon }};{% endif %} - {% if p_routing_start_lat %}chimere_init_options["routing_start_lat"] = {{ p_routing_start_lat }};{% endif %} - {% 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"] = ({{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 %}]; - {% if area_id %}chimere_init_options['area_id'] = "{{area_id}}";{% endif %} - {% if p_current_feature %} - chimere_init_options["display_feature"] = {{ p_current_feature }};{% endif %} - {% if p_current_route %} - chimere_init_options["display_route"] = {{ p_current_route }};{% endif %} - {% if restricted_extent %}{{ restricted_extent }} - chimere_init_options["restricted_extent"] = bounds; - {% endif %} - {% if selected_map_layer %} - chimere_init_options["selected_map_layer"] = {{selected_map_layer}}; - {% endif %} - - $('#category_description').modal({show:false}); - chimere_init_options["open_dialog_fx"] = function (title, content){ - $('#category_description-content').html(content); - $('#category_description-label').html(title); - $('#category_description').modal('show'); - } - $("#main-map").chimere(chimere_init_options); - {% if zoom %} - $('#maps').chimere('zoom', {'area':{{zoom}} }); - {% endif %} - - {{extra_map_def|safe}} - - // init layer selection - /* $(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 %} - {% if not subcat.category %} - $('#layer_list').append("<li class='head layer_category'>{{subcat.name}}</li>");{% else %} - $('#layer_list').append("<li><input type='checkbox' name='layer_cat' value='category_{{subcat.pk}}' id='layer_cat_{{subcat.pk}}'{% if subcat.pk in checked_categories %} checked='checked'{% endif %}><label for='layer_cat_{{subcat.pk}}'>{{subcat.name}}</li>");{%endif%}{% endfor %} - $('#layer_selection h4').click(function(){ - $('#layer_list').toggle(); - }); - $('#layer_list input[name=layer_type]').change(function(){ - $('#{{map_id}}').chimere('changeMapLayer', $(this).val()); - }); - $('#layer_list input[name=layer_cat]').change(function(){ - // the prop has to be called twice not to mess up with the triggered - // click - $('#'+$(this).val()).prop("checked", this.checked); - $('#'+$(this).val()).trigger('click'); - $('#'+$(this).val()).prop("checked", this.checked); - }); - highlight_selected_categories(); - }); - */ -</script> -<div id='marker_hover'><div id='marker_hover_content'></div></div> -<div id='cluster_list'></div> - diff --git a/chimere_example_project/templates/chimere/blocks/news.html b/chimere_example_project/templates/chimere/blocks/news.html deleted file mode 100644 index 3f4d9ae..0000000 --- a/chimere_example_project/templates/chimere/blocks/news.html +++ /dev/null @@ -1,62 +0,0 @@ -{% load i18n sanitize chimere_tags %} -{% if news_lst %} -<script type='text/javascript'> -$(function(){ - // $('#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%} -}); -</script> - -<div class="modal fade" id="news" tabindex="-1" role="dialog" aria-labelledby="news-label" aria-hidden="true"> - <div class="modal-dialog modal-lg"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> - <h4 class="modal-title" id="news-label">{% trans "Upcoming events" %}</h4> - </div> - <div class="modal-body"> - <div id='news_content'> - {% if welcome_message %} - <div id='welcome_message'> - {{welcome_message|safe}} - </div> - {% endif %} - <div class='news'> - {% if news_lst %} - {% for news in news_lst %} - <div class='info'> - {% if news.title %} - <h3>{{news.title}} – {{ news.date }}</h3> - <p>{{news.content|safe}}</p> - {% else %} - <h3>{{news.name}} – {{ news.start_date }}{% if news.end_date and news.end_date != news.start_date %} – {{ news.end_date }}{% endif %}</h3> - {% if news.default_pictures or news.default_pictures or news.default_multimedia_items%} - <div class='small-gallery'> - {% for picture in news.default_pictures %} - {% multimedia_render picture %} - {%endfor%} - {% for multimedia_item in news.default_multimedia_items %} - {% multimedia_render multimedia_item %} - {%endfor%} - </div> - {%endif%} - {% if news.description %} - <p class='description'>{{news.description|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe}}</p> - {% endif %} - {% for property in news.getProperties %} - <p class='{{news.propertymodel.getNamedId}}'>{{ property.value|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe }}</p> - {% endfor %} - <p class='marker_link'><a href='{% get_tinyfied_url news area_name %}'>{% trans "See it on the map"%}</a></p> - {% endif %} - </div> - {%endfor%} - {% endif %} - </div> - </div> - </div> - </div> - </div> -</div> -{% endif %} diff --git a/chimere_example_project/templates/chimere/blocks/share_bar.html b/chimere_example_project/templates/chimere/blocks/share_bar.html deleted file mode 100644 index 5367628..0000000 --- a/chimere_example_project/templates/chimere/blocks/share_bar.html +++ /dev/null @@ -1,39 +0,0 @@ -{% load i18n %} - {% if share_networks %} - {% if simple %}{% trans "Share on"%}{% for share_network in share_networks %} - <a href='{{share_network.1}}'>{{share_network.0}}</a> - {% endfor %}{%else%} - <ul class='share'> - <li>{% trans "Share"%}</li>{% for share_network in share_networks %} - <li><a class='share_link share_id_{{share_network.0}}' href='{{share_network.1}}'><span class='fa fa-chimere fa-chimere-{{share_network.0}}'></span></a></li> - {% endfor %}</ul>{% endif %} - <script language='text/javascript'> - $(function(){ - $('.share_link').click(function(){ - var href = $(this).attr('href'); - var url = '{% url chimere:get-share-url %}'; - var classes = $(this).attr('class').split(' '); - prefix = 'share_id_'; - var share_id; - for (idx=0;idx<classes.length;idx++){ - if(classes[idx].substring(0, prefix.length) == prefix){ - var share_id = classes[idx].substring(prefix.length); - } - } - var params = $('#permalink a').attr('href').split('/'); - url += share_id + params[params.length-1]; - $.ajax({url: url, - dataType: "html", - success: function (url) { - window.open(url); - return false; - }, - error: function(){ - return false; - } - }); - return false; - }); - }); - </script> - {% endif %} diff --git a/chimere_example_project/templates/chimere/blocks/welcome.html b/chimere_example_project/templates/chimere/blocks/welcome.html deleted file mode 100644 index a1dfb56..0000000 --- a/chimere_example_project/templates/chimere/blocks/welcome.html +++ /dev/null @@ -1,62 +0,0 @@ -{% load i18n sanitize chimere_tags %} -{% if news_lst or welcome_message %} -<script type='text/javascript'> -$(function(){ - //$('#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%} -}); -</script> - -<div class="modal fade" id="welcome" tabindex="-1" role="dialog" aria-labelledby="welcome-label" aria-hidden="true"> - <div class="modal-dialog modal-lg"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> - <h4 class="modal-title" id="welcome-label">{% trans "Upcoming events" %}</h4> - </div> - <div class="modal-body"> - <div id='news_content'> - {% if welcome_message %} - <div id='welcome_message'> - {{welcome_message|safe}} - </div> - {% endif %} - <div class='news'> - {% if news_lst %}{% for news in news_lst %} - <div class='info'> - {% if news.title %} - <h3>{{news.title}} – {{ news.date }}</h3> - <p>{{news.content|safe}}</p> - {% else %} - <h3>{{news.name}} – {{ news.start_date }}{% if news.end_date %} - {{ news.end_date }}{% endif %}</h3> - {% if news.default_pictures or news.default_pictures or news.default_multimedia_items%} - <div class='small-gallery'> - {% for picture in news.default_pictures %} - {% multimedia_render picture %} - {%endfor%} - {% for multimedia_item in news.default_multimedia_items %} - {% multimedia_render multimedia_item %} - {%endfor%} - </div> - {%endif%} - {% if news.description %} - <p class='description'>{{news.description|sanitize:"p b i br hr strong em img:src:alt span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe}}</p> - {% endif %} - {% for property in news.getProperties %} - <p class='{{news.propertymodel.getNamedId}}'>{{ property.value|sanitize:"p b i br hr strong em img:src:alt span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe }}</p> - {% endfor %} - <p class='marker_link'><a href='{% get_tinyfied_url news area_name %}'>{% trans "See it on the map"%}</a></p> - {% endif %} - </div> - {%endfor%}{% endif %} - <div class='info'> - </div> - </div> - </div> - </div> - </div> - </div> -</div> -{% endif %} diff --git a/chimere_example_project/templates/chimere/detail.html b/chimere_example_project/templates/chimere/detail.html deleted file mode 100644 index 93388b5..0000000 --- a/chimere_example_project/templates/chimere/detail.html +++ /dev/null @@ -1,150 +0,0 @@ -{% load i18n sanitize chimere_tags %} -<div id='detail-wrapper'> -<button onclick='$("#detail").fadeOut();return false;' type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> -<h2>{{ marker.name }}</h2> -<div class='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 class='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 %} - <p class='description'>{{ marker.description|sanitize:"p b i br hr strong em img:src:alt span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}</p> - {% endif %} - {% for property in properties %} - <p class='{{property.propertymodel.getNamedId}}'><strong>{{property.propertymodel}}</strong>{% trans ":" %} {{ property.value|sanitize:"p b i br hr strong em img:src:alt span:style a:href:target ul li ol h1 h2 h3 h4 table td tr th"|safe}}</p> - {% endfor %} - {% if marker.origin %}<p class='detail_source'><strong>{% trans "Source:" %}</strong> <span>{{marker.origin}}</span></p>{% endif %} - {% if marker.license %}<p class='detail_license'><strong>{% trans "License:" %}</strong> <span>{{marker.license}}</span></p>{% endif %} - {% if marker.multimedia_items %}<p class='detail_multimedia'> - <a data-toggle='modal' data-target="#multimedia-gallery-{{time_now}}" href='#' id='multimedia-gallery-button'><span class='fa fa-chimere-action fa-camera'></span> <span class='lbl'>{% trans "Show the gallery"%}</span></a> - </p>{% endif %} - </div> - {% share_bar marker.name %} - <p class='detail_amendment'><a href='{% if marker.polygon %}{% url chimere:editpolygon-item area_name_slash|default_if_none:"" marker.pk "" %}{% else %}{% if marker.route %}{% url chimere:editroute-item area_name_slash|default_if_none:"" marker.pk "" %}{% else %}{% url chimere:editmarker-item area_name_slash|default_if_none:"" marker.pk "" %}{% endif %}{% endif %}'> - {% trans "Submit an amendment" %} - </a> - {% if moderator_emails %} - <a href="mailto:?from={{moderator_emails}}&subject={% trans "Propose amendment" %}&body={% trans "I would like to propose an amendment for this item:"%} {{share_url}}"> - {% trans "Propose amendment" %} - </a>{%endif%} - </p> -</div> -</div> - - -{% if marker.multimedia_items %} -<div class="modal fade" id="multimedia-gallery-{{time_now}}" tabindex="-1" role="dialog" aria-labelledby='multimedia-gallery-label' aria-hidden="true"> - <div class="modal-dialog modal-lg"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> - <h4 class="modal-title" id="multimedia-gallery-label">{% trans "Gallery" %}</h4> - </div> - <div class="modal-body"> - -<div role="tabpanel"> - - <ul class="nav nav-pills" role="tablist" id="pills-{{time_now}}"> - {% for item in marker.multimedia_items %} - <li role="presentation"{% if forloop.counter0 == 0%} class="active"{% endif %}> - <a href="#tab-{{time_now}}-{{ forloop.counter }}" aria-controls="tab-{{time_now}}-{{ forloop.counter }}" role="tab" data-toggle="pill"> - {{ item.name }} - </a> - </li>{% endfor %} - </ul> - - <div class="tab-content"> - {% for multimedia_item in marker.multimedia_items %} - <div id="tab-{{time_now}}-{{ forloop.counter }}" role="tabpanel" class="tab-pane{% if forloop.counter0 == 0%} active{% endif %} {% ifequal multimedia_item.multimedia_type.media_type 'V' %}video{% else %}other{% endifequal %}" id="home"> - {% multimedia_render multimedia_item %} - </div> - {% endfor %} - </div> - -</div> - - </div> - </div> - </div> -</div> - - - -<div id='gallery-{{time_now}}' class='gallery'> -</div> -{% endif %} - -<script language='javascript' type='text/javascript'> -$('html').addClass('js-on'); - - -function manage_tab_opening (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() - ;}); -} - -function manage_gallery_opening (event) { - // $('div.media-player').jmeEmbedControls(); - $('.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-{{time_now}}").dialog("option", "height", 'auto'); - //$("#gallery-{{time_now}}").dialog("option", "width", 'auto'); - //$("#gallery-{{time_now}}").dialog("option", "position", - // ['center', 'center']); -} - -function manage_gallery_close (event){ - //pause all medias - $('video').each(function(index){$(this).pause()}); - $('audio').each(function(index){$(this).pause()}); -} - -$(document).ready(function(){ - - $('#multimedia-gallery-{{time_now}}').on('shown.bs.modal', function (e) { - manage_gallery_opening(); - manage_tab_opening(e); - }) - - $('#multimedia-gallery-{{time_now}}').on('hide.bs.modal', function (e) { - manage_gallery_close(); - }) - - $('a[data-toggle="pill"]').on('shown.bs.tab', function (e) { - manage_tab_opening(e); - }) - - // $('div.media-player').jmeEmbedControls(); - $("a[rel^='prettyPhoto']").prettyPhoto({ - show_title: false, - social_tools: '' - }); - -}); -</script> diff --git a/chimere_example_project/templates/chimere/main_map.html b/chimere_example_project/templates/chimere/main_map.html deleted file mode 100644 index 856bcdc..0000000 --- a/chimere_example_project/templates/chimere/main_map.html +++ /dev/null @@ -1,54 +0,0 @@ -{% extends "chimere/base.html" %} -{% load i18n unlocalize_point chimere_tags %} -{% block extra_head %} -{% head_jquery %} -{% head_chimere %} -{% head_jme %} -<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js" type="text/javascript"></script> -{% if has_search %} -<script src="{{ STATIC_URL }}chimere/js/search.js" type="text/javascript"></script> -<script src="{{ STATIC_URL }}chimere/js/search-autocomplete.js" type="text/javascript"></script>{% endif %} -{{ block.super }} -{% endblock %} -{% block message_edit %}{% endblock %} -{% block sidebar %} -{% display_news %} - <div class='show-hide-panel' id='hide-panel'><span class='fa fa-arrow-circle-left'></span></div> - <div class='show-hide-panel' id='show-panel'><span class='fa fa-arrow-circle-right'></span></div> - <div id='panel' class='navbar-default'> - <form id="frm_categories"><div id='categories'></div></form> - <div id='search-box' class='ui-widget ui-corner-all'></div> - </div> - <div id='category_description'> - </div> - <script type='text/javascript'> - $(function(){$('#category_description').dialog({'autoOpen':false});}); - </script> - <div id='detail'></div> -{% endblock %} -{% block search_box %} {% endblock %} -{% block content %} - {{block.super}} - <div id='popup'></div> - <div id='layerSwitcher'></div> - <div id='main-map'></div> -<script type="text/javascript"> - $("#main-map").show(); -</script> - {% map_menu %} - {% map 'main-map' %} - <script type='text/javascript'> - // array to keep trace of already displayed items - var search_result = new Array(); - var search_url = "/search/"; - $(function(){ - if (has_search){ - load_search_box(); - } - {%if news_visible %}$('#news').modal();{% endif %} - }); - </script> -{% endblock %} -{% block footer %} - <p class='map-footer'>{% include "chimere/blocks/footer.html" %}</p> -{% endblock %} |