From 2d09ae4454d07fcb083507966122321d6451e9be Mon Sep 17 00:00:00 2001 From: thomasb Date: Mon, 12 Mar 2012 08:41:07 +0000 Subject: Added skinning for Larry git-svn-id: https://svn.roundcube.net/trunk@5997 208e9e7b-5314-0410-a742-e7e81cd9613c --- plugins/vcard_attachments/package.xml | 59 ++++++++++++++------- plugins/vcard_attachments/skins/default/style.css | 17 ++++++ plugins/vcard_attachments/skins/larry/style.css | 21 ++++++++ plugins/vcard_attachments/skins/larry/vcard.png | Bin 0 -> 493 bytes .../skins/larry/vcard_add_contact.png | Bin 0 -> 1859 bytes plugins/vcard_attachments/vcard_attachments.php | 18 +++---- plugins/vcard_attachments/vcardattach.js | 4 +- 7 files changed, 89 insertions(+), 30 deletions(-) create mode 100644 plugins/vcard_attachments/skins/default/style.css create mode 100644 plugins/vcard_attachments/skins/larry/style.css create mode 100644 plugins/vcard_attachments/skins/larry/vcard.png create mode 100644 plugins/vcard_attachments/skins/larry/vcard_add_contact.png (limited to 'plugins') diff --git a/plugins/vcard_attachments/package.xml b/plugins/vcard_attachments/package.xml index e09b8db53..066c908bf 100644 --- a/plugins/vcard_attachments/package.xml +++ b/plugins/vcard_attachments/package.xml @@ -19,11 +19,11 @@ alec@alec.pl yes - 2010-10-14 + 2012-03-11 - 3.0 - 3.0 + 3.1-beta + 3.1-beta stable @@ -31,10 +31,11 @@ GNU GPLv3+ +- Add styles for new skin "Larry" - Exec contact_create hook when adding contact (#1486964) - Make icons skinable - Display vcard icon on messages list when message is of type vcard - + @@ -59,8 +60,12 @@ + + + + @@ -76,25 +81,41 @@ - - 2010-04-28 - - - 2.0 - 2.0 - - - stable - stable - - GNU GPLv2 - + + 2010-04-28 + + + 2.0 + 2.0 + + + stable + stable + + GNU GPLv2 + - Added support for Content-Type: text/directory; profile=vCard - Added handler for message bodies of type vCard (#1486683) - Added support for more than one vCard attachment/body - Added support for more than one contact in one vCard file - Created package.xml - - + + + + 2012-03-11 + + + 3.1 + 3.1 + + + stable + stable + + GNU GPLv3+ + + - Add styles for new skin "Larry" + + diff --git a/plugins/vcard_attachments/skins/default/style.css b/plugins/vcard_attachments/skins/default/style.css new file mode 100644 index 000000000..044d3983e --- /dev/null +++ b/plugins/vcard_attachments/skins/default/style.css @@ -0,0 +1,17 @@ + +p.vcardattachment { + margin: 0.5em 1em; + border: 1px solid #999; + border-radius:4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + width: auto; +} + +p.vcardattachment a { + display: block; + background: url(vcard_add_contact.png) 4px 0px no-repeat; + padding: 0.7em 0.5em 0.3em 42px; + height: 22px; +} diff --git a/plugins/vcard_attachments/skins/larry/style.css b/plugins/vcard_attachments/skins/larry/style.css new file mode 100644 index 000000000..eb70082ee --- /dev/null +++ b/plugins/vcard_attachments/skins/larry/style.css @@ -0,0 +1,21 @@ + +p.vcardattachment { + margin: 0.5em 1em; + width: auto; + background: #f9f9f9; + border: 1px solid #d3d3d3; + border-radius:4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + box-shadow: 0 0 2px #ccc; + -o-box-shadow: 0 0 2px #ccc; + -webkit-box-shadow: 0 0 2px #ccc; + -moz-box-shadow: 0 0 2px #ccc; +} + +p.vcardattachment a { + display: block; + background: url(vcard_add_contact.png) 6px 2px no-repeat; + padding: 1.2em 0.5em 0.7em 46px; +} diff --git a/plugins/vcard_attachments/skins/larry/vcard.png b/plugins/vcard_attachments/skins/larry/vcard.png new file mode 100644 index 000000000..8bf6b1b72 Binary files /dev/null and b/plugins/vcard_attachments/skins/larry/vcard.png differ diff --git a/plugins/vcard_attachments/skins/larry/vcard_add_contact.png b/plugins/vcard_attachments/skins/larry/vcard_add_contact.png new file mode 100644 index 000000000..a8ce459f8 Binary files /dev/null and b/plugins/vcard_attachments/skins/larry/vcard_add_contact.png differ diff --git a/plugins/vcard_attachments/vcard_attachments.php b/plugins/vcard_attachments/vcard_attachments.php index fdb2d3289..c321e84aa 100644 --- a/plugins/vcard_attachments/vcard_attachments.php +++ b/plugins/vcard_attachments/vcard_attachments.php @@ -76,29 +76,29 @@ class vcard_attachments extends rcube_plugin if (in_array($part, $this->vcard_bodies)) $p['content'] = ''; - $style = 'margin:0.5em 1em; padding:0.2em 0.5em; border:1px solid #999; ' - .'border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; width: auto'; - foreach ($vcards as $idx => $vcard) { $display = $vcard->displayname; if ($vcard->email[0]) $display .= ' <'.$vcard->email[0].'>'; // add box below messsage body - $p['content'] .= html::p(array('style' => $style), + $p['content'] .= html::p(array('class' => 'vcardattachment'), html::a(array( 'href' => "#", - 'onclick' => "return plugin_vcard_save_contact('".JQ($part.':'.$idx)."')", - 'title' => $this->gettext('addvcardmsg')), - html::img(array('src' => $icon, 'style' => "vertical-align:middle"))) - . ' ' . html::span(null, Q($display))); + 'onclick' => "return plugin_vcard_save_contact('" . JQ($part.':'.$idx) . "')", + 'title' => $this->gettext('addvcardmsg'), + ), + html::span(null, Q($display))) + ); } $attach_script = true; } - if ($attach_script) + if ($attach_script) { $this->include_script('vcardattach.js'); + $this->include_stylesheet($this->local_skin_path() . '/style.css'); + } return $p; } diff --git a/plugins/vcard_attachments/vcardattach.js b/plugins/vcard_attachments/vcardattach.js index ef19190e7..31df2468d 100644 --- a/plugins/vcard_attachments/vcardattach.js +++ b/plugins/vcard_attachments/vcardattach.js @@ -5,7 +5,7 @@ function plugin_vcard_save_contact(mime_id) { var lock = rcmail.set_busy(true, 'loading'); - rcmail.http_post('plugin.savevcard', '_uid='+rcmail.env.uid+'&_mbox='+urlencode(rcmail.env.mailbox)+'&_part='+urlencode(mime_id), lock); + rcmail.http_post('plugin.savevcard', { _uid: rcmail.env.uid, _mbox: urlencode(rcmail.env.mailbox), _part: urlencode(mime_id) }, lock); return false; } @@ -14,7 +14,7 @@ function plugin_vcard_insertrow(data) { var ctype = data.row.ctype; if (ctype == 'text/vcard' || ctype == 'text/x-vcard' || ctype == 'text/directory') { - $('#rcmrow'+data.uid+' > td.attachment').html(''); + $('#rcmrow'+data.uid+' > td.attachment').html(''); } } -- cgit v1.2.3