Commit 13b88959d68e6316b552804becbe1364941aa42f

Authored by Daniela Feitosa
1 parent c6dc9c48

Removed deprecated way to share on facebook

Also moved the addthis code to a partial

(ActionItem2610)
app/views/content_viewer/_addthis.rhtml 0 → 100644
... ... @@ -0,0 +1,8 @@
  1 +<div id="addThis">
  2 + <script type="text/javascript">
  3 + addthis_pub = '<%= escape_javascript( NOOSFERO_CONF['addthis_pub'] ) %>';
  4 + addthis_logo = '<%= escape_javascript( NOOSFERO_CONF['addthis_logo'] ) %>';
  5 + addthis_options = '<%= escape_javascript( NOOSFERO_CONF['addthis_options'] ) %>';
  6 + </script>
  7 + <a href="http://www.addthis.com/bookmark.php" id="bt_addThis" target="_blank" onmouseover="return addthis_open(this, '', '[URL]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><%= addthis_image_tag %></a>
  8 +</div>
... ...
app/views/content_viewer/view_page.rhtml
... ... @@ -43,21 +43,7 @@
43 43 <%= render :partial => 'shared/disabled_enterprise' %>
44 44  
45 45 <% if NOOSFERO_CONF['addthis_enabled'] %>
46   -<div id="addThis">
47   -<script type="text/javascript">
48   - addthis_pub = '<%= escape_javascript( NOOSFERO_CONF['addthis_pub'] ) %>';
49   - addthis_logo = '<%= escape_javascript( NOOSFERO_CONF['addthis_logo'] ) %>';
50   - addthis_config = {
51   - services_custom: {
52   - name: 'Facebook',
53   - url: '<%= addthis_facebook_url(@page) %>',
54   - icon: 'http://cache.addthiscdn.com/icons/v1/thumbs/facebook.gif'
55   - }
56   - };
57   - addthis_options = '<%= escape_javascript( NOOSFERO_CONF['addthis_options'] ) %>';
58   -</script>
59   -<a href="http://www.addthis.com/bookmark.php" id="bt_addThis" target="_blank" onmouseover="return addthis_open(this, '', '[URL]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><%= addthis_image_tag %></a>
60   -</div>
  46 + <%= render :partial => 'addthis' %>
61 47 <% end %>
62 48  
63 49 <% cache(@page.cache_key(params, user, language)) do %>
... ...