diff --git a/app/coffee/modules/common/attachments.coffee b/app/coffee/modules/common/attachments.coffee index 6b53e6bf..72740768 100644 --- a/app/coffee/modules/common/attachments.coffee +++ b/app/coffee/modules/common/attachments.coffee @@ -61,10 +61,10 @@ AttachmentsDirective = ($repo) -> _.sorBy($scope.attachments, 'order') ## Total attachments counter - $scope.$watch "attachmentsCount", (attachmentsCount) -> - $el.find("span.attachments-num").html(attachmentsCount) + $scope.$watch "attachmentsCount", (count) -> + $el.find("span.attachments-num").html(count) - ## See deprecated attachments + ## Show/Hide deprecated attachments $scope.showDeprecatedAttachments = false $scope.$watch "deprecatedAttachmentsCount", (deprecatedAttachmentsCount) -> @@ -83,9 +83,11 @@ AttachmentsDirective = ($repo) -> if $scope.showDeprecatedAttachments target.find("span.text").html("- hide deprecated attachments") # TODO: i18n + .prop("title", "hide deprecated attachments") # TODO: i18n $el.find("div.single-attachment.deprecated").removeClass("hidden") else target.find("span.text").html("+ show deprecated attachments") # TODO: i18n + .prop("title", "show deprecated attachments") # TODO: i18n $el.find("div.single-attachment.deprecated").addClass("hidden") ## On destroy @@ -104,7 +106,7 @@ module.directive("tgAttachments", ["$tgRepo", AttachmentsDirective]) ## Attachment Directive ############################################################################# -AttachmentDirective = ($log, $repo, $rs, $confirm) -> +AttachmentDirective = ($log, $repo, $confirm) -> singleAttachment = _.template("""