aboutsummaryrefslogtreecommitdiffstats
path: root/apps/comments/js/filesplugin.js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-10-18 11:40:00 +0200
committerGitHub <noreply@github.com>2018-10-18 11:40:00 +0200
commit729b853a307bfa6d5d5540b02f11b950ffe24296 (patch)
treea2fcce1c67de3f59081f1f3330885da9ca446ff4 /apps/comments/js/filesplugin.js
parent4e53ea6dbda8cf9a2e9cbac1febbabb6baed3b01 (diff)
parente7443ee892f2ef49fed327cef6770ce11cd1fc0b (diff)
downloadnextcloud-server-729b853a307bfa6d5d5540b02f11b950ffe24296.tar.gz
nextcloud-server-729b853a307bfa6d5d5540b02f11b950ffe24296.zip
Merge pull request #11853 from nextcloud/csp/comments
Move more comments to compiled handlebars
Diffstat (limited to 'apps/comments/js/filesplugin.js')
-rw-r--r--apps/comments/js/filesplugin.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/apps/comments/js/filesplugin.js b/apps/comments/js/filesplugin.js
index 8c5762065a1..939edc8c695 100644
--- a/apps/comments/js/filesplugin.js
+++ b/apps/comments/js/filesplugin.js
@@ -16,11 +16,6 @@
PROPERTY_COMMENTS_UNREAD: '{' + OC.Files.Client.NS_OWNCLOUD + '}comments-unread'
});
- var TEMPLATE_COMMENTS_UNREAD =
- '<a class="action action-comment permanent" title="{{countMessage}}" href="#">' +
- '<img class="svg" src="{{iconUrl}}"/>' +
- '</a>';
-
OCA.Comments = _.extend({}, OCA.Comments);
if (!OCA.Comments) {
/**
@@ -39,10 +34,7 @@
],
_formatCommentCount: function(count) {
- if (!this._commentsUnreadTemplate) {
- this._commentsUnreadTemplate = Handlebars.compile(TEMPLATE_COMMENTS_UNREAD);
- }
- return this._commentsUnreadTemplate({
+ return OCA.Comments.Templates['filesplugin']({
count: count,
countMessage: n('comments', '%n unread comment', '%n unread comments', count),
iconUrl: OC.imagePath('core', 'actions/comment')