mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Better "go to parent state" code
This commit is contained in:
parent
c601ca7738
commit
c1f40f9cbf
@ -104,7 +104,7 @@ export function CredentialsList($scope, $rootScope, $location, $log,
|
||||
.success(function () {
|
||||
$scope.search(list.iterator);
|
||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
||||
$state.transitionTo($state.current.name.replace(/[.][a-zA-Z]+$/, "")); /* go to the list view */
|
||||
$state.go('^');
|
||||
}
|
||||
})
|
||||
.error(function (data, status) {
|
||||
|
||||
@ -248,7 +248,7 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
||||
.success(function () {
|
||||
$scope.search(list.iterator);
|
||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
||||
$state.transitionTo($state.current.name.replace(/[.][a-zA-Z]+$/, "")); /* go to the list view */
|
||||
$state.go('^');
|
||||
}
|
||||
})
|
||||
.error(function (data, status) {
|
||||
|
||||
@ -99,7 +99,7 @@ export function TeamsList($scope, $rootScope, $location, $log, $stateParams,
|
||||
$('#prompt-modal').modal('hide');
|
||||
$scope.search(list.iterator);
|
||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
||||
$state.transitionTo($state.current.name.replace(/[.][a-zA-Z]+$/, "")); /* go to the list view */
|
||||
$state.go('^');
|
||||
}
|
||||
})
|
||||
.error(function (data, status) {
|
||||
|
||||
@ -113,7 +113,7 @@ export function UsersList($scope, $rootScope, $location, $log, $stateParams,
|
||||
.success(function () {
|
||||
$scope.search(list.iterator);
|
||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
||||
$state.transitionTo($state.current.name.replace(/[.][a-zA-Z]+$/, "")); /* go to the list view */
|
||||
$state.go('^');
|
||||
}
|
||||
})
|
||||
.error(function (data, status) {
|
||||
|
||||
@ -324,7 +324,7 @@ function InventoriesList($scope, $rootScope, $location, $log,
|
||||
.success(function () {
|
||||
$scope.search(list.iterator);
|
||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
||||
$state.transitionTo($state.current.name.replace(/[.][a-zA-Z]+$/, "")); /* go to the list view */
|
||||
$state.go('^');
|
||||
}
|
||||
})
|
||||
.error(function (data, status) {
|
||||
|
||||
@ -60,7 +60,7 @@ export default
|
||||
.success(function () {
|
||||
scope.search(list.iterator);
|
||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
||||
$state.transitionTo($state.current.name.replace(/[.][a-zA-Z]+$/, "")); /* go to the list view */
|
||||
$state.go('^');
|
||||
}
|
||||
})
|
||||
.error(function (data, status) {
|
||||
|
||||
@ -79,7 +79,7 @@ export default
|
||||
.success(function () {
|
||||
$scope.search(list.iterator);
|
||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
||||
$state.transitionTo($state.current.name.replace(/[.][a-zA-Z]+$/, "")); /* go to the list view */
|
||||
$state.go('^');
|
||||
}
|
||||
})
|
||||
.error(function (data) {
|
||||
|
||||
@ -184,7 +184,7 @@ export default
|
||||
.success(function () {
|
||||
scope.search(list.iterator);
|
||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
||||
$state.transitionTo($state.current.name.replace(/[.][a-zA-Z]+$/, "")); /* go to the list view */
|
||||
$state.go('^');
|
||||
}
|
||||
})
|
||||
.error(function (data, status) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user