# HG changeset patch # User cavaliet # Date 1374159264 -7200 # Node ID 4379c6f1d6455f08caf39e1a815813726f9ef5b1 # Parent 25886ec94ff0ea08f7c091e32e3ec05927eca4a1 geo collection enhancement, fragment on hover in image page, and version number to 0.7.1. diff -r 25886ec94ff0 -r 4379c6f1d645 src/egonomy/__init__.py --- a/src/egonomy/__init__.py Thu Jul 18 11:25:53 2013 +0200 +++ b/src/egonomy/__init__.py Thu Jul 18 16:54:24 2013 +0200 @@ -1,4 +1,4 @@ -VERSION = (0, 7, 0, "final", 1) +VERSION = (0, 7, 1, "final", 1) VERSION_STR = unicode(".".join(map(lambda i:"%02d" % (i,), VERSION[:2]))) diff -r 25886ec94ff0 -r 4379c6f1d645 src/egonomy/static/egonomy/css/style.css --- a/src/egonomy/static/egonomy/css/style.css Thu Jul 18 11:25:53 2013 +0200 +++ b/src/egonomy/static/egonomy/css/style.css Thu Jul 18 16:54:24 2013 +0200 @@ -360,13 +360,23 @@ .senapi_text { } -#info_tag{ +#info_tag, #info_fragment{ background-color: white; border: 1px solid #AAAAAA; pointer-events: none; position: absolute; z-index: 1000; } -#info_tag img{ +#info_tag img, #info_fragment h3, #info_fragment p{ margin: 5px; } +#info_fragment h3{ font-size: 1.4em; } +#info_fragment .desc{ font-size: 0.8em; } + +/* tests */ +.svg_over_image{ + opacity: 0; +} +.svg_over_image:hover{ + opacity: 1; +} diff -r 25886ec94ff0 -r 4379c6f1d645 src/egonomy/templates/egonomy_annotate_picture.html --- a/src/egonomy/templates/egonomy_annotate_picture.html Thu Jul 18 11:25:53 2013 +0200 +++ b/src/egonomy/templates/egonomy_annotate_picture.html Thu Jul 18 16:54:24 2013 +0200 @@ -42,22 +42,30 @@
-
- {% with img.info.image_file as image %} - {% if image|is_portrait %} - {% thumbnail image "x600" format="PNG" crop="center" as im %} - - {% empty %} - - {% endthumbnail %} - {% else %} - {% thumbnail image "600" format="PNG" crop="center" as im %} - - {% empty %} - - {% endthumbnail %} - {% endif %} - {% endwith %} +
+ {% with img.info.image_file as image %} + {% if image|is_portrait %} + {% thumbnail image "x600" format="PNG" crop="center" as im %} + + {% empty %} + + {% endthumbnail %} + {% else %} + {% thumbnail image "600" format="PNG" crop="center" as im %} + + {% empty %} + + {% endthumbnail %} + {% endif %} + {% endwith %} + {% if fragment_list %} + + {% for fragment in fragment_list %} + + {% endfor %} + + {% endif %}
{% if search %} {% if index_search > 0 %} @@ -147,5 +155,30 @@

{% trans "No collection" %}

{% endif %}
+
{% endblock %} + +{% block js_page %} + +{% endblock %} \ No newline at end of file diff -r 25886ec94ff0 -r 4379c6f1d645 src/egonomy/templates/egonomy_view_collection.html --- a/src/egonomy/templates/egonomy_view_collection.html Thu Jul 18 11:25:53 2013 +0200 +++ b/src/egonomy/templates/egonomy_view_collection.html Thu Jul 18 16:54:24 2013 +0200 @@ -265,14 +265,26 @@ // start the map in South-East England map.setView(new L.LatLng(48.833, 2.333),4); map.addLayer(osm); + var minLat = false, maxLat = false, minLng = false, maxLng = false; // markers for (var loc in places) { if(places[loc]["location"]["lat"] && places[loc]["location"]["lng"]){ // Set marker - var marker = L.marker([places[loc]["location"]["lat"], places[loc]["location"]["lng"]]).addTo(map); + var lat = places[loc]["location"]["lat"]; + var lng = places[loc]["location"]["lng"]; + var marker = L.marker([lat, lng]).addTo(map); marker.bindPopup(loc); places[loc]["marker"] = marker; + // Save lat/lng to get max/min lat/lng + if(!minLat){ minLat = lat; } + if(!maxLat){ maxLat = lat; } + if(!minLng){ minLng = lng; } + if(!maxLng){ maxLng = lng; } + if(lat bounds ) + map.fitBounds([[minLat, minLng], [maxLat, maxLng]]); } function highlight_items(items){ // unhighlight all