updates based on jtabor's review

This commit is contained in:
John Mitchell 2015-11-06 10:53:20 -05:00
parent 2db805f051
commit 7d208b7d6f
2 changed files with 6 additions and 6 deletions

View File

@ -13,14 +13,14 @@ export default
} else {
return false;
}
}
};
// check to see if the current route is the currently
// logged in user
scope.isCurrentRouteUser = function() {
if ($rootScope && $rootScope.current_user) {
if ($location.url().split('/')[1] === 'users') {
if ($location.url().split('/')[2] === ($rootScope.current_user.id + "")) {
if ($location.url().split('/')[2] === ($rootScope.current_user.id + "")) {
return true;
} else {
return false;
@ -31,7 +31,7 @@ export default
} else {
return false;
}
}
};
// set up the user tooltip
$rootScope.$on('current_user', function(user) {
@ -58,7 +58,7 @@ export default
} else {
scope.isHiddenOnMobile = true;
}
}
};
// if the user clicks outside of the mobile menu,
// close it if it's open
$("body").on('click', function(e) {

View File

@ -119,10 +119,10 @@
data-trigger="hover"
data-container="body">
<i class="MainMenu-itemImage MainMenu-itemImage--user icon-user"
alt="Logged in as {{::$root.current_user.username}}">
alt="Logged in as {{ $root.current_user.username}}">
</i>
<span class="MainMenu-itemText MainMenu-itemText--username">
{{::$root.current_user.username}}
{{ $root.current_user.username}}
</span>
</a>
<a class="MainMenu-item MainMenu-item--notMobile MainMenu-item--right"