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