mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
fixed indicator loading on incorrect row
This commit is contained in:
@@ -1061,20 +1061,6 @@ var tower = angular.module('Tower', [
|
|||||||
|
|
||||||
|
|
||||||
$rootScope.$on("$stateChangeStart", function (event, next, nextParams, prev) {
|
$rootScope.$on("$stateChangeStart", function (event, next, nextParams, prev) {
|
||||||
// broadcast event change if editing crud object
|
|
||||||
if ($location.$$path.split("/")[2]) {
|
|
||||||
var list = $location.$$path.split("/")[1];
|
|
||||||
var id = $location.$$path.split("/")[2];
|
|
||||||
|
|
||||||
delete $rootScope.listBeingEdited;
|
|
||||||
delete $rootScope.rowBeingEdited;
|
|
||||||
|
|
||||||
$rootScope.$broadcast("EditIndicatorChange", list, id);
|
|
||||||
} else if ($rootScope.addedAnItem) {
|
|
||||||
delete $rootScope.addedAnItem;
|
|
||||||
} else {
|
|
||||||
$rootScope.$broadcast("RemoveIndicator");
|
|
||||||
}
|
|
||||||
|
|
||||||
// this line removes the query params attached to a route
|
// this line removes the query params attached to a route
|
||||||
if(prev && prev.$$route &&
|
if(prev && prev.$$route &&
|
||||||
@@ -1128,6 +1114,23 @@ var tower = angular.module('Tower', [
|
|||||||
activateTab();
|
activateTab();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) {
|
||||||
|
// broadcast event change if editing crud object
|
||||||
|
if ($location.$$path.split("/")[2]) {
|
||||||
|
var list = $location.$$path.split("/")[1];
|
||||||
|
var id = $location.$$path.split("/")[2];
|
||||||
|
|
||||||
|
delete $rootScope.listBeingEdited;
|
||||||
|
delete $rootScope.rowBeingEdited;
|
||||||
|
|
||||||
|
$rootScope.$broadcast("EditIndicatorChange", list, id);
|
||||||
|
} else if ($rootScope.addedAnItem) {
|
||||||
|
delete $rootScope.addedAnItem;
|
||||||
|
} else {
|
||||||
|
$rootScope.$broadcast("RemoveIndicator");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (!Authorization.getToken() || !Authorization.isUserLoggedIn()) {
|
if (!Authorization.getToken() || !Authorization.isUserLoggedIn()) {
|
||||||
// User not authenticated, redirect to login page
|
// User not authenticated, redirect to login page
|
||||||
$rootScope.sessionExpired = false;
|
$rootScope.sessionExpired = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user