Feature #1037
closedStyle class 'itemselected' should be set for only for one menu item (in menu and its submenus)
0%
Description
Style class 'itemselected' should be set for only for one menu item (in menu and its submenus). In wt 3.1.11 it is set for menu item in main menu and (if previously selected) in submenu item (which leads to misunderstanding if menu is drop down menu and submenu items can be seen by hovering mouse...
So it could lead to behavior that one main menu item is selected and sub menu item selected (and that submenu item can be not in the path of main menu item)
For submenu item with style class 'itemselected' the one level upper menu item (that leads to this submenu item) style class should be 'upperselected' or something similar.
Hope you understand what am i writing about.
As an example of drop down menu is http://lwis.net/free-css-drop-down-menu/dropdown.nvidia.com.html
BR
LM
Updated by Koen Deforche about 13 years ago
- Status changed from New to Feedback
- Assignee set to Koen Deforche
- Target version set to 3.2.0
Hey Lukasz,
You can use nested selectors to style the submenu's differently when they are in a selected or unselected top level menu, like this:
.submenu {
...
display: none;
}
.itemselected .submenu {
display: block;
}
If this not works, then I do not understand. A test case which reproduces what you want (and doesn't work) would be welcome then.
Regards,
koen
Updated by Koen Deforche almost 13 years ago
- Status changed from Feedback to Resolved
Due to lack of feedback.
Updated by Łukasz Matuszewski almost 13 years ago
Everything works ok with menu and sub menu - but when i select some menu item and then select some sub menu item i will have two itemselected classes on one page - that is one for selected menuitem in menu and one for selected menuitem in sub menu. Thats all i am talking about - nothing more nothing less...
[Item 1] [Item 2] [Item 3] // MENU
[Item 4] // SUBMENU
[Item 5] // SUBMENU
When i click on [Item 1] and then on [Item 4] then i will have two itemselected classes. Furthermore they have different roots. All i am thinking about is that there should be one itemselected no matter a user will click [Item 1] in MENU or [Item 4] in SUBMENU.
BR,
Lukasz Matuszewski
Updated by Koen Deforche almost 13 years ago
- Status changed from Resolved to InProgress
Hey Lukasz,
I now see the misunderstanding. I was thinking in terms of a typical vertical menu layout, not horizontal with popup menu.
Perhaps we can indeed implement WMenuItem to catch item selection of a sub menu to select itself in the parent. I'm wary about side effects so I would only do this after the next release though.
Regards,
koen
Updated by Koen Deforche almost 13 years ago
- Target version changed from 3.2.0 to 3.2.1
Updated by Jan Hrubeš almost 13 years ago
Hi,
I have moreover one css idea.
It would be great, if first and last visible elements of menu (with submenu) have some special css classes (eg. first, last) for better styling.
Updated by Koen Deforche almost 13 years ago
- Status changed from InProgress to Resolved
Hey Lukasz,
I've implemented the idea that a submenu selection will also render the submenu parent as selected. So you still have two items being "selected", but it is the correct level 1 menu item.
Jan, can you post that idea as a separate feature request ? I think it makes sense indeed and belongs in the library.
Regards,
koen