From d7bc1214748564604eb544c56dabb0b551737ae6 Mon Sep 17 00:00:00 2001 From: Alex Denisov <1101.debian@gmail.com> Date: Wed, 9 Jan 2013 21:02:41 +0000 Subject: [PATCH] replace javascript:void with preventDefault --- app/assets/javascripts/dashboard.js.coffee | 3 ++- app/helpers/events_helper.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/dashboard.js.coffee b/app/assets/javascripts/dashboard.js.coffee index 0f52793f..b0ae6bf8 100644 --- a/app/assets/javascripts/dashboard.js.coffee +++ b/app/assets/javascripts/dashboard.js.coffee @@ -3,7 +3,8 @@ $ -> dashboardPage = -> Pager.init 20, true - $(".event_filter_link").bind "click", -> + $(".event_filter_link").bind "click", (event) -> + event.preventDefault() toggleFilter $(this) reloadActivities() diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 771a6364..9b9d2a91 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -29,7 +29,7 @@ module EventsHelper end content_tag :div, class: "filter_icon #{inactive}" do - link_to 'javascript:void(0)', class: 'has_tooltip event_filter_link', id: "#{key}_event_filter", 'data-original-title' => tooltip do + link_to dashboard_path, class: 'has_tooltip event_filter_link', id: "#{key}_event_filter", 'data-original-title' => tooltip do image_tag "event_filter_#{key}.png" end end