annotate media/js/shoutbox_app.js @ 11:cc8eb028def1

Update jquery-ui and theme version that is hosted on google. In preparation for having jquery on every page (?), make it so that the autocomplete plug is using the 'global' jquery, and not the one that came with it. It seems to work okay with jquery 1.3.2.
author Brian Neal <bgneal@gmail.com>
date Tue, 14 Apr 2009 02:35:35 +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 });