summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chimere/static/chimere/css/styles.css6
-rw-r--r--chimere/static/chimere/js/jquery.chimere.js2
-rw-r--r--chimere/templates/chimere/blocks/map.html2
-rw-r--r--chimere/templates/chimere/blocks/share_bar.html20
-rw-r--r--chimere/templates/chimere/detail.html2
-rw-r--r--chimere/templatetags/chimere_tags.py4
-rw-r--r--chimere/views.py2
-rw-r--r--settings.py6
8 files changed, 31 insertions, 13 deletions
diff --git a/chimere/static/chimere/css/styles.css b/chimere/static/chimere/css/styles.css
index edd48c9..d3ff4df 100644
--- a/chimere/static/chimere/css/styles.css
+++ b/chimere/static/chimere/css/styles.css
@@ -661,6 +661,10 @@ div#sidebar-container{
margin-top: 15px;
}
+.share-icon .popover{
+ top: -18.5px !important;
+}
+
#detail_start_date,
#detail_end_date,
@@ -753,10 +757,12 @@ ul.share li{
display:inline;
line-height:22px;
vertical-align: bottom;
+ padding: 0 0.5em;
}
.share a{
text-decoration:None;
+ color: #999;
}
.share img{
diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js
index 319e93a..098e595 100644
--- a/chimere/static/chimere/js/jquery.chimere.js
+++ b/chimere/static/chimere/js/jquery.chimere.js
@@ -839,7 +839,7 @@ function transformCoordToLonLat(coord) {
settings[map_id]._move_end_time = n;
settings[map_id]._reload_on_move(e);
},
- update_permalink: function(e){
+ update_permalink: function(map_id){
var view = settings[map_id].map.getView();
var center = ol.proj.transform(
view.getCenter(),
diff --git a/chimere/templates/chimere/blocks/map.html b/chimere/templates/chimere/blocks/map.html
index 179cc9a..8960d90 100644
--- a/chimere/templates/chimere/blocks/map.html
+++ b/chimere/templates/chimere/blocks/map.html
@@ -85,7 +85,7 @@ $("#{{map_id}}").show();
{{extra_map_def|safe}}
function update_permalink(){
- $('#{{map_id}}').chimere('update_permalink');
+ $('#{{map_id}}').chimere('update_permalink', '{{map_id}}');
};
</script>
diff --git a/chimere/templates/chimere/blocks/share_bar.html b/chimere/templates/chimere/blocks/share_bar.html
index eddef38..8829401 100644
--- a/chimere/templates/chimere/blocks/share_bar.html
+++ b/chimere/templates/chimere/blocks/share_bar.html
@@ -4,13 +4,25 @@
<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}}'><img src="{{share_network.0.2}}" alt="{{share_network.0.0}}"/></a></li>
- {% if not email_only %}
+ {% if email_only %}
+ <li class='share-send'>
+ <a class='share_link share_id_{{share_networks.0.0}}_single' href='{{share_networks.0.1}}'>
+ <i class="fa {{share_networks.0.2}}" aria-hidden="true"></i>
+ </a>
+ </li>
+ {% else %}
{% for share_network in share_networks %}
- <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>
+ <li class='shared'>
+ <a class='share_link share_id_{{share_network.0}}'
+ href='{{share_network.1}}' title="{{share_network.0}}">
+ <i class="fa {{share_network.2}}" aria-hidden="true"></i>
+ </a>
+ </li>
{% endfor %}
{% if rss %}<li class='shared'><a href='{% url "chimere:feeds-global" %}'>
- <img src='{{STATIC_URL}}chimere/img/feed.png' alt='Feeds'/></a></li>{% endif %}{%endif%}
+ <i class="fa fa-rss-square" aria-hidden="true"></i>
+ </a>
+ </li>{% endif %}{%endif%}
</ul>{% endif %}
<script type='text/javascript'>
<!--
diff --git a/chimere/templates/chimere/detail.html b/chimere/templates/chimere/detail.html
index 1ea8a1e..abb5243 100644
--- a/chimere/templates/chimere/detail.html
+++ b/chimere/templates/chimere/detail.html
@@ -34,7 +34,7 @@
</div>
<div id="share-bar-content">
- {% share_bar marker.name '' '' %}
+ {% share_bar marker '' '' %}
</div>
<div id='detail-content'>
diff --git a/chimere/templatetags/chimere_tags.py b/chimere/templatetags/chimere_tags.py
index 626289f..87a590a 100644
--- a/chimere/templatetags/chimere_tags.py
+++ b/chimere/templatetags/chimere_tags.py
@@ -361,9 +361,9 @@ def get_tinyfied_url(marker, area_name=''):
@register.inclusion_tag('chimere/blocks/share_bar.html',
takes_context=True)
-def share_bar(context, name='', email_only=False, rss=True):
+def share_bar(context, item, email_only=False, rss=True):
context['STATIC_URL'] = settings.STATIC_URL
- context['name'] = name
+ context['name'] = item.name
context['rss'] = rss
context['email_only'] = email_only
context['share_networks'] = [
diff --git a/chimere/views.py b/chimere/views.py
index 9fa4433..02f79fe 100644
--- a/chimere/views.py
+++ b/chimere/views.py
@@ -971,7 +971,7 @@ def getTinyfiedUrl(request, parameters, area_name=''):
if not url.startswith('http'):
url = get_base_uri(request) + url
url = re.sub("([^:])\/\/", "\g<1>/", url)
- text = settings.PROJECT_NAME
+ text = response_dct['area'].name
if 'current_feature' in parameters:
for item in parameters.split('&'):
if 'current_feature' in item:
diff --git a/settings.py b/settings.py
index 0978c01..87d1553 100644
--- a/settings.py
+++ b/settings.py
@@ -346,11 +346,11 @@ if 'CHIMERE_SHARE_NETWORKS' not in globals():
global CHIMERE_SHARE_NETWORKS
CHIMERE_SHARE_NETWORKS = (
("Email", 'mailto:?subject=%(text)s&body=%(url)s',
- STATIC_URL + 'chimere/img/email.png'),
+ "fa-envelope"),
("Facebook", 'http://www.facebook.com/sharer.php?t=%(text)s&u=%(url)s',
- STATIC_URL + 'chimere/img/facebook.png'),
+ "fa-facebook-official"),
("Twitter", 'http://twitter.com/home?status=%(text)s %(url)s',
- STATIC_URL + 'chimere/img/twitter.png'),
+ "fa-twitter"),
)
if 'OSM_MOBILE_JS_URLS' not in globals():