Commit 509d02d6eed69191ada0c716bb6d058ad772d57e

Authored by Antonio Terceiro
1 parent fb942f86

Fixing "link to this page" feature.

For some weird reason it is not working on IE.

(ActionItem1711)
app/views/shared/noosfero_layout_features.rhtml
1 1 <% if is_testing_theme %>
2 2 <%= render :file => 'shared/theme_test_panel' %>
3 3 <% end %>
4   -
5   - <script type="text/javascript">
6   - $$("a").each(function(a){
7   - if ( a.href == document.location.href ) {
8   - a.className += " link-this-page";
9   - }
10   - });
11   - </script>
... ...
public/javascripts/application.js
... ... @@ -576,3 +576,11 @@ function limited_text_area(textid, limit) {
576 576 return true;
577 577 }
578 578 }
  579 +
  580 +jQuery(function($) {
  581 + $('a').each(function() {
  582 + if (this.href == document.location.href) {
  583 + $(this).addClass('link-this-page');
  584 + }
  585 + });
  586 +});
... ...