您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

vcardattach.js 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * vcard_attachments plugin script
  3. *
  4. * @licstart The following is the entire license notice for the
  5. * JavaScript code in this file.
  6. *
  7. * Copyright (c) 2012-2014, The Roundcube Dev Team
  8. *
  9. * The JavaScript code in this page is free software: you can redistribute it
  10. * and/or modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation, either version 3 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * @licend The above is the entire license notice
  15. * for the JavaScript code in this file.
  16. */
  17. function plugin_vcard_save_contact(mime_id)
  18. {
  19. var lock = rcmail.set_busy(true, 'loading');
  20. rcmail.http_post('plugin.savevcard', { _uid: rcmail.env.uid, _mbox: rcmail.env.mailbox, _part: mime_id }, lock);
  21. return false;
  22. }
  23. function plugin_vcard_insertrow(data)
  24. {
  25. var ctype = data.row.ctype;
  26. if (ctype == 'text/vcard' || ctype == 'text/x-vcard' || ctype == 'text/directory') {
  27. $('#rcmrow' + rcmail.html_identifier(data.uid, true) + ' > td.attachment')
  28. .html('<img src="' + rcmail.env.vcard_icon + '" alt="" />');
  29. }
  30. }
  31. if (window.rcmail && rcmail.gui_objects.messagelist) {
  32. rcmail.addEventListener('insertrow', function(data, evt) { plugin_vcard_insertrow(data); });
  33. }