Merge pull request #563 from taigaio/issue/2991/update-watchers-after-new-comment
Issue/2991/update watchers after new commentstable
commit
75eb8b7cf1
|
@ -68,7 +68,7 @@ class HistoryController extends taiga.Controller
|
|||
return @rs.history.undeleteComment(type, objectId, activityId).then => @.loadHistory(type, objectId)
|
||||
|
||||
|
||||
HistoryDirective = ($log, $loading, $qqueue, $template, $confirm, $translate, $compile, $navUrls) ->
|
||||
HistoryDirective = ($log, $loading, $qqueue, $template, $confirm, $translate, $compile, $navUrls, $rootScope) ->
|
||||
templateChangeDiff = $template.get("common/history/history-change-diff.html", true)
|
||||
templateChangePoints = $template.get("common/history/history-change-points.html", true)
|
||||
templateChangeGeneric = $template.get("common/history/history-change-generic.html", true)
|
||||
|
@ -348,6 +348,8 @@ HistoryDirective = ($log, $loading, $qqueue, $template, $confirm, $translate, $c
|
|||
$el.find(".comment-list").addClass("activeanimation")
|
||||
|
||||
onSuccess = ->
|
||||
$rootScope.$broadcast("comment:new")
|
||||
|
||||
$ctrl.loadHistory(type, objectId).finally ->
|
||||
$loading.finish(target)
|
||||
|
||||
|
@ -456,4 +458,4 @@ HistoryDirective = ($log, $loading, $qqueue, $template, $confirm, $translate, $c
|
|||
|
||||
|
||||
module.directive("tgHistory", ["$log", "$tgLoading", "$tgQqueue", "$tgTemplate", "$tgConfirm", "$translate",
|
||||
"$compile", "$tgNavUrls", HistoryDirective])
|
||||
"$compile", "$tgNavUrls", "$rootScope", HistoryDirective])
|
||||
|
|
|
@ -97,6 +97,9 @@ class IssueDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
@rootscope.$broadcast("object:updated")
|
||||
@.loadIssue()
|
||||
|
||||
@scope.$on "comment:new", =>
|
||||
@.loadIssue()
|
||||
|
||||
@scope.$on "custom-attributes-values:edit", =>
|
||||
@rootscope.$broadcast("object:updated")
|
||||
|
||||
|
|
|
@ -84,6 +84,8 @@ class TaskDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
@rootscope.$broadcast("object:updated")
|
||||
@scope.$on "custom-attributes-values:edit", =>
|
||||
@rootscope.$broadcast("object:updated")
|
||||
@scope.$on "comment:new", =>
|
||||
@.loadTask()
|
||||
|
||||
initializeOnDeleteGoToUrl: ->
|
||||
ctx = {project: @scope.project.slug}
|
||||
|
|
|
@ -103,6 +103,9 @@ class UserStoryDetailController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
@scope.$on "custom-attributes-values:edit", =>
|
||||
@rootscope.$broadcast("object:updated")
|
||||
|
||||
@scope.$on "comment:new", =>
|
||||
@.loadUs()
|
||||
|
||||
initializeOnDeleteGoToUrl: ->
|
||||
ctx = {project: @scope.project.slug}
|
||||
@scope.onDeleteGoToUrl = @navUrls.resolve("project", ctx)
|
||||
|
|
Loading…
Reference in New Issue