This commit is contained in:
Akita Noek
2016-06-07 11:22:52 -04:00
parent f24818148c
commit c601ca7738

View File

@@ -429,8 +429,8 @@ export default
* }) * })
* *
*/ */
.factory('DeleteSchedule', ['GetBasePath','Rest', 'Wait', 'ProcessErrors', 'Prompt', 'Find', '$location', '$state', .factory('DeleteSchedule', ['GetBasePath','Rest', 'Wait', 'ProcessErrors', 'Prompt', 'Find', '$location',
function(GetBasePath, Rest, Wait, ProcessErrors, Prompt, Find, $location, $state) { function(GetBasePath, Rest, Wait, ProcessErrors, Prompt, Find, $location) {
return function(params) { return function(params) {
var scope = params.scope, var scope = params.scope,
@@ -457,7 +457,7 @@ export default
$('#prompt-modal').modal('hide'); $('#prompt-modal').modal('hide');
scope.$emit(callback, id); scope.$emit(callback, id);
if (new RegExp('/' + id + '$').test($location.$$url)) { if (new RegExp('/' + id + '$').test($location.$$url)) {
$location.url($location.url().replace(/[/][0-9]+$/, "")) // go to list view $location.url($location.url().replace(/[/][0-9]+$/, "")); // go to list view
} }
}) })
.error(function (data, status) { .error(function (data, status) {