diff options
Diffstat (limited to 'chimere/templates/chimere')
| -rw-r--r-- | chimere/templates/chimere/base.html | 1 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/actions.html | 4 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/alternate_multimedia.html | 37 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/categories.html | 6 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/head_chimere.html | 13 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/head_form.html | 2 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/head_jme.html | 12 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/map.html | 41 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/map_menu.html | 14 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/multimedia_file.html | 2 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/news.html | 53 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/routing.html | 48 | ||||
| -rw-r--r-- | chimere/templates/chimere/blocks/share_bar.html | 39 | ||||
| -rw-r--r-- | chimere/templates/chimere/default_extra_page.html | 15 | ||||
| -rw-r--r-- | chimere/templates/chimere/detail.html | 13 | ||||
| -rw-r--r-- | chimere/templates/chimere/edit.html | 5 | ||||
| -rw-r--r-- | chimere/templates/chimere/main_map.html | 20 |
17 files changed, 280 insertions, 45 deletions
diff --git a/chimere/templates/chimere/base.html b/chimere/templates/chimere/base.html index a1a0b39..620c84f 100644 --- a/chimere/templates/chimere/base.html +++ b/chimere/templates/chimere/base.html @@ -2,6 +2,7 @@ {% 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 %} {% endblock %} diff --git a/chimere/templates/chimere/blocks/actions.html b/chimere/templates/chimere/blocks/actions.html index 2806321..93debb0 100644 --- a/chimere/templates/chimere/blocks/actions.html +++ b/chimere/templates/chimere/blocks/actions.html @@ -2,7 +2,7 @@ <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='{{extra_url}}{{ action.path }}' onclick='jQuery("#map").chimere("saveExtent");'>{{ action.label }}</a> + <a href='{{ action.url }}' onclick='jQuery("#map").chimere("saveExtent");'>{{ action.label }}</a> </li> {% endfor %} </ul> @@ -11,7 +11,7 @@ {% 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 %}'> - <a href='{{extra_url}}{{ subaction.path }}' onclick='saveExtent();'>{{ subaction.label }}</a> + <a href='{{ subaction.url }}' onclick='saveExtent();'>{{ subaction.label }}</a> </li> {% endfor %} {% endif %}{% endifequal %} diff --git a/chimere/templates/chimere/blocks/alternate_multimedia.html b/chimere/templates/chimere/blocks/alternate_multimedia.html index 0662750..50bddd5 100644 --- a/chimere/templates/chimere/blocks/alternate_multimedia.html +++ b/chimere/templates/chimere/blocks/alternate_multimedia.html @@ -14,13 +14,14 @@ {% for formset in formsets %} {% for frm in formset%} {% if not forloop.last %} - <li> + <li class='{% if forloop.parentloop.counter0 %}picture{%else%}multimedia{%endif%}'> {%if forloop.first %}{% for hidden in frm.hidden_fields %} {{ hidden }} {% endfor %}{% endif %} {% for field in frm.visible_fields %} {% if field.name == "name" %} - <span class='value'>{{ field.field.value }}</span> + <span class='value'>{{ field.value }}</span> + <img class='remove-media' alt='Remove media' src='{{STATIC_URL}}chimere/img/close.png'/> {% endif %} <span class='hidden'>{{field}}</span> {% endfor %} @@ -31,7 +32,7 @@ </ul> <button id='add_multimedia_list'>{% trans "Add" %}</button> </div> - <div id='multimedia_form' title="{% trans "Add multimedia from your computer or a site"%}"> + <div id='multimedia_form' title="{% trans "Add multimedia from your computer or a website"%}"> <div class='notice'>{% trans "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc eu luctus ipsum. Donec vel urna a turpis consectetur consectetur. Vestibulum ut enim vel odio porta vulputate." %} </div> <div class="fieldWrapper"> @@ -51,6 +52,9 @@ </div> <script text='text/javascript'> $(function(){ + $(".remove-media").click(function(){ + $(this).parents('li').remove(); + }); var current_image_number = 0; var current_multi_number = 0; $("#multimedia_form").dialog({autoOpen:false, @@ -110,20 +114,33 @@ content += '<input type="hidden" name="'+prefix+'-DELETE" value=""/>\n'; content += '<input type="hidden" name="'+prefix+'-name" value="'+ $("#multimedia_name").val() +'"/>\n'; content += $("#multimedia_name").val(); - content += " <img class='remove-media' src='{{STATIC_URL}}chimere/img/close.png'/>"; + content += " <img class='remove-media' alt='Remove media' src='{{STATIC_URL}}chimere/img/close.png'/>"; + content += " <img class='remove-media' alt='Remove media' src='{{STATIC_URL}}chimere/img/close.png'/>"; content += '</li>'; contener.append(content); if ($('#media_type_image:checked').val() && $("#picture-"+current_image_number+"-picture").val()){ - // the file item cannot be recopied - security issue - // so it is hiden then a new one is added - //$('#picture-'+current_image_number+'-picture').hide(); + // the file field cannot be recopied - security issue + // so it is moved var file_item = $('#picture-'+current_image_number+'-picture'); - //var cloned = file_item.clone(true); - //file_item.hide(); - //cloned.insertAfter(file_item); + var cloned = file_item.clone(true); + file_item.hide(); + cloned.insertAfter(file_item); file_item.appendTo($("#multimedia_list_content li").last()); + current_image_number += 1; + cloned.attr('id', 'picture-'+current_image_number+'-picture'); + cloned.attr('name', 'picture-'+current_image_number+'-picture'); + cloned.val(''); + $('#id_picture-TOTAL_FORMS').val(current_image_number + 1); + } else { + current_multi_number += 1; + $('#id_multimedia-TOTAL_FORMS').val(current_multi_number + 1); } + // empty the fields + $("#multimedia_name").val(''); + $("#multimedia_url").val(''); + $("#media_type_image").prop('checked', ''); + $("#media_type_other").prop('checked', ''); $("#multimedia_form").dialog("close"); $(".remove-media").click(function(){ $(this).parents('li').remove(); diff --git a/chimere/templates/chimere/blocks/categories.html b/chimere/templates/chimere/blocks/categories.html index 8c8a8f8..d87fe4d 100644 --- a/chimere/templates/chimere/blocks/categories.html +++ b/chimere/templates/chimere/blocks/categories.html @@ -1,14 +1,14 @@ {% load i18n %} <ul id='ul_categories'> {% for category, lst_sub_categories in sub_categories %} - <li> + <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' /> <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}}'> + <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}}'/> @@ -27,5 +27,5 @@ <li id='display_submited'> <input type='checkbox' name='display_submited' id='display_submited_check'/> {% trans "Display markers and routes waiting for validation"%} </li> - {% endif %} + {% endfor %} </ul> diff --git a/chimere/templates/chimere/blocks/head_chimere.html b/chimere/templates/chimere/blocks/head_chimere.html index 4031ac4..147d05b 100644 --- a/chimere/templates/chimere/blocks/head_chimere.html +++ b/chimere/templates/chimere/blocks/head_chimere.html @@ -1,16 +1,18 @@ {% for css_url in OSM_CSS_URLS %} <link rel="stylesheet" href="{{ css_url }}" />{% endfor %} {% for js_url in OSM_JS_URLS %} -<script src="{{ js_url }}"></script>{% endfor %} -<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js"></script> +<script src="{{ js_url }}" type="text/javascript"></script>{% endfor %} +{% if routing %}<script src="{{ STATIC_URL }}chimere/js/routing-widget.js" type="text/javascript"></script>{% endif %} +<script src="{{ STATIC_URL }}chimere/js/clustering.js" type="text/javascript"></script> +<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js" type="text/javascript"></script> <script type="text/javascript"> /* Global variables */ var STATIC_URL = static_url = "{{ STATIC_URL }}"; var MEDIA_URL = media_path = "{{ MEDIA_URL }}"; var extra_url = "{{ EXTRA_URL }}"; </script> -<script src="{{ STATIC_URL }}chimere/js/utils.js"></script> -<script src="{{ STATIC_URL }}chimere/js/base.js"></script> +<script src="{{ STATIC_URL }}chimere/js/utils.js" type="text/javascript"></script> +<script src="{{ STATIC_URL }}chimere/js/base.js" type="text/javascript"></script> <script type="text/javascript"> var DEFAULT_ZOOM = {{ DEFAULT_ZOOM }}; var EPSG_DISPLAY_PROJECTION = epsg_display_projection = new OpenLayers.Projection('EPSG:{{ EPSG_DISPLAY_PROJECTION }}'); @@ -23,8 +25,9 @@ var area_name = '{{ area_name }}';{% endif %} $(function() {$( ".draggable" ).draggable({handle:"h2"});}); + var get_share_url = '{% url chimere:get-share-url %}'; </script> -<style> +<style type="text/css"> .olControlPanPanel div { background-image: url({{STATIC_URL}}chimere/img/pan-panel.png); } diff --git a/chimere/templates/chimere/blocks/head_form.html b/chimere/templates/chimere/blocks/head_form.html new file mode 100644 index 0000000..032a711 --- /dev/null +++ b/chimere/templates/chimere/blocks/head_form.html @@ -0,0 +1,2 @@ + +<script src="{{ TINYMCE_URL }}tiny_mce.js" type="text/javascript"></script> diff --git a/chimere/templates/chimere/blocks/head_jme.html b/chimere/templates/chimere/blocks/head_jme.html index a3fe683..bf31e6f 100644 --- a/chimere/templates/chimere/blocks/head_jme.html +++ b/chimere/templates/chimere/blocks/head_jme.html @@ -1,16 +1,16 @@ <script class="jwPlayer" type="application/swf" src="{{STATIC_URL}}jme/packages/player.swf"></script> -<script src="{{STATIC_URL}}jme/packages/mm.full.min.js"></script> -<script src="{{STATIC_URL}}jme/utils/jmeEmbedControls.js"></script> +<script src="{{STATIC_URL}}jme/packages/mm.full.min.js" type="text/javascript"></script> +<script src="{{STATIC_URL}}jme/utils/jmeEmbedControls.js" type="text/javascript"></script> <link rel="stylesheet" href="{{STATIC_URL}}jme/css/player-controls.css" /> <!-- a11y-slider --> -<script src="{{STATIC_URL}}jme/utils/a11y-slider.ext.js"></script> +<script src="{{STATIC_URL}}jme/utils/a11y-slider.ext.js" type="text/javascript"></script> <!-- workaround for flash bug in ie --> -<script src="{{STATIC_URL}}jme/utils/reinitjme.js"></script> +<script src="{{STATIC_URL}}jme/utils/reinitjme.js" type="text/javascript"></script> <!-- fullwindow plugin --> <script class="jme-jwPlayer" type="application/swf" src="{{STATIC_URL}}jme/packages/jmefs.swf"></script> -<script src="{{STATIC_URL}}jme/plugins/fullwindow.js"></script> +<script src="{{STATIC_URL}}jme/plugins/fullwindow.js" type="text/javascript"></script> <!-- useractivity --> -<script src="{{STATIC_URL}}jme/utils/useractivity.js"></script> +<script src="{{STATIC_URL}}jme/utils/useractivity.js" type="text/javascript"></script> <!-- prettyPhoto not jme but media --> <link rel="stylesheet" href="{{STATIC_URL}}prettyPhoto/css/prettyPhoto.css" /> diff --git a/chimere/templates/chimere/blocks/map.html b/chimere/templates/chimere/blocks/map.html index 9788528..4affb19 100644 --- a/chimere/templates/chimere/blocks/map.html +++ b/chimere/templates/chimere/blocks/map.html @@ -5,10 +5,16 @@ </script> <div id="waiting"> <div id="waiting-content"> - <img src='{{STATIC_URL}}chimere/img/ajax-loader.gif'/> + <img alt='Ajax loader' src='{{STATIC_URL}}chimere/img/ajax-loader.gif'/> <p>{% trans "Loading of the map in progress" %}</p> </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 single_category %} $(function() {$('#panel').hide()});{% endif %} @@ -17,6 +23,7 @@ chimere_init_options["map_layers"] = [{{map_layers|safe|escape}}]; 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}}); @@ -24,11 +31,16 @@ {% 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"] = new OpenLayers.Pixel({{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"] = {{ p_checked_categories }}; + 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 %} @@ -44,5 +56,28 @@ {% if zoom %} $('#maps').chimere('zoom', {'area':{{zoom}} }); {% endif %} -</script> + // 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); + }); + }); +</script> +<div id='marker_hover'><div id='marker_hover_content'></div></div> diff --git a/chimere/templates/chimere/blocks/map_menu.html b/chimere/templates/chimere/blocks/map_menu.html new file mode 100644 index 0000000..38fb4a8 --- /dev/null +++ b/chimere/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/chimere/templates/chimere/blocks/multimedia_file.html b/chimere/templates/chimere/blocks/multimedia_file.html index cc7c5d3..a360a9e 100644 --- a/chimere/templates/chimere/blocks/multimedia_file.html +++ b/chimere/templates/chimere/blocks/multimedia_file.html @@ -1,6 +1,6 @@ {% load i18n %} {% if multimedia_item.picture %} -<a rel="prettyPhoto" href='{{multimedia_item.picture.url}}' ><img class='media-img' alt="{{multimedia_item.name}}" src='{{multimedia_item.thumbnailfile.url}}'/></a>{% endif %} +<a rel="prettyPhoto" href='{{multimedia_item.picture.url}}' ><img class='media-img thumbnail' alt="{{multimedia_item.name}}" src='{{multimedia_item.thumbnailfile.url}}'/></a>{% endif %} {% if multimedia_item.url %} {% if multimedia_item.multimedia_type.iframe %} diff --git a/chimere/templates/chimere/blocks/news.html b/chimere/templates/chimere/blocks/news.html new file mode 100644 index 0000000..fa581f7 --- /dev/null +++ b/chimere/templates/chimere/blocks/news.html @@ -0,0 +1,53 @@ +{% 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 video').each(function(index){$(this).pause()}); + $('#news audio').each(function(index){$(this).pause()}); + {% if display %}display_news();{%endif%} +}); +</script> +<div id='news' style='display:none'> + <div id='detail_content'> + <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 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 class='info'> + </div> + </div> + </div> +</div> +{% endif %} + diff --git a/chimere/templates/chimere/blocks/routing.html b/chimere/templates/chimere/blocks/routing.html new file mode 100644 index 0000000..db97191 --- /dev/null +++ b/chimere/templates/chimere/blocks/routing.html @@ -0,0 +1,48 @@ +{% load i18n %} +{# Don't forget to include routing-widget.js in your main template #} +{% if routing %} +{{itinerary_form.media}} +<a href='#' id='routing_button' class='ui-widget ui-button ui-state-default ui-corner-all'>{% trans "Itinerary"%}</a> +<div id='chimere_itinerary_panel'> + <div id='chimere_itinerary_form'> + {% for hidden in itinerary_form.hidden_fields %} + {{ hidden }} + {% endfor %} + {% for field in itinerary_form.visible_fields %} + <div id='{{field.auto_id}}_div'> + {% if field.label %}<label for='{{field.auto_id}}'>{{ field.label }}</label>{%endif%} + {{field}}</div> + {% endfor %} + <a id='add_step_link' href='#'>{% trans "Add a step" %}</a> + <span id='search_routing'>{% trans "Search" %}</span> + </div> + <div id='chimere_itinerary'> + <div id='chimere_itinerary_action'> + <ul class='action'> + <li class='ui-widget ui-button ui-state-default ui-corner-all'> + <a href='#' id='chimere_itinerary_modify'>{% trans "Modify" %}</a> + </li> + <li class='ui-widget ui-button ui-state-default ui-corner-all'> + <a href='#' id='chimere_itinerary_new'>{% trans "New search" %}</a> + </li> + </ul> + </div> + <div class='itinerary_label' id='total_label_div'> + <span id='chimere_total_label'></span> + </div> + <div class='itinerary_label'> + <span class='label'>{% trans "Start:"%}</span> <span id='chimere_start_label'></span></div> + <div id='chimere_itinerary_content'> + </div> + <div class='itinerary_label'> + <span class='label'>{% trans "Finish:"%}</span> <span id='chimere_end_label'></span> + </div> + </div> +</div> +<script language='javascript' type='text/javascript'> +<!-- +var step_label = "{% trans "Step" %}"; +var routing_fail_message = "{{routing_fail_message|safe}}"; +// --> +</script> +{% endif%} diff --git a/chimere/templates/chimere/blocks/share_bar.html b/chimere/templates/chimere/blocks/share_bar.html new file mode 100644 index 0000000..e421a0f --- /dev/null +++ b/chimere/templates/chimere/blocks/share_bar.html @@ -0,0 +1,39 @@ +{% 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}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></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/templates/chimere/default_extra_page.html b/chimere/templates/chimere/default_extra_page.html new file mode 100644 index 0000000..884d4cc --- /dev/null +++ b/chimere/templates/chimere/default_extra_page.html @@ -0,0 +1,15 @@ +{% extends "chimere/base.html" %} +{% load i18n chimere_tags %} +{% block extra_head %} + {{ block.super }} + {{ form.media }} + {% head_jquery %} +{% endblock %} +{% block message_map %}{% endblock %} +{% block message_edit%}{% endblock %} +{% block content %} + {{ block.super }} + <h3>{{title}}</h3> + {{content|safe}} +{% endblock %} + diff --git a/chimere/templates/chimere/detail.html b/chimere/templates/chimere/detail.html index eec932c..4b5c168 100644 --- a/chimere/templates/chimere/detail.html +++ b/chimere/templates/chimere/detail.html @@ -34,17 +34,8 @@ {% 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> - {% if share_networks %} - <p class='detail_share'> - {% 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 href='{{share_network.1}}'><img src="{{share_network.2}}" alt="{{share_network.0}}"/></a></li> - {% endfor %}</ul>{% endif %} - </p> + </a>{%endif%} + {% share_bar marker.name %} {% endif %} </div> {% if marker.multimedia_items %} diff --git a/chimere/templates/chimere/edit.html b/chimere/templates/chimere/edit.html index 341f9b5..f9706d3 100644 --- a/chimere/templates/chimere/edit.html +++ b/chimere/templates/chimere/edit.html @@ -133,14 +133,15 @@ </div> <div id='upload_in_progress'> <p>{% trans "Upload in progress. Please wait..." %}</p> - <p><img src='{{STATIC_URL}}chimere/img/ajax-loader.gif'/></p> + <p><img alt='Ajax loader' src='{{STATIC_URL}}chimere/img/ajax-loader.gif'/></p> </div> <script text='text/javascript'> $( "#upload_in_progress" ).dialog({ modal: true, resizable:false, height:110, - autoOpen:false + autoOpen:false, + dialogClass:'alert-box' } ); $(".ui-dialog-titlebar").hide(); diff --git a/chimere/templates/chimere/main_map.html b/chimere/templates/chimere/main_map.html index 76f796d..b7aa868 100644 --- a/chimere/templates/chimere/main_map.html +++ b/chimere/templates/chimere/main_map.html @@ -4,7 +4,7 @@ {% head_jquery %} {% head_chimere %} {% head_jme %} -<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js"></script> +<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js" type="text/javascript"></script> {{ block.super }} {% endblock %} {% block message_edit %}{% endblock %} @@ -18,20 +18,36 @@ </form> </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> - <div id='category_detail'></div> {% endblock %} {% block content %} {{block.super}} + <div id='main-map'></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});}); + </script> {% endblock %} {% block footer %} <p class='map-footer'>{% include "chimere/blocks/footer.html" %}</p> |
