mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 13:39:27 -02:30
Better "go to parent state" code
This commit is contained in:
@@ -104,7 +104,7 @@ export function CredentialsList($scope, $rootScope, $location, $log,
|
|||||||
.success(function () {
|
.success(function () {
|
||||||
$scope.search(list.iterator);
|
$scope.search(list.iterator);
|
||||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
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) {
|
.error(function (data, status) {
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ export function ProjectsList ($scope, $rootScope, $location, $log, $stateParams,
|
|||||||
.success(function () {
|
.success(function () {
|
||||||
$scope.search(list.iterator);
|
$scope.search(list.iterator);
|
||||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
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) {
|
.error(function (data, status) {
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export function TeamsList($scope, $rootScope, $location, $log, $stateParams,
|
|||||||
$('#prompt-modal').modal('hide');
|
$('#prompt-modal').modal('hide');
|
||||||
$scope.search(list.iterator);
|
$scope.search(list.iterator);
|
||||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
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) {
|
.error(function (data, status) {
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export function UsersList($scope, $rootScope, $location, $log, $stateParams,
|
|||||||
.success(function () {
|
.success(function () {
|
||||||
$scope.search(list.iterator);
|
$scope.search(list.iterator);
|
||||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
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) {
|
.error(function (data, status) {
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ function InventoriesList($scope, $rootScope, $location, $log,
|
|||||||
.success(function () {
|
.success(function () {
|
||||||
$scope.search(list.iterator);
|
$scope.search(list.iterator);
|
||||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
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) {
|
.error(function (data, status) {
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export default
|
|||||||
.success(function () {
|
.success(function () {
|
||||||
scope.search(list.iterator);
|
scope.search(list.iterator);
|
||||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
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) {
|
.error(function (data, status) {
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export default
|
|||||||
.success(function () {
|
.success(function () {
|
||||||
$scope.search(list.iterator);
|
$scope.search(list.iterator);
|
||||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
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) {
|
.error(function (data) {
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ export default
|
|||||||
.success(function () {
|
.success(function () {
|
||||||
scope.search(list.iterator);
|
scope.search(list.iterator);
|
||||||
if (new RegExp('/' + id + '$').test($location.$$url)) {
|
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) {
|
.error(function (data, status) {
|
||||||
|
|||||||
Reference in New Issue
Block a user