Mercurial > public > sg101
diff media/js/gcalendar_edit.js @ 1:dbd703f7d63a
Initial import of sg101 stuff from private repository.
author | gremmie |
---|---|
date | Mon, 06 Apr 2009 02:43:12 +0000 |
parents | |
children | b43e1288ff80 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media/js/gcalendar_edit.js Mon Apr 06 02:43:12 2009 +0000 @@ -0,0 +1,14 @@ +$(document).ready(function() { + $('.gcal-del').click(function () { + if (confirm('Really delete this event?')) { + var id = this.id; + if (id.match(/gcal-(\d+)/)) { + $.post('/calendar/delete/', { id : RegExp.$1 }, function (id) { + var id = '#gcal-' + id; + $(id).parents('li').hide('normal'); + }, 'text'); + } + } + return false; + }); +});