Mercurial > public > sg101
comparison media/js/shoutbox_app.js @ 1:dbd703f7d63a
Initial import of sg101 stuff from private repository.
author | gremmie |
---|---|
date | Mon, 06 Apr 2009 02:43:12 +0000 |
parents | |
children | 777451a98f9d |
comparison
equal
deleted
inserted
replaced
0:900ba3c7b765 | 1:dbd703f7d63a |
---|---|
1 $(document).ready(function() { | |
2 $('div.shoutbox-history table tr:odd').addClass('odd'); | |
3 $('.edit').editable('/shout/edit/', { | |
4 loadurl : '/shout/text/', | |
5 indicator : 'Saving...', | |
6 tooltip : 'Click to edit your shout...', | |
7 submit : 'OK', | |
8 cancel : 'Cancel' | |
9 }); | |
10 $('.shout-del').click(function () { | |
11 if (confirm('Really delete this shout?')) { | |
12 var id = this.id; | |
13 if (id.match(/shout-del-(\d+)/)) { | |
14 $.post('/shout/delete/', { id : RegExp.$1 }, function (id) { | |
15 var id = '#shout-del-' + id; | |
16 $(id).parents('tr').fadeOut(1500, function () { | |
17 $('div.shoutbox-history table tr:visible:even').removeClass('odd'); | |
18 $('div.shoutbox-history table tr:visible:odd').addClass('odd'); | |
19 }); | |
20 }, 'text'); | |
21 } | |
22 } | |
23 return false; | |
24 }); | |
25 }); |