Skip to content

Commit 7ee48a8

Browse files
authored
feat: Add Django 4.2 admin support (#500)
* Fix: avoid `<html data-theme="undefined">` * Add bundle * Fix broken color input * Add Django as dependency * Fix: `.flex-container` styling * Add multicolumn display for django 4.2+ * Avoided overflow for inline admin * Fix: Invalid menu background on admin page * Style delete link * Update build * Update changelog
1 parent a71b381 commit 7ee48a8

File tree

6 files changed

+38
-19
lines changed

6 files changed

+38
-19
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
Changelog
33
=========
44

5+
unreleased
6+
==========
7+
8+
* Style delete links
9+
* Fix read-only fields overlapping with their labels
10+
* Adjust flex-container in newer Django versions
11+
512
3.2.6 (2023-09-18)
613
==================
714

djangocms_admin_style/sass/components/_content.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,14 @@ ul.messagelist + #content {
304304
box-shadow: none;
305305
.deletelink-box {
306306
margin: 0;
307-
.deletelink {
308-
@include button-variant($btn-default-color, $btn-default-bgcolor, $btn-default-border, true);
309-
@include icon(trash-o);
310-
display: block;
311-
padding: 9px 20px !important;
312-
height: 36px;
313-
box-sizing: border-box;
314-
}
307+
}
308+
.deletelink {
309+
@include button-variant($btn-default-color, $btn-default-bgcolor, $btn-default-border, true);
310+
@include icon(trash-o);
311+
display: block;
312+
padding: 9px 20px !important;
313+
height: 36px;
314+
box-sizing: border-box;
315315
}
316316
input[type="submit"] {
317317
padding: 10px 20px !important;

djangocms_admin_style/sass/components/_forms.scss

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ form {
66
padding: 25px 25px;
77
background-color: $white;
88
box-shadow: $base-box-shadow;
9-
fieldset {
9+
fieldset, .inline-group {
1010
width: 80%;
1111
}
1212
// only uses this styles if form-row is not set on a table row because before and after breaks tables #247
@@ -21,7 +21,7 @@ form {
2121
}
2222
.form-row {
2323
// Improve readability by increasing contrast
24-
& > div > label:not(.vCheckboxLabel) {
24+
& div > label:not(.vCheckboxLabel) {
2525
color: $gray-darker !important;
2626
font-weight: bold !important;
2727
width: 100% !important;
@@ -100,13 +100,15 @@ form {
100100
}
101101

102102
// only affects field boxes when they are next to each other
103-
.fieldBox {
103+
& > .fieldBox, & > div > .fieldBox,
104+
& > div > .flex-container > div:not(.related-widget-wrapper, .cke, .widget),
105+
.form-multiline > div:not(.related-widget-wrapper, .cke, .widget) {
104106
margin-right: 0px;
105107
box-sizing: border-box;
106108
width: 50%;
107109
max-width: 500px;
108110

109-
& > label {
111+
& > label {
110112
text-transform: inherit;
111113
}
112114
& + .fieldBox {
@@ -115,7 +117,7 @@ form {
115117

116118
&:not(:first-child) {
117119
border-top: none;
118-
padding-right: 2vw;
120+
// padding-right: 2vw;
119121
}
120122

121123
&:nth-of-type(1) {
@@ -186,7 +188,7 @@ form {
186188
.cke {
187189
box-sizing: border-box;
188190
}
189-
.aligned {
191+
& {
190192
.field-number_of_visits p {
191193
margin-left: 0;
192194
padding-left: 0;
@@ -222,7 +224,7 @@ form {
222224
content: none;
223225
}
224226
& + div.readonly {
225-
margin-top: -30px;
227+
margin-top: -5px;
226228
}
227229
}
228230
label + label {
@@ -466,6 +468,15 @@ form {
466468

467469
.form-row .select2-container {
468470
min-width: 250px + 12px;
471+
&.select2-container--admin-autocomplete .select2-selection {
472+
min-height: 36px;
473+
.select2-selection__arrow {
474+
height: 32px;
475+
}
476+
.select2-selection__clear {
477+
margin-top: 5px;
478+
}
479+
}
469480
} // standard input width + default input padding
470481

471482
.inline-group .module:not(.aligned) .form-row input,

djangocms_admin_style/sass/components/_header.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@
8484
border: 1px solid $white;
8585
border-top: none;
8686
border-radius: 0 0 4px 4px;
87-
background: rgba($white, .97);
87+
background: $white;
88+
filter: opacity(.95);
8889
box-shadow: 0 1px 1px rgba($black-fallback, .4);
8990
&.submenu-open {
9091
display: block;

djangocms_admin_style/sass/components/_tables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
select {
201201
float: none;
202202
vertical-align: top;
203-
width: auto !important;
203+
// width: auto !important;
204204
}
205205
}
206206
&.delete {

djangocms_admin_style/static/djangocms_admin_style/css/djangocms-admin.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)