From 8a3c660d237774b33b5ae2c97ae9de22fc814889 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 14 May 2015 11:45:01 +0200 Subject: [PATCH] Fixing attachments directive --- app/coffee/modules/common/attachments.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/coffee/modules/common/attachments.coffee b/app/coffee/modules/common/attachments.coffee index 9d43b5d5..cc64232a 100644 --- a/app/coffee/modules/common/attachments.coffee +++ b/app/coffee/modules/common/attachments.coffee @@ -159,7 +159,7 @@ class AttachmentsController extends taiga.Controller return not item.is_deprecated -AttachmentsDirective = ($config, $confirm, $templates) -> +AttachmentsDirective = ($config, $confirm, $templates, $translate) -> template = $templates.get("attachment/attachments.html", true) link = ($scope, $el, $attrs, $ctrls) -> @@ -224,7 +224,7 @@ AttachmentsDirective = ($config, $confirm, $templates) -> templateFn = ($el, $attrs) -> maxFileSize = $config.get("maxUploadFileSize", null) maxFileSize = sizeFormat(maxFileSize) if maxFileSize - maxFileSizeMsg = if maxFileSize then $translation.instant("ATTACHMENT.MAX_UPLOAD_SIZE") else "" + maxFileSizeMsg = if maxFileSize then $translate.instant("ATTACHMENT.MAX_UPLOAD_SIZE") else "" maxFileSize = 4000 ctx = { type: $attrs.type @@ -243,7 +243,7 @@ AttachmentsDirective = ($config, $confirm, $templates) -> template: templateFn } -module.directive("tgAttachments", ["$tgConfig", "$tgConfirm", "$tgTemplate", AttachmentsDirective]) +module.directive("tgAttachments", ["$tgConfig", "$tgConfirm", "$tgTemplate", "$translate", AttachmentsDirective]) AttachmentDirective = ($template, $compile, $translate) ->