Ticket #7733: 7733-list_display_links.patch

File 7733-list_display_links.patch, 2.1 KB (added by Will Hardy, 16 years ago)

Includes fix for all 'list_display_links' fields, excluding 'allow_tags' fields

  • django/contrib/admin/media/css/global.css

     
    6767tr.alt { background:#f6f6f6; }
    6868.row1 { background:#EDF3FE; }
    6969.row2 { background:white; }
     70table a.list-display-link { display: block; margin: -5px 0; padding: 5px 0; }
    7071
    7172/* SORTABLE TABLES */
    7273thead th a:link, thead th a:visited { color:#666; display:block; }
  • django/contrib/admin/media/css/dashboard.css

     
    44.dashboard .module table th { width:100%; }
    55.dashboard .module table td { white-space:nowrap; }
    66.dashboard .module table td a { display:block; padding-right:.6em; }
     7.dashboard .module table th a { display:block; margin:-5px 0; padding:5px 0;}
    78
    89/*  RECENT ACTIONS MODULE  */
    910.module ul.actionlist { margin-left:0; }
    10 ul.actionlist li { list-style-type:none; }
    11  No newline at end of file
     11ul.actionlist li { list-style-type:none; }
  • django/contrib/admin/templatetags/admin_list.py

     
    196196            # Convert the pk to something that can be used in Javascript.
    197197            # Problem cases are long ints (23L) and non-ASCII strings.
    198198            result_id = repr(force_unicode(getattr(result, pk)))[1:]
    199             yield mark_safe(u'<%s%s><a href="%s"%s>%s</a></%s>' % \
     199            yield mark_safe(u'<%s%s><a class="list-display-link" href="%s"%s>%s</a></%s>' % \
    200200                (table_tag, row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %s); return false;"' % result_id or ''), conditional_escape(result_repr), table_tag))
    201201        else:
    202202            yield mark_safe(u'<td%s>%s</td>' % (row_class, conditional_escape(result_repr)))
Back to Top