Fixed bug #350: Now on change slug, redirect the user to the new valid project url
parent
7dc2345cce
commit
11ff892c05
|
@ -85,7 +85,7 @@ module.controller("ProjectProfileController", ProjectProfileController)
|
||||||
## Project Profile Directive
|
## Project Profile Directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
ProjectProfileDirective = ($log, $repo, $confirm) ->
|
ProjectProfileDirective = ($log, $repo, $confirm, $location) ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
form = $el.find("form").checksley()
|
form = $el.find("form").checksley()
|
||||||
submit = =>
|
submit = =>
|
||||||
|
@ -94,6 +94,7 @@ ProjectProfileDirective = ($log, $repo, $confirm) ->
|
||||||
promise = $repo.save($scope.project)
|
promise = $repo.save($scope.project)
|
||||||
promise.then ->
|
promise.then ->
|
||||||
$confirm.notify("success")
|
$confirm.notify("success")
|
||||||
|
$location.path("/project/#{$scope.project.slug}/admin/project-profile/details")
|
||||||
|
|
||||||
promise.then null, (data) ->
|
promise.then null, (data) ->
|
||||||
form.setErrors(data)
|
form.setErrors(data)
|
||||||
|
@ -152,5 +153,5 @@ ProjectFeaturesDirective = ($log, $repo, $confirm) ->
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
module.directive("tgProjectProfile", ["$log", "$tgRepo", "$tgConfirm", ProjectProfileDirective])
|
module.directive("tgProjectProfile", ["$log", "$tgRepo", "$tgConfirm", "$location", ProjectProfileDirective])
|
||||||
module.directive("tgProjectFeatures", ["$log", "$tgRepo", "$tgConfirm", ProjectFeaturesDirective])
|
module.directive("tgProjectFeatures", ["$log", "$tgRepo", "$tgConfirm", ProjectFeaturesDirective])
|
||||||
|
|
Loading…
Reference in New Issue