Fix issues-to-sprint lightbox closing issue
parent
5341bd8b5a
commit
53a112d030
|
@ -937,17 +937,13 @@ $confirm, $q, attachmentsService, $template, $compile) ->
|
||||||
currentLoading = $loading().target($el.find(".add-existing-button")).start()
|
currentLoading = $loading().target($el.find(".add-existing-button")).start()
|
||||||
|
|
||||||
if item.milestone
|
if item.milestone
|
||||||
currentLoading.finish()
|
|
||||||
lightboxService.close($el)
|
|
||||||
sprintChangeConfirmAndSave(item)
|
sprintChangeConfirmAndSave(item)
|
||||||
else
|
else
|
||||||
onSuccess = ->
|
onSuccess = ->
|
||||||
currentLoading.finish()
|
close()
|
||||||
lightboxService.close($el)
|
|
||||||
$rootScope.$broadcast("#{$scope.objType}form:add:success", item)
|
$rootScope.$broadcast("#{$scope.objType}form:add:success", item)
|
||||||
onError = ->
|
onError = ->
|
||||||
currentLoading.finish()
|
close()
|
||||||
lightboxService.close($el)
|
|
||||||
saveItem(item, onSuccess, onError)
|
saveItem(item, onSuccess, onError)
|
||||||
|
|
||||||
sprintChangeConfirmAndSave = (item) ->
|
sprintChangeConfirmAndSave = (item) ->
|
||||||
|
@ -960,7 +956,8 @@ $confirm, $q, attachmentsService, $template, $compile) ->
|
||||||
$confirm.ask(title, null, message).then (askResponse) ->
|
$confirm.ask(title, null, message).then (askResponse) ->
|
||||||
onSuccess = ->
|
onSuccess = ->
|
||||||
askResponse.finish()
|
askResponse.finish()
|
||||||
lightboxService.close($el)
|
lightboxService.closeAll()
|
||||||
|
$scope.lightboxOpen = false
|
||||||
$rootScope.$broadcast("#{$scope.objType}form:add:success", item)
|
$rootScope.$broadcast("#{$scope.objType}form:add:success", item)
|
||||||
|
|
||||||
onError = ->
|
onError = ->
|
||||||
|
@ -1005,6 +1002,7 @@ $confirm, $q, attachmentsService, $template, $compile) ->
|
||||||
createAttachments(data).then () ->
|
createAttachments(data).then () ->
|
||||||
currentLoading.finish()
|
currentLoading.finish()
|
||||||
close()
|
close()
|
||||||
|
if data.ref
|
||||||
$rs[schema.model].getByRef(data.project, data.ref, schema.params).then (obj) ->
|
$rs[schema.model].getByRef(data.project, data.ref, schema.params).then (obj) ->
|
||||||
$rootScope.$broadcast(broadcastEvent, obj)
|
$rootScope.$broadcast(broadcastEvent, obj)
|
||||||
promise.then null, (data) ->
|
promise.then null, (data) ->
|
||||||
|
@ -1026,7 +1024,7 @@ $confirm, $q, attachmentsService, $template, $compile) ->
|
||||||
close()
|
close()
|
||||||
|
|
||||||
close = () ->
|
close = () ->
|
||||||
lightboxService.close($el)
|
lightboxService.closeAll()
|
||||||
$scope.lightboxOpen = false
|
$scope.lightboxOpen = false
|
||||||
|
|
||||||
docEl = angular.element(document)
|
docEl = angular.element(document)
|
||||||
|
|
Loading…
Reference in New Issue