Changeset 4093 in subversion


Ignore:
Timestamp:
Oct 14, 2010 1:18:10 PM (3 years ago)
Author:
alec
Message:
  • Make icons skinable
  • Show vcard icon on messages list when message is of type vcard
Location:
trunk/plugins/vcard_attachments
Files:
4 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/vcard_attachments/package.xml

    r3922 r4093  
    2020                <active>yes</active> 
    2121        </lead> 
    22         <date></date> 
    23         <time></time> 
     22        <date>2010-10-14</date> 
     23        <time>19:00</time> 
    2424        <version> 
    25                 <release></release> 
    26                 <api>2.0</api> 
     25                <release>3.0</release> 
     26                <api>3.0</api> 
    2727        </version> 
    2828        <stability> 
     
    3333        <notes> 
    3434- Exec contact_create hook when adding contact (#1486964) 
     35- Make icons skinable 
     36- Display vcard icon on messages list when message is of type vcard 
    3537    </notes> 
    3638        <contents> 
     
    4446                                <tasks:replace from="@package_version@" to="version" type="package-info"/> 
    4547                        </file> 
     48                        <file name="localization/cs_CZ.inc" role="data"></file> 
    4649                        <file name="localization/en_US.inc" role="data"></file> 
    4750                        <file name="localization/de_CH.inc" role="data"></file> 
    4851                        <file name="localization/de_DE.inc" role="data"></file> 
     52                        <file name="localization/es_ES.inc" role="data"></file> 
     53                        <file name="localization/et_EE.inc" role="data"></file> 
     54                        <file name="localization/ja_JP.inc" role="data"></file> 
     55                        <file name="localization/es_ES.inc" role="data"></file> 
    4956                        <file name="localization/pl_PL.inc" role="data"></file> 
    5057                        <file name="localization/ru_RU.inc" role="data"></file> 
    5158                        <file name="localization/sv_SE.inc" role="data"></file> 
    52                         <file name="vcard_add_contact.png" role="data"></file> 
     59                        <file name="localization/zh_TW.inc" role="data"></file> 
     60                        <file name="skins/default/vcard_add_contact.png" role="data"></file> 
     61                        <file name="skins/default/vcard.png" role="data"></file> 
    5362                </dir> 
    5463                <!-- / --> 
  • trunk/plugins/vcard_attachments/vcard_attachments.php

    r3922 r4093  
    2121            $this->add_hook('message_load', array($this, 'message_load')); 
    2222            $this->add_hook('template_object_messagebody', array($this, 'html_output')); 
     23        } 
     24        else if (!$rcmail->output->framed && (!$rcmail->action || $rcmail->action == 'list')) { 
     25            $icon = 'plugins/vcard_attachments/' .$this->local_skin_path(). '/vcard.png'; 
     26            $rcmail->output->set_env('vcard_icon', $icon); 
     27            $this->include_script('vcardattach.js'); 
    2328        } 
    2429 
     
    5863    { 
    5964        $attach_script = false; 
     65        $icon = 'plugins/vcard_attachments/' .$this->local_skin_path(). '/vcard_add_contact.png'; 
    6066 
    6167        foreach ($this->vcard_parts as $part) { 
     
    8490                        'onclick' => "return plugin_vcard_save_contact('".JQ($part.':'.$idx)."')", 
    8591                        'title' => $this->gettext('addvcardmsg')), 
    86                         html::img(array('src' => $this->url('vcard_add_contact.png'), 
    87                             'style' => "vertical-align:middle"))) 
     92                        html::img(array('src' => $icon, 'style' => "vertical-align:middle"))) 
    8893                    . ' ' . html::span(null, Q($display))); 
    8994            } 
  • trunk/plugins/vcard_attachments/vcardattach.js

    r4086 r4093  
    1010  return false; 
    1111} 
     12 
     13function plugin_vcard_insertrow(data) 
     14{ 
     15  var ctype = data.row.ctype; 
     16  if (ctype == 'text/vcard' || ctype == 'text/x-vcard' || ctype == 'text/directory') { 
     17    $('#rcmrow'+data.uid+' > td.attachment').html('<img src="'+rcmail.env.vcard_icon+'" alt="">'); 
     18  } 
     19} 
     20 
     21if (window.rcmail && rcmail.gui_objects.messagelist) { 
     22  rcmail.addEventListener('insertrow', function(data, evt) { plugin_vcard_insertrow(data); }); 
     23} 
Note: See TracChangeset for help on using the changeset viewer.