From a498b72dec99a3ef8a0e9a15caa0afe3af245176 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sun, 3 Feb 2019 22:29:00 +0100 Subject: Move the contactsmenu handlebars templates to the bundle Signed-off-by: Roeland Jago Douma --- core/src/jquery/contactsmenu.js | 6 ++++-- core/src/jquery/contactsmenu/jquery_entry.handlebars | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 core/src/jquery/contactsmenu/jquery_entry.handlebars (limited to 'core/src/jquery') diff --git a/core/src/jquery/contactsmenu.js b/core/src/jquery/contactsmenu.js index 8ee97dd51e9..4f90640eda0 100644 --- a/core/src/jquery/contactsmenu.js +++ b/core/src/jquery/contactsmenu.js @@ -34,6 +34,8 @@ const LIST = '' + ' ' + ''; +const entryTemplate = require('./contactsmenu/jquery_entry.handlebars'); + $.fn.contactsMenu = function (shareWith, shareType, appendTo) { // 0 - user, 4 - email, 6 - remote var allowedTypes = [0, 4, 6]; @@ -80,7 +82,7 @@ $.fn.contactsMenu = function (shareWith, shareType, appendTo) { } actions.forEach(function (action) { - var template = OC.ContactsMenu.Templates['jquery_entry']; + var template = entryTemplate; $list.find('ul').append(template(action)); }); @@ -97,7 +99,7 @@ $.fn.contactsMenu = function (shareWith, shareType, appendTo) { title = t('core', 'Error fetching contact actions'); } - var template = OC.ContactsMenu.Templates['jquery_entry']; + var template = entryTemplate; $list.find('ul').append(template({ hyperlink: '#', title: title diff --git a/core/src/jquery/contactsmenu/jquery_entry.handlebars b/core/src/jquery/contactsmenu/jquery_entry.handlebars new file mode 100644 index 00000000000..cbd97056e5c --- /dev/null +++ b/core/src/jquery/contactsmenu/jquery_entry.handlebars @@ -0,0 +1,6 @@ +
  • + + {{#if icon}}{{/if}} + {{title}} + +
  • -- cgit v1.2.3