Icon in menu to close to text (ultima v1.1)
Posted: 27 Oct 2017, 15:40
My problem is that when html is generated with <p:menu> for right menu, I get first <span> for badge and second <i> for image. It means, that following css in not bind to image an margin-right is not set.
Problem is in UltimaMenuRenderer.java
encodeSubmenu function has first encodeItemIcon and than encodeBadge and in encodeMenuItemContent function they are swapped.
Function encodeSubmenu has right order of generating html. To fix this just move line 285 to 282.
Code generated by <p:menu>
css in theme
Problem is in UltimaMenuRenderer.java
encodeSubmenu function has first encodeItemIcon and than encodeBadge and in encodeMenuItemContent function they are swapped.
Function encodeSubmenu has right order of generating html. To fix this just move line 285 to 282.
Code generated by <p:menu>
Code: Select all
<li id="menuform:settings" role="menuitem">
<a href="/BizBox-AZ-WP-91-85/views/settings.xhtml">
<span class="menuitem-badge">10</span>
<i class="material-icons">settings</i>
<span>Appearance settings</span>
</a>
<div class="layout-menu-tooltip">
<div class="layout-menu-tooltip-arrow"></div>
<div class="layout-menu-tooltip-text">Appearance settings</div>
</div>
</li>
Code: Select all
.layout-wrapper .ultima-menu li a i:first-child {
display: inline-block;
vertical-align: middle;
margin-right: 12px;
font-size: 24px;
}