summaryrefslogtreecommitdiff
path: root/plugins/vcard_attachments/vcard_attachments.php
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-10-14 17:18:10 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-10-14 17:18:10 +0000
commit74f334ee5ae5764294d2d0e876d38b3f069d29da (patch)
treed26051e08a3bb1befcfa0cb8babff5b87f60cf51 /plugins/vcard_attachments/vcard_attachments.php
parent4fa41eb99d4ce16e08958acd128b38baca179e53 (diff)
- Make icons skinable
- Show vcard icon on messages list when message is of type vcard git-svn-id: https://svn.roundcube.net/trunk@4093 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/vcard_attachments/vcard_attachments.php')
-rw-r--r--plugins/vcard_attachments/vcard_attachments.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/vcard_attachments/vcard_attachments.php b/plugins/vcard_attachments/vcard_attachments.php
index a4c1795b7..3fb3bf9ad 100644
--- a/plugins/vcard_attachments/vcard_attachments.php
+++ b/plugins/vcard_attachments/vcard_attachments.php
@@ -21,6 +21,11 @@ class vcard_attachments extends rcube_plugin
$this->add_hook('message_load', array($this, 'message_load'));
$this->add_hook('template_object_messagebody', array($this, 'html_output'));
}
+ else if (!$rcmail->output->framed && (!$rcmail->action || $rcmail->action == 'list')) {
+ $icon = 'plugins/vcard_attachments/' .$this->local_skin_path(). '/vcard.png';
+ $rcmail->output->set_env('vcard_icon', $icon);
+ $this->include_script('vcardattach.js');
+ }
$this->register_action('plugin.savevcard', array($this, 'save_vcard'));
}
@@ -57,6 +62,7 @@ class vcard_attachments extends rcube_plugin
function html_output($p)
{
$attach_script = false;
+ $icon = 'plugins/vcard_attachments/' .$this->local_skin_path(). '/vcard_add_contact.png';
foreach ($this->vcard_parts as $part) {
$vcards = rcube_vcard::import($this->message->get_part_content($part));
@@ -83,8 +89,7 @@ class vcard_attachments extends rcube_plugin
'href' => "#",
'onclick' => "return plugin_vcard_save_contact('".JQ($part.':'.$idx)."')",
'title' => $this->gettext('addvcardmsg')),
- html::img(array('src' => $this->url('vcard_add_contact.png'),
- 'style' => "vertical-align:middle")))
+ html::img(array('src' => $icon, 'style' => "vertical-align:middle")))
. ' ' . html::span(null, Q($display)));
}