Fix refresh in due-dates and assign issues to sprint
parent
5ff811931a
commit
e9c4966217
|
@ -670,7 +670,7 @@ module.directive("tgLightboxLeaveProjectWarning", ["lightboxService", LightboxLe
|
||||||
## Set Due Date Lightbox Directive
|
## Set Due Date Lightbox Directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
SetDueDateDirective = (lightboxService, $loading, $translate, $confirm, $modelTransform) ->
|
SetDueDateDirective = ($rootscope, lightboxService, $loading, $translate, $confirm, $modelTransform) ->
|
||||||
link = ($scope, $el, attrs) ->
|
link = ($scope, $el, attrs) ->
|
||||||
prettyDate = $translate.instant("COMMON.PICKERDATE.FORMAT")
|
prettyDate = $translate.instant("COMMON.PICKERDATE.FORMAT")
|
||||||
lightboxService.open($el)
|
lightboxService.open($el)
|
||||||
|
@ -717,6 +717,7 @@ SetDueDateDirective = (lightboxService, $loading, $translate, $confirm, $modelTr
|
||||||
transform.finally ->
|
transform.finally ->
|
||||||
currentLoading.finish()
|
currentLoading.finish()
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
|
$rootscope.$broadcast("object:updated")
|
||||||
|
|
||||||
$el.on "click", ".submit-button", (event) ->
|
$el.on "click", ".submit-button", (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
@ -747,7 +748,7 @@ SetDueDateDirective = (lightboxService, $loading, $translate, $confirm, $modelTr
|
||||||
scope: true
|
scope: true
|
||||||
}
|
}
|
||||||
|
|
||||||
module.directive("tgLbSetDueDate", ["lightboxService", "$tgLoading", "$translate", "$tgConfirm"
|
module.directive("tgLbSetDueDate", ["$rootScope", "lightboxService", "$tgLoading", "$translate", "$tgConfirm"
|
||||||
"$tgQueueModelTransformation", SetDueDateDirective])
|
"$tgQueueModelTransformation", SetDueDateDirective])
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -704,7 +704,7 @@ module.directive("tgPromoteIssueToUsButton", ["$rootScope", "$tgRepo", "$tgConfi
|
||||||
## Add Issue to Sprint button directive
|
## Add Issue to Sprint button directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
AssignSprintToIssueButtonDirective = ($rootScope, $rs, $repo, $loading, $translate,
|
AssignSprintToIssueButtonDirective = ($rootscope, $rs, $repo, $loading, $translate,
|
||||||
lightboxService, $modelTransform, $confirm) ->
|
lightboxService, $modelTransform, $confirm) ->
|
||||||
link = ($scope, $el, $attrs, $model) ->
|
link = ($scope, $el, $attrs, $model) ->
|
||||||
avaliableMilestones = []
|
avaliableMilestones = []
|
||||||
|
@ -743,10 +743,11 @@ lightboxService, $modelTransform, $confirm) ->
|
||||||
|
|
||||||
$confirm.ask(title, null, message).then (askResponse) ->
|
$confirm.ask(title, null, message).then (askResponse) ->
|
||||||
onSuccess = ->
|
onSuccess = ->
|
||||||
$scope.$broadcast("assign-sprint-to-issue:success", null)
|
$rootscope.$broadcast("assign-sprint-to-issue:success", null)
|
||||||
askResponse.finish()
|
askResponse.finish()
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
|
|
||||||
|
|
||||||
onError = ->
|
onError = ->
|
||||||
askResponse.finish(false)
|
askResponse.finish(false)
|
||||||
$confirm.notify("error")
|
$confirm.notify("error")
|
||||||
|
@ -780,7 +781,7 @@ lightboxService, $modelTransform, $confirm) ->
|
||||||
transform.then ->
|
transform.then ->
|
||||||
currentLoading.finish()
|
currentLoading.finish()
|
||||||
lightboxService.close($el.find(".lightbox-assign-sprint-to-issue"))
|
lightboxService.close($el.find(".lightbox-assign-sprint-to-issue"))
|
||||||
$scope.$broadcast("assign-sprint-to-issue:success", selectedSprint.id)
|
$rootscope.$broadcast("assign-sprint-to-issue:success", selectedSprint.id)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
link: link
|
link: link
|
||||||
|
|
Loading…
Reference in New Issue