Created
November 12, 2014 16:13
-
-
Save randombrad/b5ffb95519eee2c56d87 to your computer and use it in GitHub Desktop.
Liferay 6.2 Navigation with responsive toggle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AUI().ready( | |
'liferay-hudcrumbs', 'liferay-navigation-interaction', 'liferay-sign-in-modal', | |
function(A) { | |
var navigation = A.one('#navigation'); | |
var menu_toggle = navigation.one('#nav_toggle'); | |
if (navigation) { | |
navigation.plug(Liferay.NavigationInteraction); | |
} | |
menu_toggle.on('click', function(event){ | |
navigation.one('.collapse.nav-collapse').toggleClass('open'); | |
}); | |
var siteBreadcrumbs = A.one('#breadcrumbs'); | |
if (siteBreadcrumbs) { | |
siteBreadcrumbs.plug(A.Hudcrumbs); | |
} | |
var signIn = A.one('li.sign-in a'); | |
if (signIn && signIn.getData('redirect') !== 'true') { | |
signIn.plug(Liferay.SignInModal); | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment