summaryrefslogtreecommitdiffstats
path: root/apps/files/js/filemultiselectmenu.js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-10-01 10:52:56 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-10-01 17:15:08 +0200
commit40934ab15b2a6989a3ab067aec4654309dbd6c43 (patch)
treee2683c32529ac9430b20064208b82e286595339c /apps/files/js/filemultiselectmenu.js
parent335efcc43b2ac731794cf0bea92c249d8b2a5cd5 (diff)
downloadnextcloud-server-40934ab15b2a6989a3ab067aec4654309dbd6c43.tar.gz
nextcloud-server-40934ab15b2a6989a3ab067aec4654309dbd6c43.zip
Move the filemultiselectmenu over to compiled handlebars
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files/js/filemultiselectmenu.js')
-rw-r--r--apps/files/js/filemultiselectmenu.js19
1 files changed, 2 insertions, 17 deletions
diff --git a/apps/files/js/filemultiselectmenu.js b/apps/files/js/filemultiselectmenu.js
index d587d1fbdb2..d50fe28eace 100644
--- a/apps/files/js/filemultiselectmenu.js
+++ b/apps/files/js/filemultiselectmenu.js
@@ -9,21 +9,6 @@
*/
(function() {
- var TEMPLATE_MENU =
- '<ul>' +
- '{{#each items}}' +
- '<li class="item-{{name}}">' +
- '<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 class="label">{{displayName}}</span>' +
- '</a></li>' +
- '{{/each}}' +
- '</ul>';
-
var FileMultiSelectMenu = OC.Backbone.View.extend({
tagName: 'div',
className: 'filesSelectMenu popovermenu bubble menu-center',
@@ -34,12 +19,12 @@
events: {
'click a.action': '_onClickAction'
},
- template: Handlebars.compile(TEMPLATE_MENU),
+
/**
* Renders the menu with the currently set items
*/
render: function() {
- this.$el.html(this.template({
+ this.$el.html(OCA.Files.Templates['filemultiselectmenu']({
items: this._scopes
}));
},