mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
Replace translate filter and retrieve tooltip text from strings file
This commit is contained in:
parent
5c108bfa1b
commit
9b7eb52772
@ -96,6 +96,8 @@
|
||||
.at-Layout-sideNavItem {
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
text-transform: uppercase;
|
||||
|
||||
|
||||
> i.fa {
|
||||
padding-left: 20px;
|
||||
@ -132,7 +134,6 @@
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding-right: @at-padding-between-side-nav-icon-text;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
+ .at-Layout-main {
|
||||
|
||||
@ -5,9 +5,9 @@ function atSideNavItemLink (scope, element, attrs, ctrl) {
|
||||
scope.layoutVm = ctrl[1];
|
||||
}
|
||||
|
||||
function AtSideNavItemController ($state, $scope) {
|
||||
function AtSideNavItemController ($state, $scope, strings) {
|
||||
let vm = this || {};
|
||||
vm.popoverText = $scope.name.replace(/_/g,' ');
|
||||
|
||||
$scope.$watch('layoutVm.currentState', function(current) {
|
||||
if ($scope.name === 'portal mode') {
|
||||
vm.isRoute = (current && current.indexOf('portalMode') === 0);
|
||||
@ -30,7 +30,7 @@ function AtSideNavItemController ($state, $scope) {
|
||||
|
||||
vm.tooltip = {
|
||||
popover: {
|
||||
text: vm.popoverText,
|
||||
text: strings.get(`layout.${$scope.name}`),
|
||||
on: 'mouseenter',
|
||||
icon: $scope.iconClass,
|
||||
position: 'right',
|
||||
@ -39,7 +39,7 @@ function AtSideNavItemController ($state, $scope) {
|
||||
}
|
||||
}
|
||||
|
||||
AtSideNavItemController.$inject = ['$state', '$scope'];
|
||||
AtSideNavItemController.$inject = ['$state', '$scope', 'ComponentsStrings'];
|
||||
|
||||
function atSideNavItem () {
|
||||
return {
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
.at-mixin-ButtonIcon();
|
||||
color: @at-color-icon-popover;
|
||||
font-size: @at-font-size-icon;
|
||||
padding: 1px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
<div ng-if="popover.position === 'top'" class="fa fa-caret-down fa-2x"></div>
|
||||
</div>
|
||||
<div class="at-Popover-content">
|
||||
<h4 ng-if="popover.title" class="at-Popover-title">{{ popover.title }}</h4>
|
||||
<p ng-if="popover.text" class="at-Popover-text">{{ popover.text }}</p>
|
||||
<h4 ng-if="popover.title" class="at-Popover-title">{{ popover.title | translate }}</h4>
|
||||
<p ng-if="popover.text" class="at-Popover-text">{{ popover.text | translate }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user