Icon in menu to close to text (ultima v1.1)

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
rokb
Posts: 6
Joined: 16 Dec 2016, 15:15

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>

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>
css in theme

Code: Select all

.layout-wrapper .ultima-menu li a i:first-child {
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
    font-size: 24px;
}

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

01 Dec 2017, 12:28

We couldn't understand the issue, could you please explain it in detail, preferably with a screenshot, what is your requirement?

Post Reply

Return to “Ultima - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest