Code

Ticket #2612: admin_inlines.diff

File admin_inlines.diff, 3.5 KB (added by nathan, 6 years ago)

This one's better

Line 
1Index: media/css/global.css
2===================================================================
3--- media/css/global.css        (revision 8854)
4+++ media/css/global.css        (working copy)
5@@ -46,7 +46,7 @@
6 .quiet, a.quiet:link, a.quiet:visited { color:#999 !important;font-weight:normal !important; }
7 .quiet strong { font-weight:bold !important; }
8 .float-right { float:right; }
9-.float-left { float:left; }
10+.float-left { float:left; margin-right: 20px; }
11 .clear { clear:both; }
12 .align-left { text-align:left; }
13 .align-right { text-align:right; }
14@@ -139,4 +139,4 @@
15 
16 /* OBJECT HISTORY */
17 table#change-history { width:100%; }
18-table#change-history tbody th { width:16em; }
19+table#change-history tbody th { width:16em; }
20\ No newline at end of file
21Index: media/css/forms.css
22===================================================================
23--- media/css/forms.css (revision 8854)
24+++ media/css/forms.css (working copy)
25@@ -9,7 +9,6 @@
26 /* FORM LABELS */
27 form h4 { margin:0 !important; padding:0 !important; border:none !important; }
28 label { font-weight:normal !important; color:#666; font-size:12px; }
29-label.inline { margin-left:20px; }
30 .required label, label.required { font-weight:bold !important; color:#333 !important; }
31 
32 /* RADIO BUTTONS */
33@@ -19,8 +18,7 @@
34 form ul.inline li { float:left; padding-right:7px; }
35 
36 /* ALIGNED FIELDSETS */
37-.aligned label { display:block; padding:0 1em 3px 0; float:left; width:8em; }
38-.aligned label.inline { display:inline; float:none; }
39+.aligned label { display:block; padding:3px 10px 0 0; float:left; width:8em; }
40 .colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField { width:350px; }
41 form .aligned p, form .aligned ul { margin-left:7em; padding-left:30px; }
42 form .aligned table p { margin-left:0; padding-left:0; }
43@@ -60,10 +58,11 @@
44 .module table .vPositiveSmallIntegerField { width:2.2em; }
45 .vTextField { width:20em; }
46 .vIntegerField { width:5em; }
47+.vForeignKeyRawIdAdminField { width: 5em; }
48 
49-/* x unsorted */
50+/* INLINES */
51 .inline-group {padding:0; border:1px solid #ccc; margin:10px 0;}
52-.inline-group .aligned label { width: 7em; }
53+.inline-group .aligned label { width: 8em; }
54 
55 .inline-related {position:relative;}
56 .inline-related h3 {margin: 0; color:#666; padding:3px 5px; font-size:11px; background:#e1e1e1 url(../img/admin/nav-bg.gif) top left repeat-x; border-bottom:1px solid #ddd;}
57Index: media/css/widgets.css
58===================================================================
59--- media/css/widgets.css       (revision 8854)
60+++ media/css/widgets.css       (working copy)
61@@ -33,7 +33,6 @@
62 /* DATE AND TIME */
63 p.datetime { line-height:20px; margin:0; padding:0; color:#666; font-size:11px; font-weight:bold; }
64 .datetime span { font-size:11px; color:#ccc; font-weight:normal; white-space:nowrap; }
65-.vDateField { margin-left:4px; }
66 table p.datetime { font-size:10px; margin-left:0; padding-left:0; }
67 
68 /* FILE UPLOADS */
69Index: templates/admin/includes/fieldset.html
70===================================================================
71--- templates/admin/includes/fieldset.html      (revision 8855)
72+++ templates/admin/includes/fieldset.html      (working copy)
73@@ -5,7 +5,7 @@
74       <div class="form-row{% if line.errors %} errors{% endif %} {% for field in line %}{{ field.field.name }} {% endfor %} ">
75       {{ line.errors }}
76       {% for field in line %}
77-      <div class="float-left">
78+      <div{% if not line.fields|length_is:"1" %} class="float-left"{% endif %}>
79           {% if field.is_checkbox %}
80               {{ field.field }}{{ field.label_tag }}
81           {% else %}