diff options
author | Thomas Bruederli <bruederli@kolabsys.com> | 2015-01-14 08:27:48 (GMT) |
---|---|---|
committer | Thomas Bruederli <bruederli@kolabsys.com> | 2015-01-14 08:27:48 (GMT) |
commit | b02e2c3b8f9ef6a63eba80f84432b33a00da95d1 (patch) | |
tree | 2333ceca52115502683a94330abcb7f86fef514b /plugins/libcalendaring | |
parent | 0a51ccd5a44882e84c0f14cf41e5c0bc790fb469 (diff) | |
download | roundcubemail-plugins-kolab-b02e2c3b8f9ef6a63eba80f84432b33a00da95d1.tar.gz |
- Store relation to message when creating event from email (#4161)
- Move common functions to libcalendaring
- Assign dialog button classes directly
Diffstat (limited to 'plugins/libcalendaring')
-rw-r--r-- | plugins/libcalendaring/libcalendaring.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/libcalendaring/libcalendaring.js b/plugins/libcalendaring/libcalendaring.js index d04a024..f8f2a55 100644 --- a/plugins/libcalendaring/libcalendaring.js +++ b/plugins/libcalendaring/libcalendaring.js @@ -788,6 +788,39 @@ function rcube_libcalendaring(settings) } }; + + // Render message reference links to the given container + this.render_message_links = function(links, container, edit, plugin) + { + var ul = $('<ul>').addClass('attachmentslist'); + + $.each(links, function(i, link) { + if (!link.mailurl) + return true; // continue + + var li = $('<li>').addClass('link') + .addClass('message eml') + .append($('<a>') + .attr('href', link.mailurl) + .addClass('messagelink') + .text(link.subject || link.uri) + ) + .appendTo(ul); + + // add icon to remove the link + if (edit) { + $('<a>') + .attr('href', '#delete') + .attr('title', rcmail.gettext('removelink', plugin)) + .attr('data-uri', link.uri) + .addClass('delete') + .text(rcmail.gettext('delete')) + .appendTo(li); + } + }); + + container.empty().append(ul); + } } ////// static methods |