Mercurial > public > sg101
view gpp/gcalendar/static/js/gcalendar_edit.js @ 391:0398aae48807
Another tweak to the forum feeds query; see #191.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 23 Mar 2011 00:44:06 +0000 |
parents | 88b2b9cb8c1f |
children |
line wrap: on
line source
$(document).ready(function() { $('.gcal-del').click(function () { if (confirm('Really delete this event?')) { var id = this.id; if (id.match(/gcal-(\d+)/)) { $.ajax({ url: '/calendar/delete/', type: 'POST', data: { id : RegExp.$1 }, dataType: 'text', success: function (id) { var id = '#gcal-' + id; $(id).parents('li').hide('normal'); }, error: function (xhr, textStatus, ex) { alert('Oops, an error occurred. ' + xhr.statusText + ' - ' + xhr.responseText); } }); } } return false; }); });