掲示板

Javascript navigate in theme error

7年前 に Bach Hoang によって更新されました。

Javascript navigate in theme error

New Member 投稿: 15 参加年月日: 13/09/30 最新の投稿
I created a new theme in liferay 6.2.
But It's only run smoothly within Administrator role, when I used Power User role to sign in, my menu has problem.
I used javascript in theme:

        var menu = A.one('#navigation');
	var subMenu = A.all('.child-menu');
	menu.on('click', function(event) {
		subMenu.setStyle('display','block');
	});
	var subMenu2 = A.one('#main-content');
	subMenu2.on('click', function(event) {
		subMenu.setStyle('display','none');
	});
	
	var obj = A.one('#showHideTop'); 
	var show = A.all('.dockbar');
	obj.on('click', function(event) {
		if (show.getStyle('display')=="block") { 
			show.setStyle('display','none'); 
		}
		else { 
			show.setStyle('display','block');
		} 
	});

I can navigate to other page with Administrator role.
But when user Power User or other role to sign in, when I click (mouse down)in menu which is invisible and visible when mouse up.
So that page can not navigate, in this case, I have only one way which is right click and "open link in new tab". It's ok.
Help me please!
thumbnail
7年前 に Byrån Zaugg によって更新されました。

RE: Javascript navigate in theme error

Expert 投稿: 252 参加年月日: 12/04/06 最新の投稿
Using the browser's Dev Tools, I would look at how the markup differs between accounts, when logged in.