Hi Adrian,

If I understand well, you want to add css class in menu.
If I use the CommonMenus.xml located in framework/common/widget, you can see this :

<menu name="CommonAppBarMenu" default-menu-item-name="main" id="app-navigation" type="simple" title="${applicationTitle}&amp;nbsp;" default-selected-style="selected" menu-container-style="button-bar tab-bar" selected-menuitem-context-field-name="headerItem">
        <menu-item name="main" title="${uiLabelMap.CommonMain}">
            <condition><not><if-empty field="userLogin"/></not></condition>
            <link target="main" link-type="anchor"/>
        </menu-item>
    </menu>

where :
    id="app-navigation" will be the html element type

    name="CommonAppBarMenu" will be the html id

default-selected-style="selected" will be the selected class definition for css

menu-container-style="button-bar tab-bar" will be the main class for css

I think that if you want to add a css class in your menu, you have to put it in "menu-container-style"

And if you want to use a different menu style for different application, you have to create several "common" menu that will be used as extends in your application menus.

hope it help,

Julien.

Le 19/05/2014 08:49, Adrian Stern a écrit :
Hi Adrian. Ok i got this and thanks for the clarification.

But just in sake for a better understanding of Ofbiz. Where would i add a
css Class to an Element which is defined in Xml like the bespoken Menu?


On 16 May 2014 16:54, Adrian Crum <adrian.c...@sandglass-software.com>wrote:

The current markup and styling follows the OFBiz HTML and CSS Best
Practices:

https://cwiki.apache.org/confluence/display/OFBADMIN/
HTML+and+CSS+Best+Practices

Having application-specific CSS classes violates the concept of visual
themes. The styling should always work the same - regardless of the
application.


Adrian Crum
Sandglass Software
www.sandglass-software.com

On 5/14/2014 6:40 AM, Adrian Stern wrote:

I've played around with visual themes and so far i really like the ease of
use. But something bothers me anyways.

There seems to be no CSS-classes given to elements besides some very basic
ones. This makes it basically impossible to style forms relative to the
Application they're in.

A global div-wrap with class=app-application would already help a big
deal.
Also a class telling me which sub menu is selected would be valuable.

app-accounting = application
app-acc-payments = app navigation
app-screen-name = maybe better than app navigation

I think from something like this, everyone would benefit and I would
happily do it. What does the community think? Maybe there is a reason for
the lack of this?
Would it be possible to arrange such an improvement?

Such an improvement would not break any themes but instead opening the
door
for new, more beautiful themes.



Reply via email to