Replace translate filter and retrieve tooltip text from strings file

This commit is contained in:
Marliana Lara 2017-09-19 10:26:58 -04:00
parent 5c108bfa1b
commit 9b7eb52772
No known key found for this signature in database
GPG Key ID: 38C73B40DFA809EE
4 changed files with 8 additions and 8 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -10,7 +10,6 @@
.at-mixin-ButtonIcon();
color: @at-color-icon-popover;
font-size: @at-font-size-icon;
padding: 1px;
margin: 0;
}

View File

@ -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>