Opened 13 years ago

Closed 12 years ago

Last modified 12 years ago

#17978 closed Bug (fixed)

Minor layout issue when an inline contains a filter horizontal widget

Reported by: Aymeric Augustin Owned by: Julien Phalip
Component: contrib.admin Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Assuming these models:

from django.db import models

class Slave(models.Model):
    name = models.CharField(max_length=100)

class Master(models.Model):
    name = models.CharField(max_length=100)

class Apprentice(models.Model):
    name = models.CharField(max_length=100)
    master = models.OneToOneField(Master)
    slaves = models.ManyToManyField(Slave)

and this admin:

from django.contrib import admin
from .models import Apprentice, Master

class ApprenticeInline(admin.StackedInline):
    filter_horizontal = ('slaves',)
    model = Apprentice

class MasterAdmin(admin.ModelAdmin):
    inlines = (ApprenticeInline,)

admin.site.register(Master, MasterAdmin)

there's a small layout issue highlighted on the screenshot attached to this ticket.

The problem is caused by .inline-group .aligned label { with: 8em; } from forms.css overriding .selector .selector-filter label { width: 16px; } from widgets.css.

Attachments (1)

Screen Shot 2012-03-25 at 22.10.52.png (68.1 KB ) - added by Aymeric Augustin 13 years ago.

Download all attachments as: .zip

Change History (4)

by Aymeric Augustin, 13 years ago

comment:1 by anonymous, 13 years ago

Owner: changed from nobody to Julien Phalip

comment:2 by Julien Phalip <jphalip@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [8015593bc1f2f226e7979bfdee8b7e88658d0e74]:

Fixed #17978 -- Fixed a minor layout issue when an inline contains a filter horizontal widget. Thanks to Aymeric Augustin for the report.

comment:3 by Julien Phalip <jphalip@…>, 12 years ago

In [9a2ca4266ad3a58af7db3ecbf9b99270519bb8f2]:

[1.4.x] Fixed #17978 -- Fixed a minor layout issue when an inline contains a filter horizontal widget. Thanks to Aymeric Augustin for the report.

Note: See TracTickets for help on using tickets.
Back to Top