1
0
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:
John Mitchell 2018-04-19 18:27:15 -04:00
parent 60e3dfe22c
commit 3f509d5ae8
No known key found for this signature in database
GPG Key ID: FE6A9B5BD4EB5C94
2 changed files with 4 additions and 8 deletions

View File

@ -4,7 +4,7 @@ function atSideNavItemLink (scope, element, attrs, ctrl) {
[scope.navVm, scope.layoutVm] = ctrl; [scope.navVm, scope.layoutVm] = ctrl;
} }
function AtSideNavItemController ($state, $scope, strings) { function AtSideNavItemController ($scope, strings) {
const vm = this || {}; const vm = this || {};
$scope.$watch('layoutVm.currentState', current => { $scope.$watch('layoutVm.currentState', current => {
@ -21,10 +21,6 @@ function AtSideNavItemController ($state, $scope, strings) {
} }
}); });
vm.go = () => {
$state.go($scope.route, {}, { reload: true });
};
vm.tooltip = { vm.tooltip = {
popover: { popover: {
text: strings.get(`layout.${$scope.name}`), 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 () { function atSideNavItem () {
return { return {

View File

@ -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 && ng-show="(!systemAdminOnly || layoutVm.isSuperUser) && layoutVm.isLoggedIn &&
!layoutVm.licenseIsMissing"> !layoutVm.licenseIsMissing">
<at-popover state="vm.tooltip" ng-if="!navVm.isExpanded"></at-popover> <at-popover state="vm.tooltip" ng-if="!navVm.isExpanded"></at-popover>
@ -7,4 +7,4 @@
<span class="at-Layout-sideNavItemName" ng-show="navVm.isExpanded"> <span class="at-Layout-sideNavItemName" ng-show="navVm.isExpanded">
{{ layoutVm.getString(name) }} {{ layoutVm.getString(name) }}
</span> </span>
</div> </a>