Skip to content

Commit

Permalink
[TASK] Better behaviour for “Unused elements” after a drag & drop
Browse files Browse the repository at this point in the history
The unused elements in the page module have a specific styling
(orange heading). When the items are drag&drop'ed into an active
colPos, they previously kept their unused styling.

This change gives the "Unused elements" a global warning background
and removes the warning style from the content items so that they don't
stay orange after a drag and drop in a real colPos.

Resolves: #95230
Releases: master
Change-Id: Idaa323166ec2c8f62b6f0fe747e7965910dbd4b8
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71103
Tested-by: core-ci <typo3@b13.com>
Tested-by: Jonas Eberle <flightvision@googlemail.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Jonas Eberle <flightvision@googlemail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
rfoucard authored and bmack committed Sep 16, 2021
1 parent f0f4604 commit d013c73
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Build/Sources/Sass/module/_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ $page-ce-dropzone-possible-border: $state-warning-border;
background-color: $page-grid-cell-restricted;
}

.t3-page-column-unused {
background-color: $state-warning-bg;
}

.t3-grid-cell-hidden {
display: none;
}
Expand Down Expand Up @@ -104,7 +108,6 @@ $page-ce-dropzone-possible-border: $state-warning-border;
text-align: left;

[data-colpos='unused'] & {
color: $state-warning-text;
padding-top: $grid-gutter-width*2;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ public function getWrapperClassName(): string
if ($this->isDisabled()) {
$wrapperClassNames[] = 't3-page-ce-hidden t3js-hidden-record';
}
if (!in_array((string)$this->record['colPos'], $this->context->getBackendLayout()->getColumnPositionNumbers(), true)) {
$wrapperClassNames[] = 't3-page-ce-warning';
}

return implode(' ', $wrapperClassNames);
}
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/backend/Resources/Public/Css/backend.css

Large diffs are not rendered by default.

0 comments on commit d013c73

Please sign in to comment.