Fixed #2943 -- Changed admin select filter box to work properly with multi-byte characters in verbose_name. Thanks, mtsuyuki@gmail.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b0a8a75fc3
commit
3f9ebe6cc5
|
@ -197,8 +197,8 @@ def filter_interface_script_maybe(bound_field):
|
|||
f = bound_field.field
|
||||
if f.rel and isinstance(f.rel, models.ManyToManyRel) and f.rel.filter_interface:
|
||||
return '<script type="text/javascript">addEvent(window, "load", function(e) {' \
|
||||
' SelectFilter.init("id_%s", %r, %s, "%s"); });</script>\n' % (
|
||||
f.name, f.verbose_name, f.rel.filter_interface-1, settings.ADMIN_MEDIA_PREFIX)
|
||||
' SelectFilter.init("id_%s", "%s", %s, "%s"); });</script>\n' % (
|
||||
f.name, f.verbose_name.replace('"', '\\"'), f.rel.filter_interface-1, settings.ADMIN_MEDIA_PREFIX)
|
||||
else:
|
||||
return ''
|
||||
filter_interface_script_maybe = register.simple_tag(filter_interface_script_maybe)
|
||||
|
|
Loading…
Reference in New Issue