Reloading of events via ajax instead of page reloading.
This commit is contained in:
parent
0d9f73fa1e
commit
3cc0458312
|
@ -10,13 +10,20 @@ $(function(){
|
|||
|
||||
function dashboardPage(){
|
||||
$(".event_filter_link").bind('click',(function(){
|
||||
enableFilter(this.id);
|
||||
toggleFilter($(this));
|
||||
reloadActivities();
|
||||
}));
|
||||
}
|
||||
|
||||
function enableFilter(sender_id){
|
||||
function reloadActivities(){
|
||||
$('.content_list').html('');
|
||||
Pager.init(20, true);
|
||||
}
|
||||
|
||||
function toggleFilter(sender){
|
||||
sender.parent().toggleClass('inactive');
|
||||
var event_filters = $.cookie('event_filter');
|
||||
var filter = sender_id.split('_')[0];
|
||||
var filter = sender.attr('id').split('_')[0];
|
||||
if (!event_filters) {
|
||||
event_filters = new Array();
|
||||
} else {
|
||||
|
|
|
@ -29,7 +29,7 @@ module EventsHelper
|
|||
end
|
||||
|
||||
content_tag :div, class: "filter_icon #{inactive}" do
|
||||
link_to dashboard_path, class: 'has_tooltip event_filter_link', id: "#{key}_event_filter", 'data-original-title' => tooltip do
|
||||
link_to 'javascript:void(0)', class: 'has_tooltip event_filter_link', id: "#{key}_event_filter", 'data-original-title' => tooltip do
|
||||
image_tag "event_filter_#{key}.png"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue