view media/js/gcalendar_edit.js @ 77:d5eed0a91a05

#24 - Make the default date for a birthday today - 30 years. This allows you to select any month with the picker if the field is initially blank.
author Brian Neal <bgneal@gmail.com>
date Fri, 10 Jul 2009 23:56:02 +0000
parents dbd703f7d63a
children b43e1288ff80
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+)/)) {
            $.post('/calendar/delete/', { id : RegExp.$1 }, function (id) {
               var id = '#gcal-' + id;
               $(id).parents('li').hide('normal');
            }, 'text');
         }
      }
      return false;
   });
});