commit | author | age
|
538e64
|
1 |
/** |
48e9c1
|
2 |
* vcard_attachments plugin script |
b34d67
|
3 |
* |
TB |
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. |
48e9c1
|
16 |
*/ |
b34d67
|
17 |
|
48e9c1
|
18 |
function plugin_vcard_save_contact(mime_id) |
T |
19 |
{ |
|
20 |
var lock = rcmail.set_busy(true, 'loading'); |
3c32f3
|
21 |
rcmail.http_post('plugin.savevcard', { _uid: rcmail.env.uid, _mbox: rcmail.env.mailbox, _part: mime_id }, lock); |
A |
22 |
|
48e9c1
|
23 |
return false; |
T |
24 |
} |
|
25 |
|
|
26 |
function plugin_vcard_insertrow(data) |
|
27 |
{ |
|
28 |
var ctype = data.row.ctype; |
538e64
|
29 |
|
48e9c1
|
30 |
if (ctype == 'text/vcard' || ctype == 'text/x-vcard' || ctype == 'text/directory') { |
65c95c
|
31 |
$('#rcmrow' + rcmail.html_identifier(data.uid, true) + ' > td.attachment') |
AM |
32 |
.html('<img src="' + rcmail.env.vcard_icon + '" alt="" />'); |
48e9c1
|
33 |
} |
T |
34 |
} |
|
35 |
|
|
36 |
if (window.rcmail && rcmail.gui_objects.messagelist) { |
|
37 |
rcmail.addEventListener('insertrow', function(data, evt) { plugin_vcard_insertrow(data); }); |
|
38 |
} |