comparison gpp/core/widgets.py @ 12:f408971657b9

Changed the shoutbox: posts are now made by Ajax. The smiley farm is loaded only on demand. jQuery is now in the base template. May add scrolling later.
author Brian Neal <bgneal@gmail.com>
date Wed, 15 Apr 2009 01:13:17 +0000
parents cc8eb028def1
children 9bfe07c26c78
comparison
equal deleted inserted replaced
11:cc8eb028def1 12:f408971657b9
11 class AutoCompleteUserInput(forms.TextInput): 11 class AutoCompleteUserInput(forms.TextInput):
12 class Media: 12 class Media:
13 css = { 13 css = {
14 'all': settings.GPP_THIRD_PARTY_CSS['jquery-autocomplete'], 14 'all': settings.GPP_THIRD_PARTY_CSS['jquery-autocomplete'],
15 } 15 }
16 js = settings.GPP_THIRD_PARTY_JS['jquery'] + \ 16 js = settings.GPP_THIRD_PARTY_JS['jquery-autocomplete']
17 settings.GPP_THIRD_PARTY_JS['jquery-autocomplete']
18 17
19 def render(self, name, value, attrs=None): 18 def render(self, name, value, attrs=None):
20 url = reverse('messages-ajax_users') 19 url = reverse('messages-ajax_users')
21 output = super(AutoCompleteUserInput, self).render(name, value, attrs) 20 output = super(AutoCompleteUserInput, self).render(name, value, attrs)
22 return output + mark_safe(u'''\ 21 return output + mark_safe(u'''\