Skip to content

Commit a74035b

Browse files
authored
feat: Release 3.3 (#508)
* Update CHANGELOG.rst * Update __init__.py * Fix: Checkboxes More: Flexbox-misalignments * Update changelog * Remove typo * Fix: login bottom margin
1 parent d7dcfba commit a74035b

File tree

6 files changed

+44
-42
lines changed

6 files changed

+44
-42
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
Changelog
33
=========
44

5-
unreleased
6-
==========
5+
3.3.0 (2024-01-14)
6+
==================
77

8-
* Adjiust flex-container in newer Django versions (4.2+) for submit row and admin header
8+
* Allow more than two columns (as in the original Django admin)
9+
* Adjust flex-container in newer Django versions (4.2+) for submit row and admin header
10+
* Fix help texts for checkboxes and radio buttons
911

1012
3.2.7 (2024-01-04)
1113
==================

djangocms_admin_style/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
10. Publish the release when ready
1717
11. Github actions will publish the new package to pypi
1818
"""
19-
__version__ = '3.2.7'
19+
__version__ = '3.3.0'

djangocms_admin_style/sass/components/_content.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,12 @@ ul.messagelist + #content {
374374
width: 100% !important;
375375
input {
376376
width: calc(100% - 50px) !important;
377-
margin: 5px 50px 5px 0 !important;
377+
margin: 0px 50px 5px 0 !important;
378378
}
379379
img {
380380
position: absolute;
381381
right: 0;
382-
margin: 5px 0;
382+
margin: 0;
383383

384384
order: 2;
385385
}

djangocms_admin_style/sass/components/_forms.scss

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,27 @@ form {
99
fieldset, .inline-group {
1010
width: 80%;
1111
}
12+
13+
// Newer Django admin styles use flexbox, we do not
14+
.flex-container {
15+
display: block;
16+
margin-right: 20px;
17+
}
18+
.flex-container.form-multiline {
19+
display: flex;
20+
margin-right: 0;
21+
div.fieldBox {
22+
display: block;
23+
//margin-right: 0;
24+
}
25+
div:has(div.hidden) {
26+
display: none;
27+
}
28+
}
29+
fieldset.module > h2 {
30+
margin-right: 20px;
31+
}
32+
1233
// only uses this styles if form-row is not set on a table row because before and after breaks tables #247
1334
.form-row:not(tr) {
1435
// adds clearfix because overflow hidden truncates highlighted focus fields #242
@@ -100,9 +121,11 @@ form {
100121
}
101122

102123
// only affects field boxes when they are next to each other
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) {
124+
& > .fieldBox, & > div:not([class]) > .fieldBox,
125+
& > div:not([class]) > .flex-container > div:not(.related-widget-wrapper, .cke, .widget),
126+
.form-multiline > div:not(.related-widget-wrapper,
127+
.form-multiline > div:not([class]) > div:not(.related-widget-wrapper),
128+
.cke, .widget) {
106129
margin-right: 0px;
107130
box-sizing: border-box;
108131
width: 50%;
@@ -119,26 +142,6 @@ form {
119142
border-top: none;
120143
// padding-right: 2vw;
121144
}
122-
123-
&:nth-of-type(1) {
124-
&:nth-last-of-type(2) {
125-
width: 50%;
126-
box-sizing: border-box;
127-
margin: 0 !important;
128-
padding-right: 10px;
129-
padding-left: 0;
130-
}
131-
}
132-
133-
&:nth-of-type(2) {
134-
&:nth-last-of-type(1) {
135-
width: 50%;
136-
box-sizing: border-box;
137-
margin: 0 !important;
138-
padding-left: 10px;
139-
padding-top: 0;
140-
}
141-
}
142145
}
143146
}
144147
input[type="color"] {
@@ -430,7 +433,7 @@ form {
430433
}
431434
.checkbox-row {
432435
line-height: 20px;
433-
margin-bottom: -10px;
436+
margin-bottom: -5px;
434437
// wraps checkbox rows with border #188
435438
padding-top: 15px;
436439
border-top: solid 1px $gray-lighter;
@@ -459,10 +462,13 @@ form {
459462
}
460463

461464
// backport from django 1.9
462-
.aligned label + p {
463-
padding: 6px 0;
464-
margin-top: 0;
465-
margin-bottom: 0;
465+
.aligned label.vCheckboxLabel {
466+
display: inline;
467+
+ p {
468+
padding: 6px 0;
469+
margin-top: 0;
470+
margin-bottom: 0;
471+
}
466472
}
467473
}
468474

@@ -996,10 +1002,3 @@ form select[multiple] {
9961002
.related-widget-wrapper-link:link:hover {
9971003
opacity: 1;
9981004
}
999-
1000-
form .flex-container {
1001-
display: block;
1002-
div.fieldBox {
1003-
display: inline-block;
1004-
}
1005-
}

djangocms_admin_style/sass/components/_login.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ body.login.djangocms-admin-style {
99
width: 35.5% !important;
1010
min-width: 320px !important;
1111
margin-top: 165px;
12+
padding: 20px 0;
1213
border: none;
1314
box-shadow: $base-box-shadow;
1415
background-color: $white !important;

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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)