Task #54286
closedClickMenu: Set background via CSS instead of JS
100%
Description
Currently the ClickMenu-rows change their background-color via JS:
onmouseover="this.bgColor='#dedede';" onmouseout="this.bgColor='';"
This could/should be done via CSS, making the necessary HTML smaller, saving JS-performance and keeping the styling in a central place (CSS).
Updated by Stefan Neufeind almost 11 years ago
Relevant places in source:
typo3/sysext/t3skin/Resources/Public/Css/visual/element_csm.css
15:table.typo3-CSM tr.typo3-CSM-itemRow {
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php
1192: <tr class="typo3-CSM-itemRow" onclick="' . htmlspecialchars($onClick) . '" onmouseover="this.bgColor=\'' . $GLOBALS['TBE_TEMPLATE']->bgColor5 . '\';" onmouseout="this.bgColor=\'\';"' . $CSM . '>
Updated by Stefan Neufeind almost 11 years ago
Currently the color-values are set in $GLOBALS['TBE_STYLES'] and are afaik not yet available via CSS. So for the moment they can't be used with CSS-classes or so.
As a general solution for the hovering in ClickMenu I see the using of CSS-hover-states. But to be able to add colors in a central place in the CSS maybe we'd need to use SASS or the like then.
Updated by Gerrit Code Review almost 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26092
Updated by Gerrit Code Review almost 11 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26092
Updated by Gerrit Code Review almost 11 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26092
Updated by Gerrit Code Review almost 11 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26092
Updated by Gerrit Code Review almost 11 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26092
Updated by Stefan Neufeind almost 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2ce726e459266b84737094f8bbfc87bd8f8639dd.