From f8550a478b1d7ab0571e904849dd219f7254e16a Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Fri, 12 Feb 2016 11:59:39 -0500 Subject: [PATCH] make saving a schedule send you back to the list route --- awx/ui/client/src/helpers/Schedules.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/src/helpers/Schedules.js b/awx/ui/client/src/helpers/Schedules.js index f73a7ee042..0924170311 100644 --- a/awx/ui/client/src/helpers/Schedules.js +++ b/awx/ui/client/src/helpers/Schedules.js @@ -55,9 +55,9 @@ export default }]) .factory('EditSchedule', ['SchedulerInit', 'ShowSchedulerModal', 'Wait', - 'Rest', 'ProcessErrors', 'GetBasePath', 'SchedulePost', + 'Rest', 'ProcessErrors', 'GetBasePath', 'SchedulePost', '$state', function(SchedulerInit, ShowSchedulerModal, Wait, Rest, ProcessErrors, - GetBasePath, SchedulePost) { + GetBasePath, SchedulePost, $state) { return function(params) { var scope = params.scope, id = params.id, @@ -171,6 +171,7 @@ export default if (callback) { scope.$emit(callback, data); } + $state.go("^"); }); scope.saveSchedule = function() { @@ -208,8 +209,8 @@ export default }]) .factory('AddSchedule', ['$location', '$stateParams', 'SchedulerInit', 'ShowSchedulerModal', 'Wait', 'GetBasePath', 'Empty', - 'SchedulePost', - function($location, $stateParams, SchedulerInit, ShowSchedulerModal, Wait, GetBasePath, Empty, SchedulePost) { + 'SchedulePost', '$state', + function($location, $stateParams, SchedulerInit, ShowSchedulerModal, Wait, GetBasePath, Empty, SchedulePost, $state) { return function(params) { var scope = params.scope, callback= params.callback, @@ -280,6 +281,7 @@ export default if (callback) { scope.$emit(callback, data); } + $state.go("^"); }); scope.saveSchedule = function() {