From c14937cf7a1e8c25702e89485cc2dd33aa0d3a16 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Tue, 26 Jan 2010 15:02:53 +0000 Subject: Fixed #12508 - Added ability to dynamically add inlines in the admin app. Refs #13. Also introduces an ``empty_form`` attribute on formsets to make it easier to implement dynamic forms. Many thanks to Zain Memon for the initial patch from his Summer of Code 2009 project, Stanislaus Madueke for his django-dynamic-formset app and all the other people helping out. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12297 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/media/css/forms.css | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'django/contrib/admin/media/css/forms.css') diff --git a/django/contrib/admin/media/css/forms.css b/django/contrib/admin/media/css/forms.css index fbe4b753af..6716d1c4d5 100644 --- a/django/contrib/admin/media/css/forms.css +++ b/django/contrib/admin/media/css/forms.css @@ -247,10 +247,7 @@ fieldset.monospace textarea { } .inline-related h3 span.delete { - padding-left: 20px; - position: absolute; - top: 2px; - right: 10px; + float: right; } .inline-related h3 span.delete label { @@ -274,6 +271,11 @@ fieldset.monospace textarea { color: #fff; } +.inline-group .tabular fieldset.module { + border: none; + border-bottom: 1px solid #ddd; +} + .inline-related.tabular fieldset.module table { width: 100%; } @@ -320,8 +322,28 @@ fieldset.monospace textarea { padding: 0 5px; } -.inline-group ul.tools a.add { +.inline-group div.add-row, +.inline-group .tabular tr.add-row td { + color: #666; + padding: 3px 5px; + border-bottom: 1px solid #ddd; + background: #e1e1e1 url(../img/admin/nav-bg.gif) top left repeat-x; +} + +.inline-group .tabular tr.add-row td { + padding: 4px 5px 3px; + border-bottom: none; +} + +.inline-group ul.tools a.add, +.inline-group div.add-row a, +.inline-group .tabular tr.add-row td a { background: url(../img/admin/icon_addlink.gif) 0 50% no-repeat; padding-left: 14px; + font-size: 11px; + outline: 0; /* Remove dotted border around link */ } +.empty-form { + display: none; +} -- cgit v1.3