annotate media/js/shoutbox_app.js @ 5:63696b279e35

Display news links and send to friend on the summary page. Use icons.
author Brian Neal <bgneal@gmail.com>
date Sat, 11 Apr 2009 19:45:17 +0000
parents dbd703f7d63a
children 777451a98f9d
rev   line source
gremmie@1 1 $(document).ready(function() {
gremmie@1 2 $('div.shoutbox-history table tr:odd').addClass('odd');
gremmie@1 3 $('.edit').editable('/shout/edit/', {
gremmie@1 4 loadurl : '/shout/text/',
gremmie@1 5 indicator : 'Saving...',
gremmie@1 6 tooltip : 'Click to edit your shout...',
gremmie@1 7 submit : 'OK',
gremmie@1 8 cancel : 'Cancel'
gremmie@1 9 });
gremmie@1 10 $('.shout-del').click(function () {
gremmie@1 11 if (confirm('Really delete this shout?')) {
gremmie@1 12 var id = this.id;
gremmie@1 13 if (id.match(/shout-del-(\d+)/)) {
gremmie@1 14 $.post('/shout/delete/', { id : RegExp.$1 }, function (id) {
gremmie@1 15 var id = '#shout-del-' + id;
gremmie@1 16 $(id).parents('tr').fadeOut(1500, function () {
gremmie@1 17 $('div.shoutbox-history table tr:visible:even').removeClass('odd');
gremmie@1 18 $('div.shoutbox-history table tr:visible:odd').addClass('odd');
gremmie@1 19 });
gremmie@1 20 }, 'text');
gremmie@1 21 }
gremmie@1 22 }
gremmie@1 23 return false;
gremmie@1 24 });
gremmie@1 25 });