[backport] fix reset US edit lightbox points
parent
2123bbac4e
commit
b075acdef2
|
@ -40,12 +40,14 @@ LbUsEstimationDirective = ($tgEstimationsService, $rootScope, $repo, $confirm, $
|
||||||
|
|
||||||
link = ($scope, $el, $attrs, $model) ->
|
link = ($scope, $el, $attrs, $model) ->
|
||||||
$scope.$watch $attrs.ngModel, (us) ->
|
$scope.$watch $attrs.ngModel, (us) ->
|
||||||
|
console.log "watch"
|
||||||
if us
|
if us
|
||||||
estimationProcess = $tgEstimationsService.create($el, us, $scope.project)
|
estimationProcess = $tgEstimationsService.create($el, us, $scope.project)
|
||||||
estimationProcess.onSelectedPointForRole = (roleId, pointId) ->
|
estimationProcess.onSelectedPointForRole = (roleId, pointId) ->
|
||||||
$scope.$apply ->
|
$scope.$apply ->
|
||||||
$model.$setViewValue(us)
|
$model.$setViewValue(us)
|
||||||
|
|
||||||
|
|
||||||
estimationProcess.render = () ->
|
estimationProcess.render = () ->
|
||||||
ctx = {
|
ctx = {
|
||||||
totalPoints: @calculateTotalPoints()
|
totalPoints: @calculateTotalPoints()
|
||||||
|
@ -224,16 +226,12 @@ EstimationsService = ($template, $qqueue, $repo, $confirm, $q) ->
|
||||||
@$el.find(".pop-points-open").show()
|
@$el.find(".pop-points-open").show()
|
||||||
|
|
||||||
create = ($el, us, project) ->
|
create = ($el, us, project) ->
|
||||||
estimationProcess = $el.data("estimationProcess")
|
$el.unbind("click")
|
||||||
|
|
||||||
if !estimationProcess
|
|
||||||
estimationProcess = new EstimationProcess($el, us, project)
|
estimationProcess = new EstimationProcess($el, us, project)
|
||||||
$el.data("estimationProcess", estimationProcess)
|
|
||||||
|
|
||||||
if estimationProcess.isEditable
|
if estimationProcess.isEditable
|
||||||
estimationProcess.bindClickEvents()
|
estimationProcess.bindClickEvents()
|
||||||
else
|
|
||||||
$el.unbind("click")
|
|
||||||
|
|
||||||
return estimationProcess
|
return estimationProcess
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue