summaryrefslogtreecommitdiffstats
path: root/public/media/js/script.js
blob: ce878120e6530808af8ae9667b2fac1179b0791f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$(document).ready(function() {
	path = window.location.pathname.split('/');
	if (path[2] == 'person' && (path[3] == 'owndetails' || path[3] == 'edit' || path[3] == 'request') && path[4] != 'personID') {
		mypath = '/' + path[1] + '/' + path[2] + '/owndetails';
	} else if(path[2] == 'group' && (path[3] == 'show' || path[3] == 'edit') && path[4] != 'groupID') { 
		mypath = '/' + path[1] + '/' + path[2] + '/show';
	} else {
		mypath = '/' + path[1] + '/' + path[2];
	}
	$('.portletNavigationTree a').each(function() {
		if ($(this).attr('href') == mypath) {
			/* console.log($(this).parent()); */
			$(this).addClass('navTreeCurrentNode');
			$(this).addClass('navTreeCurrentItem');
		}
	});
});