comparison gpp/gcalendar/static/js/gcalendar_edit.js @ 312:88b2b9cb8c1f

Fixing #142; cut over to the django.contrib.staticfiles app.
author Brian Neal <bgneal@gmail.com>
date Thu, 27 Jan 2011 02:56:10 +0000
parents
children
comparison
equal deleted inserted replaced
311:b1c39788e511 312:88b2b9cb8c1f
1 $(document).ready(function() {
2 $('.gcal-del').click(function () {
3 if (confirm('Really delete this event?')) {
4 var id = this.id;
5 if (id.match(/gcal-(\d+)/)) {
6 $.ajax({
7 url: '/calendar/delete/',
8 type: 'POST',
9 data: { id : RegExp.$1 },
10 dataType: 'text',
11 success: function (id) {
12 var id = '#gcal-' + id;
13 $(id).parents('li').hide('normal');
14 },
15 error: function (xhr, textStatus, ex) {
16 alert('Oops, an error occurred. ' + xhr.statusText + ' - ' +
17 xhr.responseText);
18 }
19 });
20 }
21 }
22 return false;
23 });
24 });