diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-02-03 22:29:00 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-02-04 10:56:52 +0100 |
commit | a498b72dec99a3ef8a0e9a15caa0afe3af245176 (patch) | |
tree | a901dcf413b6093179d7b54f89940ca08bacbcb2 /core/src/jquery | |
parent | a242ec695aca6054b63a3e48faf876bfd051292e (diff) | |
download | nextcloud-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.js | 6 | ||||
-rw-r--r-- | core/src/jquery/contactsmenu/jquery_entry.handlebars | 6 |
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> |