aboutsummaryrefslogtreecommitdiffstats
path: root/apps/comments/js/commentsmodifymenu.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/commentsmodifymenu.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/commentsmodifymenu.js')
-rw-r--r--apps/comments/js/commentsmodifymenu.js20
1 files changed, 2 insertions, 18 deletions
diff --git a/apps/comments/js/commentsmodifymenu.js b/apps/comments/js/commentsmodifymenu.js
index 4b17cbbfbf0..fd1e3d80bd0 100644
--- a/apps/comments/js/commentsmodifymenu.js
+++ b/apps/comments/js/commentsmodifymenu.js
@@ -10,20 +10,6 @@
/* global Handlebars */
(function() {
- var TEMPLATE_MENU =
- '<ul>' +
- '{{#each items}}' +
- '<li>' +
- '<a href="#" class="menuitem action {{name}} permanent" data-action="{{name}}">' +
- '{{#if iconClass}}' +
- '<span class="icon {{iconClass}}"></span>' +
- '{{else}}' +
- '<span class="no-icon"></span>' +
- '{{/if}}' +
- '<span>{{displayName}}</span>' +
- '</li>' +
- '{{/each}}' +
- '</ul>';
/**
* Construct a new CommentsModifyMenuinstance
@@ -52,8 +38,6 @@
'click a.action': '_onClickAction'
},
- template: Handlebars.compile(TEMPLATE_MENU),
-
/**
* Event handler whenever an action has been clicked within the menu
*
@@ -74,7 +58,7 @@
* Renders the menu with the currently set items
*/
render: function() {
- this.$el.html(this.template({
+ this.$el.html(OCA.Comments.Templates['commentsmodifymenu']({
items: this._scopes
}));
},
@@ -121,4 +105,4 @@
OCA.Comments = OCA.Comments || {};
OCA.Comments.CommentsModifyMenu = CommentsModifyMenu;
-})(OC, OCA); \ No newline at end of file
+})(OC, OCA);