Mercurial > public > sg101
comparison gpp/core/widgets.py @ 149:ab7830b067b3
Implement ticket #40. Added a simple way to search for usernames and then view their profile. Moved this ajax username search feature out of the messages app and into core.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Mon, 14 Dec 2009 05:07:28 +0000 |
parents | 9bfe07c26c78 |
children | be3fff614b93 |
comparison
equal
deleted
inserted
replaced
148:35a0e6345815 | 149:ab7830b067b3 |
---|---|
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-autocomplete'] | 16 js = settings.GPP_THIRD_PARTY_JS['jquery-autocomplete'] |
17 | 17 |
18 def render(self, name, value, attrs=None): | 18 def render(self, name, value, attrs=None): |
19 url = reverse('messages-ajax_users') | 19 url = reverse('core-ajax_users') |
20 output = super(AutoCompleteUserInput, self).render(name, value, attrs) | 20 output = super(AutoCompleteUserInput, self).render(name, value, attrs) |
21 return output + mark_safe(u'''\ | 21 return output + mark_safe(u'''\ |
22 <script type="text/javascript"> | 22 <script type="text/javascript"> |
23 jQuery("#id_%s").autocomplete("%s", { | 23 jQuery("#id_%s").autocomplete("%s", { |
24 width: 150, | 24 width: 150, |