mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 22:07:36 -02:30
updates based on jtabor's review
This commit is contained in:
@@ -13,14 +13,14 @@ export default
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// check to see if the current route is the currently
|
// check to see if the current route is the currently
|
||||||
// logged in user
|
// logged in user
|
||||||
scope.isCurrentRouteUser = function() {
|
scope.isCurrentRouteUser = function() {
|
||||||
if ($rootScope && $rootScope.current_user) {
|
if ($rootScope && $rootScope.current_user) {
|
||||||
if ($location.url().split('/')[1] === 'users') {
|
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;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -31,7 +31,7 @@ export default
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// set up the user tooltip
|
// set up the user tooltip
|
||||||
$rootScope.$on('current_user', function(user) {
|
$rootScope.$on('current_user', function(user) {
|
||||||
@@ -58,7 +58,7 @@ export default
|
|||||||
} else {
|
} else {
|
||||||
scope.isHiddenOnMobile = true;
|
scope.isHiddenOnMobile = true;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
// if the user clicks outside of the mobile menu,
|
// if the user clicks outside of the mobile menu,
|
||||||
// close it if it's open
|
// close it if it's open
|
||||||
$("body").on('click', function(e) {
|
$("body").on('click', function(e) {
|
||||||
|
|||||||
@@ -119,10 +119,10 @@
|
|||||||
data-trigger="hover"
|
data-trigger="hover"
|
||||||
data-container="body">
|
data-container="body">
|
||||||
<i class="MainMenu-itemImage MainMenu-itemImage--user icon-user"
|
<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>
|
</i>
|
||||||
<span class="MainMenu-itemText MainMenu-itemText--username">
|
<span class="MainMenu-itemText MainMenu-itemText--username">
|
||||||
{{::$root.current_user.username}}
|
{{ $root.current_user.username}}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="MainMenu-item MainMenu-item--notMobile MainMenu-item--right"
|
<a class="MainMenu-item MainMenu-item--notMobile MainMenu-item--right"
|
||||||
|
|||||||
Reference in New Issue
Block a user