掲示板

Liferay 6.2: Responsive Dockbar navigation sub menu pops up on mousemove

9年前 に Martin Jonik によって更新されました。

Liferay 6.2: Responsive Dockbar navigation sub menu pops up on mousemove

Junior Member 投稿: 69 参加年月日: 12/08/14 最新の投稿
When using the classic theme and increasing the windows size to ~ 700px the navigation menu disappears and the dockbar appears, showing (among others) the menu-item button (#_145_navSiteNavigationNavbarBtn).
When you click this button the navigation menu shows up again in a different, tablet friendly layout.
Now you can move your mouse over the navigation items that will show their second-level sub-menus directly on mouseover.
This user interface experience is very bad for tablets as well as for desktops. on tablets you normally want to click on these items you want to expand since you can't use a proper mousemove event with your fingers and on desktops these sub-items will collapse again when you move the mouse out of the submenu which will push the lower main-menu items up again and you completly loose your mouse position on the page.

So my question is: How can I tell liferay to open up the sub-menu items on click instead of mouseover?
It was done on liferay.com this way.
9年前 に Ken Newton によって更新されました。

RE: Liferay 6.2: Responsive Dockbar navigation sub menu pops up on mousemov

New Member 投稿: 1 参加年月日: 13/04/09 最新の投稿
Did you figure this out? I agree it certainly should be a click action, there is no 'hover' on touch screens.
9年前 に Martin Jonik によって更新されました。

RE: Liferay 6.2: Responsive Dockbar navigation sub menu pops up on mousemov

Junior Member 投稿: 69 参加年月日: 12/08/14 最新の投稿
nope. still hoping the liferay guys will fix this with the next release.
thumbnail
9年前 に Eric COQUELIN によって更新されました。

RE: Liferay 6.2: Responsive Dockbar navigation sub menu pops up on mousemov

Expert 投稿: 254 参加年月日: 13/11/03 最新の投稿
Hi,

There is an answer here: http://sourceforge.net/p/lportal/news/2014/10/display-navigation-drop-down-on-click-event/

Just add the code block they give at the top of your main.js in your theme

Then, use

AUI().ready(
	 'liferay-navigation-interaction-click',
	function(A) {
		var navigation = A.one('#navigation');
		if (navigation) {
			navigation.plug(Liferay.NavigationInteraction);
		}
	}
);


That's all.
9年前 に Martin Jonik によって更新されました。

RE: Liferay 6.2: Responsive Dockbar navigation sub menu pops up on mousemov

Junior Member 投稿: 69 参加年月日: 12/08/14 最新の投稿
Hi Eric,
have not tried it yet, but I am pretty sure this solution will work.
Thank you very much for sharing this here.
Martin