Task #54286
closed
ClickMenu: Set background via CSS instead of JS
Added by Stefan Neufeind almost 11 years ago.
Updated about 6 years ago.
Category:
Backend User Interface
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).
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 . '>
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.
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF