[backport] Fix bug #1154: Nav-Menu broken affter submit any of the two project profile forms

stable
David Barragán Merino 2014-10-04 19:25:54 +02:00
parent 1f4128a592
commit 76660c77f2
1 changed files with 5 additions and 5 deletions

View File

@ -96,7 +96,7 @@ module.controller("ProjectProfileController", ProjectProfileController)
## Project Profile Directive ## Project Profile Directive
############################################################################# #############################################################################
ProjectProfileDirective = ($rootscope, $log, $repo, $confirm, $loading) -> ProjectProfileDirective = ($repo, $confirm, $loading) ->
link = ($scope, $el, $attrs) -> link = ($scope, $el, $attrs) ->
form = $el.find("form").checksley({"onlyOneErrorElement": true}) form = $el.find("form").checksley({"onlyOneErrorElement": true})
submit = (target) => submit = (target) =>
@ -108,7 +108,7 @@ ProjectProfileDirective = ($rootscope, $log, $repo, $confirm, $loading) ->
promise.then -> promise.then ->
$loading.finish(target) $loading.finish(target)
$confirm.notify("success") $confirm.notify("success")
$rootscope.$broadcast("project:loaded", $scope.project) $scope.$emit("project:loaded", $scope.project)
promise.then null, (data) -> promise.then null, (data) ->
$loading.finish(target) $loading.finish(target)
@ -132,14 +132,14 @@ ProjectProfileDirective = ($rootscope, $log, $repo, $confirm, $loading) ->
return {link:link} return {link:link}
module.directive("tgProjectProfile", ["$rootScope", "$log", "$tgRepo", "$tgConfirm", "$tgLoading", ProjectProfileDirective]) module.directive("tgProjectProfile", ["$tgRepo", "$tgConfirm", "$tgLoading", ProjectProfileDirective])
############################################################################# #############################################################################
## Project Modules Directive ## Project Modules Directive
############################################################################# #############################################################################
ProjectModulesDirective = ($rootscope, $log, $repo, $confirm, $loading) -> ProjectModulesDirective = ($repo, $confirm, $loading) ->
link = ($scope, $el, $attrs) -> link = ($scope, $el, $attrs) ->
form = $el.find("form").checksley() form = $el.find("form").checksley()
submit = => submit = =>
@ -181,4 +181,4 @@ ProjectModulesDirective = ($rootscope, $log, $repo, $confirm, $loading) ->
return {link:link} return {link:link}
module.directive("tgProjectModules", ["$rootScope", "$log", "$tgRepo", "$tgConfirm", "$tgLoading", ProjectModulesDirective]) module.directive("tgProjectModules", ["$tgRepo", "$tgConfirm", "$tgLoading", ProjectModulesDirective])