mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
fix new tab in router
This commit is contained in:
parent
60e3dfe22c
commit
3f509d5ae8
@ -4,7 +4,7 @@ function atSideNavItemLink (scope, element, attrs, ctrl) {
|
||||
[scope.navVm, scope.layoutVm] = ctrl;
|
||||
}
|
||||
|
||||
function AtSideNavItemController ($state, $scope, strings) {
|
||||
function AtSideNavItemController ($scope, strings) {
|
||||
const vm = this || {};
|
||||
|
||||
$scope.$watch('layoutVm.currentState', current => {
|
||||
@ -21,10 +21,6 @@ function AtSideNavItemController ($state, $scope, strings) {
|
||||
}
|
||||
});
|
||||
|
||||
vm.go = () => {
|
||||
$state.go($scope.route, {}, { reload: true });
|
||||
};
|
||||
|
||||
vm.tooltip = {
|
||||
popover: {
|
||||
text: strings.get(`layout.${$scope.name}`),
|
||||
@ -36,7 +32,7 @@ function AtSideNavItemController ($state, $scope, strings) {
|
||||
};
|
||||
}
|
||||
|
||||
AtSideNavItemController.$inject = ['$state', '$scope', 'ComponentsStrings'];
|
||||
AtSideNavItemController.$inject = ['$scope', 'ComponentsStrings'];
|
||||
|
||||
function atSideNavItem () {
|
||||
return {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="at-Layout-sideNavItem" ng-click="vm.go()" ng-class="{'is-active': vm.isRoute}"
|
||||
<a class="at-Layout-sideNavItem" ui-sref="{{ route }}" ng-class="{'is-active': vm.isRoute}"
|
||||
ng-show="(!systemAdminOnly || layoutVm.isSuperUser) && layoutVm.isLoggedIn &&
|
||||
!layoutVm.licenseIsMissing">
|
||||
<at-popover state="vm.tooltip" ng-if="!navVm.isExpanded"></at-popover>
|
||||
@ -7,4 +7,4 @@
|
||||
<span class="at-Layout-sideNavItemName" ng-show="navVm.isExpanded">
|
||||
{{ layoutVm.getString(name) }}
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user