refresh user before create project
parent
df07c8cf51
commit
5026ecbf33
|
@ -79,7 +79,7 @@ class LightboxService extends taiga.Service
|
||||||
|
|
||||||
if $el.hasClass("remove-on-close")
|
if $el.hasClass("remove-on-close")
|
||||||
scope = $el.data("scope")
|
scope = $el.data("scope")
|
||||||
scope.$destroy()
|
scope.$destroy() if scope
|
||||||
$el.remove()
|
$el.remove()
|
||||||
|
|
||||||
closeAll: ->
|
closeAll: ->
|
||||||
|
|
|
@ -35,10 +35,6 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
|
||||||
$scope.templates = []
|
$scope.templates = []
|
||||||
currentLoading = null
|
currentLoading = null
|
||||||
|
|
||||||
$auth.refresh()
|
|
||||||
$scope.canCreatePrivateProjects = currentUserService.canCreatePrivateProjects()
|
|
||||||
$scope.canCreatePublicProjects = currentUserService.canCreatePublicProjects()
|
|
||||||
|
|
||||||
form = $el.find("form").checksley({"onlyOneErrorElement": true})
|
form = $el.find("form").checksley({"onlyOneErrorElement": true})
|
||||||
|
|
||||||
onSuccessSubmit = (response) ->
|
onSuccessSubmit = (response) ->
|
||||||
|
@ -88,6 +84,9 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
|
||||||
else
|
else
|
||||||
$scope.data.creation_template = _.head(_.filter($scope.templates, (x) -> x.slug == "scrum")).id
|
$scope.data.creation_template = _.head(_.filter($scope.templates, (x) -> x.slug == "scrum")).id
|
||||||
|
|
||||||
|
$scope.canCreatePrivateProjects = currentUserService.canCreatePrivateProjects()
|
||||||
|
$scope.canCreatePublicProjects = currentUserService.canCreatePublicProjects()
|
||||||
|
|
||||||
lightboxService.open($el)
|
lightboxService.open($el)
|
||||||
|
|
||||||
submitButton = $el.find(".submit-button")
|
submitButton = $el.find(".submit-button")
|
||||||
|
@ -101,7 +100,8 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
|
||||||
$scope.$on "$destroy", ->
|
$scope.$on "$destroy", ->
|
||||||
$el.off()
|
$el.off()
|
||||||
|
|
||||||
openLightbox()
|
$auth.refresh().then () ->
|
||||||
|
openLightbox()
|
||||||
|
|
||||||
directive = {
|
directive = {
|
||||||
link: link,
|
link: link,
|
||||||
|
|
Loading…
Reference in New Issue