Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
koscikte committed Dec 18, 2010
1 parent 0d23af9 commit 671f747
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions js/main.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,42 @@
}
});
}

$('a.hide_event').click ( function () {
hide_event($(this));
});

var hide_event = function (this_el) {
var this_id = this_el.attr('id');
this_id = this_id.split('_');

var event_id = this_id[1];
var user_id = this_id[2];

$.ajax({
type: "POST",
url: "<?php ed(); ?>functions/ajax.php",
data: ({action:'ajax',function:'hide_event',eventID:event_id,
userID:user_id}),
success: function (r) {
if (r == 1) {
var sel = $('a#hidden_'+event_id+'_'+user_id);
sel.click ( function () {
hide_event($(this)); });
update_events();
}
}
});
}

var update_events = function () {
$.ajax({
type: "POST",
url: window.location.pathname,
data: ({action:'update'}),
success: function (r) {
$('div.event_listing').html(r);
}
});
}
});

0 comments on commit 671f747

Please sign in to comment.