Fixed #26872 -- Fixed text overflow in ModelAdmin.list_filter.
This commit is contained in:
parent
dab83e5ba1
commit
2f587737d7
|
@ -166,6 +166,8 @@
|
|||
#changelist-filter a {
|
||||
display: block;
|
||||
color: #999;
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#changelist-filter li.selected {
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
<ul>
|
||||
{% for choice in choices %}
|
||||
<li{% if choice.selected %} class="selected"{% endif %}>
|
||||
<a href="{{ choice.query_string|iriencode }}">{{ choice.display }}</a></li>
|
||||
<a href="{{ choice.query_string|iriencode }}" title="{{ choice.display }}">{{ choice.display }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
@ -592,7 +592,7 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
|
|||
for value in params['values']:
|
||||
query_string = urlencode({filter_path: value})
|
||||
# ensure filter link exists
|
||||
self.assertContains(response, '<a href="?%s">' % query_string)
|
||||
self.assertContains(response, '<a href="?%s"' % query_string)
|
||||
# ensure link works
|
||||
filtered_response = self.client.get('%s?%s' % (changelist_url, query_string))
|
||||
self.assertEqual(filtered_response.status_code, 200)
|
||||
|
@ -664,8 +664,14 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
|
|||
"field 'choices' option named group."
|
||||
)
|
||||
self.assertContains(response, '<div id="changelist-filter">')
|
||||
self.assertContains(response, '<a href="?surface__exact=x">Horizontal</a>', msg_prefix=fail_msg, html=True)
|
||||
self.assertContains(response, '<a href="?surface__exact=y">Vertical</a>', msg_prefix=fail_msg, html=True)
|
||||
self.assertContains(
|
||||
response, '<a href="?surface__exact=x" title="Horizontal">Horizontal</a>',
|
||||
msg_prefix=fail_msg, html=True
|
||||
)
|
||||
self.assertContains(
|
||||
response, '<a href="?surface__exact=y" title="Vertical">Vertical</a>',
|
||||
msg_prefix=fail_msg, html=True
|
||||
)
|
||||
|
||||
def test_change_list_null_boolean_display(self):
|
||||
Post.objects.create(public=None)
|
||||
|
|
Loading…
Reference in New Issue