Fixing watchers refresh

stable
Álex Hermida 2018-10-04 16:37:44 +02:00 committed by Alex Hermida
parent 360aa0c5ac
commit 4a8a59a771
5 changed files with 16 additions and 8 deletions

View File

@ -17,14 +17,18 @@
# File: components/wysiwyg/comment-wysiwyg.directive.coffee
###
CommentWysiwyg = (attachmentsFullService) ->
CommentWysiwyg = ($modelTransform, $rootscope, $confirm, attachmentsFullService) ->
link = ($scope, $el, $attrs) ->
$scope.editableDescription = false
$scope.saveComment = (description, cb) ->
$scope.content = ''
$scope.vm.type.comment = description
$scope.vm.onAddComment({callback: cb})
transform = $modelTransform.save (item) -> return
transform.then ->
$rootscope.$broadcast("object:updated")
transform.finally(cb)
types = {
epics: "epic",
@ -70,4 +74,8 @@ CommentWysiwyg = (attachmentsFullService) ->
}
angular.module("taigaComponents")
.directive("tgCommentWysiwyg", ["tgAttachmentsFullService", CommentWysiwyg])
.directive("tgCommentWysiwyg", [
"$tgQueueModelTransformation",
"$rootScope",
"tgAttachmentsFullService",
CommentWysiwyg])

View File

@ -21,7 +21,6 @@
ItemWysiwyg = ($modelTransform, $rootscope, $confirm, attachmentsFullService, $translate) ->
link = ($scope, $el, $attrs) ->
$scope.editableDescription = false
$scope.saveDescription = (description, cb) ->
transform = $modelTransform.save (item) ->
item.description = description

View File

@ -94,7 +94,7 @@ class HistorySectionController
@.editing = null
addComment: (cb) ->
@repo.save(@.type).then =>
return @repo.save(@.type).then =>
@._loadHistory()
cb()

View File

@ -33,13 +33,13 @@ class ImportTaigaController
file = files[0]
loader = @confirm.loader(@translate.instant('PROJECT.IMPORT.IN_PROGRESS.TITLE'), @translate.instant('PROJECT.IMPORT.IN_PROGRESS.DESCRIPTION'), true)
loader = @confirm.loader(@translate.instant('PROJECT.IMPORT.IN_PROGRESS.TITLE'),
@translate.instant('PROJECT.IMPORT.IN_PROGRESS.DESCRIPTION'), true)
loader.start()
promise = @rs.projects.import(file, loader.update)
@importProjectService.importPromise(promise).finally () => loader.stop()
@importProjectService.importPromise(promise).finally () -> loader.stop()
return

View File

@ -112,6 +112,7 @@ div.wrapper(
div.ticket-watchers(
tg-watchers
ng-model="us"
item="us"
required-perm="modify_us"
)