admin: fix bad location change after exercice deletion
This commit is contained in:
parent
03e3bb8118
commit
d1e98fc4f9
1 changed files with 2 additions and 1 deletions
|
|
@ -1094,9 +1094,10 @@ angular.module("FICApp")
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.deleteExercice = function() {
|
$scope.deleteExercice = function() {
|
||||||
|
var tid = $scope.exercice.id_theme;
|
||||||
this.exercice.$remove(function() {
|
this.exercice.$remove(function() {
|
||||||
$rootScope.staticFilesNeedUpdate++;
|
$rootScope.staticFilesNeedUpdate++;
|
||||||
$location.url("/themes/" + $routeParams.themeId);
|
$location.url("/themes/" + tid);
|
||||||
}, function(response) {
|
}, function(response) {
|
||||||
$rootScope.newBox('danger', 'An error occurs when trying to delete exercice:', response.data.errmsg);
|
$rootScope.newBox('danger', 'An error occurs when trying to delete exercice:', response.data.errmsg);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Reference in a new issue