Commit 0ca73836 authored by Brian Rosner's avatar Brian Rosner
Browse files

Fixed #8292 -- Honor filter_horizontal and filter_vertical in inlines...

Fixed #8292 -- Honor filter_horizontal and filter_vertical in inlines correctly. It now adds the right Javascript to handle them when they are the only ones on the page. Thanks dakrauth for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 72713310
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -828,6 +828,8 @@ class InlineModelAdmin(BaseModelAdmin):
        js = []
        if self.prepopulated_fields:
            js.append('js/urlify.js')
        if self.filter_vertical or self.filter_horizontal:
            js.extend(['js/SelectBox.js' , 'js/SelectFilter2.js'])
        return forms.Media(js=['%s%s' % (settings.ADMIN_MEDIA_PREFIX, url) for url in js])
    media = property(_media)