aboutsummaryrefslogtreecommitdiffstats
path: root/core/src/jquery
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-02-03 22:29:00 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-02-04 10:56:52 +0100
commita498b72dec99a3ef8a0e9a15caa0afe3af245176 (patch)
treea901dcf413b6093179d7b54f89940ca08bacbcb2 /core/src/jquery
parenta242ec695aca6054b63a3e48faf876bfd051292e (diff)
downloadnextcloud-server-a498b72dec99a3ef8a0e9a15caa0afe3af245176.tar.gz
nextcloud-server-a498b72dec99a3ef8a0e9a15caa0afe3af245176.zip
Move the contactsmenu handlebars templates to the bundle
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/src/jquery')
-rw-r--r--core/src/jquery/contactsmenu.js6
-rw-r--r--core/src/jquery/contactsmenu/jquery_entry.handlebars6
2 files changed, 10 insertions, 2 deletions
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 = ''
+ ' </ul>'
+ '</div>';
+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 @@
+<li>
+ <a href="{{hyperlink}}">
+ {{#if icon}}<img src="{{icon}}">{{/if}}
+ <span>{{title}}</span>
+ </a>
+</li>