From 83370e5ff14f55f6af435807713956160f91abfa Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 18 Dec 2012 12:54:38 +0100 Subject: Display 'Sender' header in message preview --- program/localization/en_US/labels.inc | 1 + 1 file changed, 1 insertion(+) (limited to 'program/localization/en_US') diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index abb0dca5d..730e6af09 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -41,6 +41,7 @@ $labels['junk'] = 'Junk'; // message listing $labels['subject'] = 'Subject'; $labels['from'] = 'From'; +$labels['sender'] = 'Sender'; $labels['to'] = 'To'; $labels['cc'] = 'Cc'; $labels['bcc'] = 'Bcc'; -- cgit v1.2.3 From be72fb3597c21ca3aaa058adf41bb72d53d197c7 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 28 Dec 2012 12:40:57 +0100 Subject: Unified attachments filenames handling for message parts without a filename --- program/lib/Roundcube/rcube_message.php | 21 --------------------- program/localization/en_US/labels.inc | 1 + program/steps/mail/compose.inc | 11 +---------- program/steps/mail/func.inc | 30 +++++++++++++++++++++++++----- program/steps/mail/get.inc | 21 ++------------------- program/steps/mail/show.inc | 5 +---- 6 files changed, 30 insertions(+), 59 deletions(-) (limited to 'program/localization/en_US') diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index 9fea8382a..d450bb439 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -106,7 +106,6 @@ class rcube_message if (!empty($this->headers->structure)) { $this->get_mime_numbers($this->headers->structure); $this->parse_structure($this->headers->structure); - $this->parse_attachments(); } else { $this->body = $this->storage->get_body($uid); @@ -650,26 +649,6 @@ class rcube_message } - /** - * Parse attachment parts - */ - private function parse_attachments() - { - // Attachment must have a name - foreach ($this->attachments as $attachment) { - if (!$attachment->filename) { - $ext = rcube_mime::get_mime_extensions($attachment->mimetype); - $ext = array_shift($ext); - - $attachment->filename = 'Part_' . $attachment->mime_id; - if ($ext) { - $attachment->filename .= '.' . $ext; - } - } - } - } - - /** * Fill aflat array with references to all parts, indexed by part numbers * diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 730e6af09..fa8f33d6d 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -377,6 +377,7 @@ $labels['edititem'] = 'Edit item'; $labels['preferhtml'] = 'Display HTML'; $labels['defaultcharset'] = 'Default Character Set'; $labels['htmlmessage'] = 'HTML Message'; +$labels['messagepart'] = 'Part'; $labels['dateformat'] = 'Date format'; $labels['timeformat'] = 'Time format'; $labels['prettydate'] = 'Pretty dates'; diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 379e920e5..74c6d5f29 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -1154,16 +1154,7 @@ function rcmail_save_attachment(&$message, $pid) } $mimetype = $part->ctype_primary . '/' . $part->ctype_secondary; - $filename = $part->filename; - if (!strlen($filename)) { - if ($mimetype == 'text/html') { - $filename = rcube_label('htmlmessage'); - } - else { - $filename = 'Part_'.$pid; - } - $filename .= '.' . $part->ctype_secondary; - } + $filename = rcmail_attachment_name($part); $attachment = array( 'group' => $COMPOSE['id'], diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 814adb64d..bedd3e8ea 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1598,10 +1598,7 @@ function rcmail_message_part_controls($attrib) $part = $MESSAGE->mime_parts[$part]; $table = new html_table(array('cols' => 3)); - $filename = $part->filename; - if (empty($filename) && $attach_prop->mimetype == 'text/html') { - $filename = rcube_label('htmlmessage'); - } + $filename = rcmail_attachment_name($part); if (!empty($filename)) { $table->add('title', Q(rcube_label('filename'))); @@ -1616,7 +1613,6 @@ function rcmail_message_part_controls($attrib) } - function rcmail_message_part_frame($attrib) { global $MESSAGE; @@ -1841,6 +1837,30 @@ function rcmail_fix_mimetype($name) return $name; } +// return attachment filename, handle empty filename case +function rcmail_attachment_name($attachment) +{ + $filename = $attachment->filename; + + if ($filename === null || $filename === '') { + if ($attachment->mimetype == 'text/html') { + $filename = rcube_label('htmlmessage'); + } + else { + $ext = rcube_mime::get_mime_extensions($attachment->mimetype); + $ext = array_shift($ext); + $filename = rcube_label('messagepart') . ' ' . $attachment->mime_id; + if ($ext) { + $filename .= '.' . $ext; + } + } + } + + $filename = preg_replace('[\r\n]', '', $filename); + + return $filename; +} + function rcmail_search_filter($attrib) { global $OUTPUT, $CONFIG; diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index 803716d61..37f728ebf 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -47,13 +47,7 @@ check_storage_status(); // show part page if (!empty($_GET['_frame'])) { if (($part_id = get_input_value('_part', RCUBE_INPUT_GPC)) && ($part = $MESSAGE->mime_parts[$part_id])) { - $filename = $part->filename; - if (empty($filename) && $part->mimetype == 'text/html') { - $filename = rcube_label('htmlmessage'); - } - if (!empty($filename)) { - $OUTPUT->set_pagetitle($filename); - } + $OUTPUT->set_pagetitle(rcmail_attachment_name($part)); } $OUTPUT->send('messagepart'); @@ -236,18 +230,7 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) { // don't kill the connection if download takes more than 30 sec. @set_time_limit(0); - if ($part->filename) { - $filename = $part->filename; - } - else if ($part->mimetype == 'text/html') { - $filename = rcube_label('htmlmessage'); - } - else { - $ext = '.' . ($mimetype == 'text/plain' ? 'txt' : $ctype_secondary); - $filename = ($MESSAGE->subject ? $MESSAGE->subject : 'roundcube') . $ext; - } - - $filename = preg_replace('[\r\n]', '', $filename); + $filename = rcmail_attachment_name($part); if ($browser->ie && $browser->ver < 7) $filename = rawurlencode(abbreviate_string($filename, 55)); diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index 82594f3e4..22f4ff4c2 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -150,10 +150,7 @@ function rcmail_message_attachments($attrib) if (sizeof($MESSAGE->attachments)) { foreach ($MESSAGE->attachments as $attach_prop) { - $filename = $attach_prop->filename; - if (empty($filename) && $attach_prop->mimetype == 'text/html') { - $filename = rcube_label('htmlmessage'); - } + $filename = rcmail_attachment_name($attach_prop); if ($PRINT_MODE) { $size = $RCMAIL->message_part_size($attach_prop); -- cgit v1.2.3 From 830fd2ecbb67c395617e1cc38f343d12af0a2861 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 28 Dec 2012 15:33:48 +0100 Subject: Display PGP/MIME signature attachments as "Digital Signature" (#1488570) --- CHANGELOG | 1 + program/localization/en_US/labels.inc | 1 + program/steps/mail/func.inc | 9 ++++++++- program/steps/mail/show.inc | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) (limited to 'program/localization/en_US') diff --git a/CHANGELOG b/CHANGELOG index 5f010acb3..687fd8929 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Display PGP/MIME signature attachments as "Digital Signature" (#1488570) - Workaround UW-IMAP bug where hierarchy separator is added to the shared folder name (#1488879) - Fix version comparisons with -stable suffix (#1488876) - Add unsupported alternative parts to attachments list (#1488870) diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index fa8f33d6d..b5fcee496 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -378,6 +378,7 @@ $labels['preferhtml'] = 'Display HTML'; $labels['defaultcharset'] = 'Default Character Set'; $labels['htmlmessage'] = 'HTML Message'; $labels['messagepart'] = 'Part'; +$labels['digitalsig'] = 'Digital Signature'; $labels['dateformat'] = 'Date format'; $labels['timeformat'] = 'Time format'; $labels['prettydate'] = 'Pretty dates'; diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index bedd3e8ea..44a1557c3 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1838,7 +1838,7 @@ function rcmail_fix_mimetype($name) } // return attachment filename, handle empty filename case -function rcmail_attachment_name($attachment) +function rcmail_attachment_name($attachment, $display = false) { $filename = $attachment->filename; @@ -1858,6 +1858,13 @@ function rcmail_attachment_name($attachment) $filename = preg_replace('[\r\n]', '', $filename); + // Display smart names for some known mimetypes + if ($display) { + if (preg_match('/application\/(pgp|pkcs7)-signature/i', $attachment->mimetype)) { + $filename = rcube_label('digitalsig'); + } + } + return $filename; } diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index 22f4ff4c2..64e628880 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -150,7 +150,7 @@ function rcmail_message_attachments($attrib) if (sizeof($MESSAGE->attachments)) { foreach ($MESSAGE->attachments as $attach_prop) { - $filename = rcmail_attachment_name($attach_prop); + $filename = rcmail_attachment_name($attach_prop, true); if ($PRINT_MODE) { $size = $RCMAIL->message_part_size($attach_prop); -- cgit v1.2.3 From 9151729d8e440a504156b3849c2bc010015f5561 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Sat, 29 Dec 2012 14:52:18 +0100 Subject: Simplify file headers because Transifex will use them in all generated language files --- program/localization/en_US/csv2vcard.inc | 4 ++-- program/localization/en_US/labels.inc | 8 +++----- program/localization/en_US/messages.inc | 6 ++---- 3 files changed, 7 insertions(+), 11 deletions(-) (limited to 'program/localization/en_US') diff --git a/program/localization/en_US/csv2vcard.inc b/program/localization/en_US/csv2vcard.inc index caf192aea..eb884f59a 100644 --- a/program/localization/en_US/csv2vcard.inc +++ b/program/localization/en_US/csv2vcard.inc @@ -2,9 +2,9 @@ /* +-----------------------------------------------------------------------+ - | language/en_US/csv2vcard.inc | + | localization//csv2vcard.inc | | | - | Language file of the Roundcube Webmail client | + | Localization file of the Roundcube Webmail client | | Copyright (C) 2005-2012, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index b5fcee496..1886837c0 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -2,18 +2,16 @@ /* +-----------------------------------------------------------------------+ - | language/en_US/labels.inc | + | localization//labels.inc | | | - | Language file of the Roundcube Webmail client | - | Copyright (C) 2005-2011, The Roundcube Dev Team | + | Localization file of the Roundcube Webmail client | + | Copyright (C) 2005-2012, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | | See the README file for a full license statement. | | | +-----------------------------------------------------------------------+ - | Author: Thomas Bruederli | - +-----------------------------------------------------------------------+ */ $labels = array(); diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc index 68cf314e7..86fd170c7 100644 --- a/program/localization/en_US/messages.inc +++ b/program/localization/en_US/messages.inc @@ -2,9 +2,9 @@ /* +-----------------------------------------------------------------------+ - | language/en_US/messages.inc | + | localization//messages.inc | | | - | Language file of the Roundcube Webmail client | + | Localization file of the Roundcube Webmail client | | Copyright (C) 2005-2012, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | @@ -12,8 +12,6 @@ | See the README file for a full license statement. | | | +-----------------------------------------------------------------------+ - | Author: Thomas Bruederli | - +-----------------------------------------------------------------------+ */ $messages = array(); -- cgit v1.2.3 From 49437c123a4435ce98e62edd084442ff20aaef1d Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Sat, 29 Dec 2012 15:13:24 +0100 Subject: Add proper headers to localization template files --- plugins/acl/localization/en_US.inc | 16 ++++++++++++++++ plugins/archive/localization/en_US.inc | 16 ++++++++++++++++ plugins/help/localization/en_US.inc | 16 ++++++++++++++++ plugins/hide_blockquote/localization/en_US.inc | 16 ++++++++++++++++ plugins/managesieve/localization/en_US.inc | 17 +++++++++++++++++ plugins/markasjunk/localization/en_US.inc | 16 ++++++++++++++++ plugins/new_user_dialog/localization/en_US.inc | 16 ++++++++++++++++ plugins/newmail_notifier/localization/en_US.inc | 16 ++++++++++++++++ plugins/password/localization/en_US.inc | 16 ++++++++++++++++ plugins/subscriptions_option/localization/en_US.inc | 16 ++++++++++++++++ plugins/userinfo/localization/en_US.inc | 16 ++++++++++++++++ plugins/vcard_attachments/localization/en_US.inc | 16 ++++++++++++++++ plugins/zipdownload/localization/en_US.inc | 19 ++++++++++++++++--- program/localization/en_US/labels.inc | 2 ++ program/localization/en_US/messages.inc | 2 ++ 15 files changed, 213 insertions(+), 3 deletions(-) (limited to 'program/localization/en_US') diff --git a/plugins/acl/localization/en_US.inc b/plugins/acl/localization/en_US.inc index f5b1ae64d..b6d206864 100644 --- a/plugins/acl/localization/en_US.inc +++ b/plugins/acl/localization/en_US.inc @@ -1,5 +1,21 @@ .inc | + | | + | Localization file of the Roundcube Webmail ACL plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/ +*/ + $labels['sharing'] = 'Sharing'; $labels['myrights'] = 'Access Rights'; $labels['username'] = 'User:'; diff --git a/plugins/archive/localization/en_US.inc b/plugins/archive/localization/en_US.inc index 01a4f1e13..fade70852 100644 --- a/plugins/archive/localization/en_US.inc +++ b/plugins/archive/localization/en_US.inc @@ -1,5 +1,21 @@ .inc | + | | + | Localization file of the Roundcube Webmail Archive plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-archive/ +*/ + $labels = array(); $labels['buttontext'] = 'Archive'; $labels['buttontitle'] = 'Archive this message'; diff --git a/plugins/help/localization/en_US.inc b/plugins/help/localization/en_US.inc index 8c2d1517c..cf6c0aaaf 100644 --- a/plugins/help/localization/en_US.inc +++ b/plugins/help/localization/en_US.inc @@ -1,5 +1,21 @@ .inc | + | | + | Localization file of the Roundcube Webmail Help plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-help/ +*/ + $labels = array(); $labels['help'] = 'Help'; $labels['about'] = 'About'; diff --git a/plugins/hide_blockquote/localization/en_US.inc b/plugins/hide_blockquote/localization/en_US.inc index cf7eb137f..c3a5ca019 100644 --- a/plugins/hide_blockquote/localization/en_US.inc +++ b/plugins/hide_blockquote/localization/en_US.inc @@ -1,5 +1,21 @@ .inc | + | | + | Localization file of the Roundcube Webmail Hide-Blockquote plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-hide_blockquote/ +*/ + $labels = array(); $labels['hide'] = 'Hide'; $labels['show'] = 'Show'; diff --git a/plugins/managesieve/localization/en_US.inc b/plugins/managesieve/localization/en_US.inc index 9336390d1..2b23af6db 100644 --- a/plugins/managesieve/localization/en_US.inc +++ b/plugins/managesieve/localization/en_US.inc @@ -1,5 +1,22 @@ .inc | + | | + | Localization file of the Roundcube Webmail Managesieve plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-managesieve/ +*/ + + $labels['filters'] = 'Filters'; $labels['managefilters'] = 'Manage incoming mail filters'; $labels['filtername'] = 'Filter name'; diff --git a/plugins/markasjunk/localization/en_US.inc b/plugins/markasjunk/localization/en_US.inc index c1f56ad1d..0cc212f22 100644 --- a/plugins/markasjunk/localization/en_US.inc +++ b/plugins/markasjunk/localization/en_US.inc @@ -1,5 +1,21 @@ .inc | + | | + | Localization file of the Roundcube Webmail Mark-As-Junk plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-markasjunk/ +*/ + $labels = array(); $labels['buttontext'] = 'Junk'; $labels['buttontitle'] = 'Mark as Junk'; diff --git a/plugins/new_user_dialog/localization/en_US.inc b/plugins/new_user_dialog/localization/en_US.inc index d9f531ba7..a9e66bd23 100644 --- a/plugins/new_user_dialog/localization/en_US.inc +++ b/plugins/new_user_dialog/localization/en_US.inc @@ -1,5 +1,21 @@ .inc | + | | + | Localization file of the Roundcube Webmail New User Dialog plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-new_user_dialog/ +*/ + $labels = array(); $labels['identitydialogtitle'] = 'Please complete your sender identity'; $labels['identitydialoghint'] = 'This box only appears once at the first login.'; diff --git a/plugins/newmail_notifier/localization/en_US.inc b/plugins/newmail_notifier/localization/en_US.inc index 3017c43dc..da8340b80 100644 --- a/plugins/newmail_notifier/localization/en_US.inc +++ b/plugins/newmail_notifier/localization/en_US.inc @@ -1,5 +1,21 @@ .inc | + | | + | Localization file of the Roundcube Webmail New Mail Notifier plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/ +*/ + $labels['basic'] = 'Display browser notifications on new message'; $labels['desktop'] = 'Display desktop notifications on new message'; $labels['sound'] = 'Play the sound on new message'; diff --git a/plugins/password/localization/en_US.inc b/plugins/password/localization/en_US.inc index 1ae2158b0..dd57c1318 100644 --- a/plugins/password/localization/en_US.inc +++ b/plugins/password/localization/en_US.inc @@ -1,5 +1,21 @@ .inc | + | | + | Localization file of the Roundcube Webmail Password plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-password/ +*/ + $labels = array(); $labels['changepasswd'] = 'Change Password'; $labels['curpasswd'] = 'Current Password:'; diff --git a/plugins/subscriptions_option/localization/en_US.inc b/plugins/subscriptions_option/localization/en_US.inc index 5a348e0ee..19e1b26c7 100644 --- a/plugins/subscriptions_option/localization/en_US.inc +++ b/plugins/subscriptions_option/localization/en_US.inc @@ -1,5 +1,21 @@ .inc | + | | + | Localization file of the Roundcube Webmail Subscriptions plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-subscriptions_option/ +*/ + $labels = array(); $labels['useimapsubscriptions'] = 'Use IMAP Subscriptions'; diff --git a/plugins/userinfo/localization/en_US.inc b/plugins/userinfo/localization/en_US.inc index 1a2fd9016..b269dd560 100644 --- a/plugins/userinfo/localization/en_US.inc +++ b/plugins/userinfo/localization/en_US.inc @@ -1,5 +1,21 @@ .inc | + | | + | Localization file of the Roundcube Webmail Userinfo plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-userinfo/ +*/ + $labels = array(); $labels['userinfo'] = 'User info'; $labels['created'] = 'Created'; diff --git a/plugins/vcard_attachments/localization/en_US.inc b/plugins/vcard_attachments/localization/en_US.inc index bce44d739..02eed29ea 100644 --- a/plugins/vcard_attachments/localization/en_US.inc +++ b/plugins/vcard_attachments/localization/en_US.inc @@ -1,5 +1,21 @@ .inc | + | | + | Localization file of the Roundcube Webmail Vcard Attachments plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-vcard_attachments/ +*/ + $labels = array(); $labels['addvcardmsg'] = 'Add vCard to addressbook'; $labels['vcardsavefailed'] = 'Unable to save vCard'; diff --git a/plugins/zipdownload/localization/en_US.inc b/plugins/zipdownload/localization/en_US.inc index 0db6f8f8c..8823d3b8d 100644 --- a/plugins/zipdownload/localization/en_US.inc +++ b/plugins/zipdownload/localization/en_US.inc @@ -1,10 +1,23 @@ .inc | + | | + | Localization file of the Roundcube Webmail Zipdownload plugin | + | Copyright (C) 2012, The Roundcube Dev Team | + | | + | Licensed under the GNU General Public License version 3 or | + | any later version with exceptions for skins & plugins. | + | See the README file for a full license statement. | + | | + +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-zipdownload/ +*/ $labels = array(); $labels['downloadall'] = 'Download all attachments'; $labels['downloadfolder'] = 'Download folder'; -$messages = array(); - ?> \ No newline at end of file diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 1886837c0..d2a46ecc6 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -12,6 +12,8 @@ | See the README file for a full license statement. | | | +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/labels/ */ $labels = array(); diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc index 86fd170c7..f3d22e4ec 100644 --- a/program/localization/en_US/messages.inc +++ b/program/localization/en_US/messages.inc @@ -12,6 +12,8 @@ | See the README file for a full license statement. | | | +-----------------------------------------------------------------------+ + + For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/messages/ */ $messages = array(); -- cgit v1.2.3 From 347ba311e68f3a641805a268313fcd5ed851feb7 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 1 Jan 2013 10:54:57 +0100 Subject: Add possibility to search in message body only (#1488770) --- CHANGELOG | 1 + program/localization/en_US/labels.inc | 1 + program/steps/mail/search.inc | 7 ++++--- skins/classic/templates/mail.html | 1 + skins/larry/templates/mail.html | 1 + 5 files changed, 8 insertions(+), 3 deletions(-) (limited to 'program/localization/en_US') diff --git a/CHANGELOG b/CHANGELOG index 5a594c07e..d3ebabc3e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Add possibility to search in message body only (#1488770) - Support "multipart/relative" as an alias for "multipart/related" type (#1488886) - Display PGP/MIME signature attachments as "Digital Signature" (#1488570) - Workaround UW-IMAP bug where hierarchy separator is added to the shared folder name (#1488879) diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index d2a46ecc6..9deaa6677 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -200,6 +200,7 @@ $labels['quicksearch'] = 'Quick search'; $labels['resetsearch'] = 'Reset search'; $labels['searchmod'] = 'Search modifiers'; $labels['msgtext'] = 'Entire message'; +$labels['body'] = 'Body'; $labels['openinextwin'] = 'Open in new window'; $labels['emlsave'] = 'Download (.eml)'; diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc index f9b8f9e67..fb1b48797 100644 --- a/program/steps/mail/search.inc +++ b/program/steps/mail/search.inc @@ -69,7 +69,7 @@ else if (preg_match("/^subject:.*/i", $str)) else if (preg_match("/^body:.*/i", $str)) { list(,$srch) = explode(":", $str); - $subject['text'] = "TEXT"; + $subject['body'] = "BODY"; } else if (strlen(trim($str))) { @@ -81,7 +81,7 @@ else if (strlen(trim($str))) break; } else { - $subject[$header] = 'HEADER '.strtoupper($header); + $subject[$header] = ($header != 'body' ? 'HEADER ' : '') . strtoupper($header); } } @@ -89,7 +89,8 @@ else if (strlen(trim($str))) $search_mods = $RCMAIL->config->get('search_mods', $SEARCH_MODS_DEFAULT); $search_mods[$mbox] = array_fill_keys(array_keys($subject), 1); $RCMAIL->user->save_prefs(array('search_mods' => $search_mods)); - } else { + } + else { // search in subject by default $subject['subject'] = 'HEADER SUBJECT'; } diff --git a/skins/classic/templates/mail.html b/skins/classic/templates/mail.html index 96fe72ecd..ad67d8e89 100644 --- a/skins/classic/templates/mail.html +++ b/skins/classic/templates/mail.html @@ -115,6 +115,7 @@
  • +
  • diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html index 751ab82a4..cd817c1de 100644 --- a/skins/larry/templates/mail.html +++ b/skins/larry/templates/mail.html @@ -133,6 +133,7 @@
  • +
  • -- cgit v1.2.3 From 9a6c38e14895bd093627e12f2fcf2c6ff1e3af3c Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Fri, 11 Jan 2013 14:39:23 +0100 Subject: New feature to export only selected contacts from addressbook (by Phil Weir) --- CHANGELOG | 1 + program/js/app.js | 8 ++++++++ program/localization/en_US/labels.inc | 2 ++ program/steps/addressbook/export.inc | 23 +++++++++++++++++++++++ skins/classic/addressbook.css | 8 ++++++++ skins/classic/templates/addressbook.html | 10 ++++++++++ skins/larry/styles.css | 2 +- skins/larry/templates/addressbook.html | 12 +++++++++++- 8 files changed, 64 insertions(+), 2 deletions(-) (limited to 'program/localization/en_US') diff --git a/CHANGELOG b/CHANGELOG index 25d79d1e2..ecc45c220 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Feature to export only selected contacts from addressbook (by Phil Weir) - Force autocommit mode in mysql database driver (#1488902) RELEASE 0.9-beta diff --git a/program/js/app.js b/program/js/app.js index c627983f4..2804e88df 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1090,6 +1090,12 @@ function rcube_webmail() } break; + case 'export-selected': + if (this.contact_list.rowcount > 0) { + this.goto_url('export', { _source: this.env.source, _gid: this.env.group, _cid: this.contact_list.get_selection().join(',') }); + } + break; + case 'upload-photo': this.upload_contact_photo(props || this.gui_objects.uploadform); break; @@ -4115,6 +4121,7 @@ function rcube_webmail() // thend we can enable the group-remove-selected command this.enable_command('group-remove-selected', this.env.group && list.selection.length > 0); this.enable_command('compose', this.env.group || list.selection.length > 0); + this.enable_command('export-selected', list.selection.length > 0); this.enable_command('edit', id && writable); this.enable_command('delete', list.selection.length && writable); @@ -6238,6 +6245,7 @@ function rcube_webmail() this.enable_command('compose', (uid && this.contact_list.rows[uid])); this.enable_command('delete', 'edit', writable); this.enable_command('export', (this.contact_list && this.contact_list.rowcount > 0)); + this.enable_command('export-selected', false); } case 'moveto': diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 9deaa6677..a0b6e6a31 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -335,6 +335,8 @@ $labels['composeto'] = 'Compose mail to'; $labels['contactsfromto'] = 'Contacts $from to $to of $count'; $labels['print'] = 'Print'; $labels['export'] = 'Export'; +$labels['exportall'] = 'Export all'; +$labels['exportsel'] = 'Export selected'; $labels['exportvcards'] = 'Export contacts in vCard format'; $labels['newcontactgroup'] = 'Create new contact group'; $labels['grouprename'] = 'Rename group'; diff --git a/program/steps/addressbook/export.inc b/program/steps/addressbook/export.inc index 850795c85..bf0657b74 100644 --- a/program/steps/addressbook/export.inc +++ b/program/steps/addressbook/export.inc @@ -56,6 +56,29 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search $result = new rcube_result_set($count); $result->records = array_values($records); } +// selected contacts +else if (!empty($_REQUEST['_cid'])) { + $sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name'); + $records = array(); + + $cids = explode(',', get_input_value('_cid', RCUBE_INPUT_GET)); + $CONTACTS = rcmail_contact_source(null, true); + + // Get records from all sources + foreach ($cids as $cid) { + $record = $CONTACTS->get_record($cid, true); + $key = rcmail_contact_key($record, $sort_col); + $records[$key] = $record; + unset($record); + } + + ksort($records, SORT_LOCALE_STRING); + + // create resultset object + $count = count($records); + $result = new rcube_result_set($count); + $result->records = array_values($records); +} // selected directory/group else { $CONTACTS = rcmail_contact_source(null, true); diff --git a/skins/classic/addressbook.css b/skins/classic/addressbook.css index a398325b4..1bb1e2c61 100644 --- a/skins/classic/addressbook.css +++ b/skins/classic/addressbook.css @@ -67,6 +67,14 @@ background-position: -128px -32px; } +#abooktoolbar a.exportAll { + background-position: -128px 0; +} + +#abooktoolbar a.exportAllSel { + background-position: -128px -32px; +} + #abooktoolbar span.separator { width: 5px; background-position: -162px 0; diff --git a/skins/classic/templates/addressbook.html b/skins/classic/templates/addressbook.html index 74673007a..404fb2c11 100644 --- a/skins/classic/templates/addressbook.html +++ b/skins/classic/templates/addressbook.html @@ -27,7 +27,10 @@   + + + @@ -38,6 +41,13 @@ +
    +
      +
    • +
    • +
    +
    +
    • diff --git a/skins/larry/styles.css b/skins/larry/styles.css index 9386c79d7..773ef23d4 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -1680,6 +1680,7 @@ ul.proplist li { } .toolbar a.button.export { + min-width: 74px; background-position: center -1054px; } @@ -1695,7 +1696,6 @@ ul.proplist li { background-position: 0 -1745px; } - a.menuselector { display: inline-block; border: 1px solid #ababab; diff --git a/skins/larry/templates/addressbook.html b/skins/larry/templates/addressbook.html index 9a9a2d747..7904f6f3a 100644 --- a/skins/larry/templates/addressbook.html +++ b/skins/larry/templates/addressbook.html @@ -13,7 +13,11 @@
      - + + + + + @@ -75,6 +79,12 @@
      +
      +
        +
      • +
      • +
      +
        -- cgit v1.2.3 From 8e50ae9a6f8d969c5569bcf2ce0040d76dc39011 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Sun, 10 Feb 2013 15:42:48 +0100 Subject: Extend copyright to 2013 --- plugins/acl/localization/en_US.inc | 2 +- plugins/help/localization/en_US.inc | 4 ++-- plugins/hide_blockquote/localization/en_US.inc | 4 ++-- plugins/managesieve/localization/en_US.inc | 4 ++-- plugins/markasjunk/localization/en_US.inc | 4 ++-- plugins/new_user_dialog/localization/en_US.inc | 4 ++-- plugins/newmail_notifier/localization/en_US.inc | 2 +- plugins/password/localization/en_US.inc | 2 +- plugins/subscriptions_option/localization/en_US.inc | 2 +- plugins/userinfo/localization/en_US.inc | 2 +- plugins/vcard_attachments/localization/en_US.inc | 2 +- plugins/zipdownload/localization/en_US.inc | 2 +- program/localization/en_US/csv2vcard.inc | 2 +- program/localization/en_US/labels.inc | 2 +- program/localization/en_US/messages.inc | 2 +- 15 files changed, 20 insertions(+), 20 deletions(-) (limited to 'program/localization/en_US') diff --git a/plugins/acl/localization/en_US.inc b/plugins/acl/localization/en_US.inc index 8eebdc60c..033ac29b2 100644 --- a/plugins/acl/localization/en_US.inc +++ b/plugins/acl/localization/en_US.inc @@ -5,7 +5,7 @@ | plugins/acl/localization/.inc | | | | Localization file of the Roundcube Webmail ACL plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/plugins/help/localization/en_US.inc b/plugins/help/localization/en_US.inc index cf6c0aaaf..b81f02fb9 100644 --- a/plugins/help/localization/en_US.inc +++ b/plugins/help/localization/en_US.inc @@ -2,10 +2,10 @@ /* +-----------------------------------------------------------------------+ - | plugins/help/localization/.inc | + | plugins/help/localization/.inc | | | | Localization file of the Roundcube Webmail Help plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/plugins/hide_blockquote/localization/en_US.inc b/plugins/hide_blockquote/localization/en_US.inc index c3a5ca019..90dd28955 100644 --- a/plugins/hide_blockquote/localization/en_US.inc +++ b/plugins/hide_blockquote/localization/en_US.inc @@ -2,10 +2,10 @@ /* +-----------------------------------------------------------------------+ - | plugins/hide_blockquote/localization/.inc | + | plugins/hide_blockquote/localization/.inc | | | | Localization file of the Roundcube Webmail Hide-Blockquote plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/plugins/managesieve/localization/en_US.inc b/plugins/managesieve/localization/en_US.inc index 2b23af6db..97c20aa76 100644 --- a/plugins/managesieve/localization/en_US.inc +++ b/plugins/managesieve/localization/en_US.inc @@ -2,10 +2,10 @@ /* +-----------------------------------------------------------------------+ - | plugins/managesieve/localization/.inc | + | plugins/managesieve/localization/.inc | | | | Localization file of the Roundcube Webmail Managesieve plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/plugins/markasjunk/localization/en_US.inc b/plugins/markasjunk/localization/en_US.inc index 0cc212f22..aaa3c91ac 100644 --- a/plugins/markasjunk/localization/en_US.inc +++ b/plugins/markasjunk/localization/en_US.inc @@ -2,10 +2,10 @@ /* +-----------------------------------------------------------------------+ - | plugins/markasjunk/localization/.inc | + | plugins/markasjunk/localization/.inc | | | | Localization file of the Roundcube Webmail Mark-As-Junk plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/plugins/new_user_dialog/localization/en_US.inc b/plugins/new_user_dialog/localization/en_US.inc index a9e66bd23..d508cfc9c 100644 --- a/plugins/new_user_dialog/localization/en_US.inc +++ b/plugins/new_user_dialog/localization/en_US.inc @@ -2,10 +2,10 @@ /* +-----------------------------------------------------------------------+ - | plugins/new_user_dialog/localization/.inc | + | plugins/new_user_dialog/localization/.inc | | | | Localization file of the Roundcube Webmail New User Dialog plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/plugins/newmail_notifier/localization/en_US.inc b/plugins/newmail_notifier/localization/en_US.inc index da8340b80..7c1c5cf3f 100644 --- a/plugins/newmail_notifier/localization/en_US.inc +++ b/plugins/newmail_notifier/localization/en_US.inc @@ -5,7 +5,7 @@ | plugins/newmail_notifier/localization/.inc | | | | Localization file of the Roundcube Webmail New Mail Notifier plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/plugins/password/localization/en_US.inc b/plugins/password/localization/en_US.inc index dd57c1318..a4c077fe5 100644 --- a/plugins/password/localization/en_US.inc +++ b/plugins/password/localization/en_US.inc @@ -5,7 +5,7 @@ | plugins/password/localization/.inc | | | | Localization file of the Roundcube Webmail Password plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/plugins/subscriptions_option/localization/en_US.inc b/plugins/subscriptions_option/localization/en_US.inc index 19e1b26c7..3eb18fc1d 100644 --- a/plugins/subscriptions_option/localization/en_US.inc +++ b/plugins/subscriptions_option/localization/en_US.inc @@ -5,7 +5,7 @@ | plugins/subscriptions_option/localization/.inc | | | | Localization file of the Roundcube Webmail Subscriptions plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/plugins/userinfo/localization/en_US.inc b/plugins/userinfo/localization/en_US.inc index b269dd560..01230de85 100644 --- a/plugins/userinfo/localization/en_US.inc +++ b/plugins/userinfo/localization/en_US.inc @@ -5,7 +5,7 @@ | plugins/userinfo/localization/.inc | | | | Localization file of the Roundcube Webmail Userinfo plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/plugins/vcard_attachments/localization/en_US.inc b/plugins/vcard_attachments/localization/en_US.inc index 02eed29ea..a52a93228 100644 --- a/plugins/vcard_attachments/localization/en_US.inc +++ b/plugins/vcard_attachments/localization/en_US.inc @@ -5,7 +5,7 @@ | plugins/vcard_attachments/localization/.inc | | | | Localization file of the Roundcube Webmail Vcard Attachments plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/plugins/zipdownload/localization/en_US.inc b/plugins/zipdownload/localization/en_US.inc index 8823d3b8d..aee8a5e15 100644 --- a/plugins/zipdownload/localization/en_US.inc +++ b/plugins/zipdownload/localization/en_US.inc @@ -5,7 +5,7 @@ | plugins/zipdownload/localization/.inc | | | | Localization file of the Roundcube Webmail Zipdownload plugin | - | Copyright (C) 2012, The Roundcube Dev Team | + | Copyright (C) 2012-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/localization/en_US/csv2vcard.inc b/program/localization/en_US/csv2vcard.inc index eb884f59a..5412f7e20 100644 --- a/program/localization/en_US/csv2vcard.inc +++ b/program/localization/en_US/csv2vcard.inc @@ -5,7 +5,7 @@ | localization//csv2vcard.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | Copyright (C) 2005-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index a0b6e6a31..0750e7848 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -5,7 +5,7 @@ | localization//labels.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | Copyright (C) 2005-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc index f3d22e4ec..8502fa151 100644 --- a/program/localization/en_US/messages.inc +++ b/program/localization/en_US/messages.inc @@ -5,7 +5,7 @@ | localization//messages.inc | | | | Localization file of the Roundcube Webmail client | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | Copyright (C) 2005-2013, The Roundcube Dev Team | | | | Licensed under the GNU General Public License version 3 or | | any later version with exceptions for skins & plugins. | -- cgit v1.2.3 From 0bf724ef1f6a980479d7d6dfc6af62aa421a2888 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 2 Mar 2013 19:54:11 +0100 Subject: Display user-friendly message on IMAP "over quota" errors (#1484164) --- CHANGELOG | 1 + program/include/rcmail.php | 7 +++++++ program/localization/en_US/messages.inc | 1 + 3 files changed, 9 insertions(+) (limited to 'program/localization/en_US') diff --git a/CHANGELOG b/CHANGELOG index 546d060ef..a45a24758 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Display user-friendly message on IMAP "over quota" errors (#1484164) - Display notice that message is encrypted also for application/pkcs7-mime messages (#1488526) - Extended archive plugin with user-configurable options to store messages into subfolders - Fix export of selected contacts from search result (#1488905) diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 70dba4192..667be14bc 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -1810,11 +1810,18 @@ class rcmail extends rcube else if ($res_code == rcube_storage::READONLY) { $this->output->show_message('errorreadonly', 'error'); } + else if ($res_code == rcube_storage::OVERQUOTA) { + $this->output->show_message('errorroverquota', 'error'); + } else if ($err_code && ($err_str = $this->storage->get_error_str())) { // try to detect access rights problem and display appropriate message if (stripos($err_str, 'Permission denied') !== false) { $this->output->show_message('errornoperm', 'error'); } + // try to detect full mailbox problem and display appropriate message + else if (stripos($err_str, 'Quota exceeded') !== false) { + $this->output->show_message('erroroverquota', 'error'); + } else { $this->output->show_message('servererrormsg', 'error', array('msg' => $err_str)); } diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc index 8502fa151..9262db8b2 100644 --- a/program/localization/en_US/messages.inc +++ b/program/localization/en_US/messages.inc @@ -28,6 +28,7 @@ $messages['dberror'] = 'Database Error!'; $messages['requesttimedout'] = 'Request timed out'; $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.'; $messages['errornoperm'] = 'Unable to perform operation. Permission denied.'; +$messages['erroroverquota'] = 'Unable to perform operation. No available disk space.'; $messages['invalidrequest'] = 'Invalid request! No data was saved.'; $messages['invalidhost'] = 'Invalid server name.'; $messages['nomessagesfound'] = 'No messages found in this mailbox.'; -- cgit v1.2.3 From e7c1aad83208b343634a1b857b53474c97a74f61 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sat, 2 Mar 2013 20:29:20 +0100 Subject: Even better message on over quota error in move to trash operation (#1484164) --- program/include/bc.php | 4 ++-- program/include/rcmail.php | 29 ++++++++++++++++++++--------- program/localization/en_US/messages.inc | 3 ++- program/steps/mail/move_del.inc | 9 +++++---- 4 files changed, 29 insertions(+), 16 deletions(-) (limited to 'program/localization/en_US') diff --git a/program/include/bc.php b/program/include/bc.php index 3d9d46289..d8356338d 100644 --- a/program/include/bc.php +++ b/program/include/bc.php @@ -205,9 +205,9 @@ function rcmail_quota_content($attrib = null) return rcmail::get_instance()->quota_content($attrib); } -function rcmail_display_server_error($fallback=null, $fallback_args=null) +function rcmail_display_server_error($fallback=null, $fallback_args=null, $suffix='') { - rcmail::get_instance()->display_server_error($fallback, $fallback_args); + rcmail::get_instance()->display_server_error($fallback, $fallback_args, $suffix); } function rcmail_filetype2classname($mimetype, $filename) diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 667be14bc..30d1fe84c 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -1798,39 +1798,50 @@ class rcmail extends rcube * * @param string $fallback Fallback message label * @param array $fallback_args Fallback message label arguments + * @param string $suffix Message label suffix */ - public function display_server_error($fallback = null, $fallback_args = null) + public function display_server_error($fallback = null, $fallback_args = null, $suffix = '') { $err_code = $this->storage->get_error_code(); $res_code = $this->storage->get_response_code(); + $args = array(); if ($res_code == rcube_storage::NOPERM) { - $this->output->show_message('errornoperm', 'error'); + $error = 'errornoperm'; } else if ($res_code == rcube_storage::READONLY) { - $this->output->show_message('errorreadonly', 'error'); + $error = 'errorreadonly'; } else if ($res_code == rcube_storage::OVERQUOTA) { - $this->output->show_message('errorroverquota', 'error'); + $error = 'errorroverquota'; } else if ($err_code && ($err_str = $this->storage->get_error_str())) { // try to detect access rights problem and display appropriate message if (stripos($err_str, 'Permission denied') !== false) { - $this->output->show_message('errornoperm', 'error'); + $error = 'errornoperm'; } // try to detect full mailbox problem and display appropriate message else if (stripos($err_str, 'Quota exceeded') !== false) { - $this->output->show_message('erroroverquota', 'error'); + $error = 'erroroverquota'; } else { - $this->output->show_message('servererrormsg', 'error', array('msg' => $err_str)); + $error = 'servererrormsg'; + $args = array('msg' => $err_str); } } else if ($err_code < 0) { - $this->output->show_message('storageerror', 'error'); + $error = 'storageerror'; } else if ($fallback) { - $this->output->show_message($fallback, 'error', $fallback_args); + $error = $fallback; + $args = $fallback_args; + } + + if ($error) { + if ($suffix && $this->text_exists($error . $suffix)) { + $error .= $suffix; + } + $this->output->show_message($error, 'error', $args); } } diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc index 9262db8b2..f9b5e00a6 100644 --- a/program/localization/en_US/messages.inc +++ b/program/localization/en_US/messages.inc @@ -28,7 +28,8 @@ $messages['dberror'] = 'Database Error!'; $messages['requesttimedout'] = 'Request timed out'; $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.'; $messages['errornoperm'] = 'Unable to perform operation. Permission denied.'; -$messages['erroroverquota'] = 'Unable to perform operation. No available disk space.'; +$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.'; +$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.'; $messages['invalidrequest'] = 'Invalid request! No data was saved.'; $messages['invalidhost'] = 'Invalid server name.'; $messages['nomessagesfound'] = 'No messages found in this mailbox.'; diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc index 3e2252683..3fc6ac5a7 100644 --- a/program/steps/mail/move_del.inc +++ b/program/steps/mail/move_del.inc @@ -29,10 +29,11 @@ $old_count = $RCMAIL->storage->count(NULL, $threading ? 'THREADS' : 'ALL'); $old_pages = ceil($old_count / $RCMAIL->storage->get_pagesize()); // move messages -if ($RCMAIL->action=='moveto' && !empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) { - $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST)))); +if ($RCMAIL->action == 'moveto' && !empty($_POST['_uid']) && strlen($_POST['_target_mbox'])) { + $count = sizeof(explode(',', ($uids = get_input_value('_uid', RCUBE_INPUT_POST)))); $target = get_input_value('_target_mbox', RCUBE_INPUT_POST, true); - $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true); + $mbox = get_input_value('_mbox', RCUBE_INPUT_POST, true); + $trash = $RCMAIL->config->get('trash_mbox'); $moved = $RCMAIL->storage->move_message($uids, $target, $mbox); @@ -40,7 +41,7 @@ if ($RCMAIL->action=='moveto' && !empty($_POST['_uid']) && strlen($_POST['_targe // send error message if ($_POST['_from'] != 'show') $OUTPUT->command('list_mailbox'); - rcmail_display_server_error('errormoving'); + rcmail_display_server_error('errormoving', null, $target == $trash ? 'delete' : ''); $OUTPUT->send(); exit; } -- cgit v1.2.3 From bc2c4380b5b754a3b13cc7d6663b2b81d2577e2e Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 6 Mar 2013 11:11:37 +0100 Subject: Add attachment menu with Open and Download options (#1488975) --- CHANGELOG | 1 + program/include/rcmail_output_html.php | 4 +++ program/js/app.js | 21 +++++++---- program/localization/en_US/labels.inc | 1 + program/steps/mail/show.inc | 23 ++++++------ skins/classic/functions.js | 53 +++++++++++++++++++++++----- skins/classic/mail.css | 20 +++++++++-- skins/classic/templates/message.html | 8 +++++ skins/classic/templates/messagepreview.html | 12 ++++++- skins/larry/images/buttons.gif | Bin 13054 -> 14997 bytes skins/larry/images/buttons.png | Bin 36693 -> 48308 bytes skins/larry/mail.css | 2 +- skins/larry/styles.css | 13 ++++++- skins/larry/templates/message.html | 8 +++++ skins/larry/templates/messagepreview.html | 8 +++++ skins/larry/ui.js | 42 +++++++++++++++++++--- 16 files changed, 181 insertions(+), 35 deletions(-) (limited to 'program/localization/en_US') diff --git a/CHANGELOG b/CHANGELOG index c5d8c7687..fa5fb8e24 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Add attachment menu with Open and Download options (#1488975) - Fix thumbnail size when GD extension is used for image resize (#1488985) - Display user-friendly message on IMAP "over quota" errors (#1484164) - Display notice that message is encrypted also for application/pkcs7-mime messages (#1488526) diff --git a/program/include/rcmail_output_html.php b/program/include/rcmail_output_html.php index 2babe1cbb..ade2bd4a4 100644 --- a/program/include/rcmail_output_html.php +++ b/program/include/rcmail_output_html.php @@ -1175,6 +1175,10 @@ class rcmail_output_html extends rcmail_output $out = sprintf('%s', $attrib_str, $btn_content); } + if ($attrib['wrapper']) { + $out = html::tag($attrib['wrapper'], null, $out); + } + return $out; } diff --git a/program/js/app.js b/program/js/app.js index 4011fa593..55c71d776 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -179,7 +179,8 @@ function rcube_webmail() } // enable general commands - this.enable_command('close', 'logout', 'mail', 'addressbook', 'settings', 'save-pref', 'compose', 'undo', 'about', 'switch-task', true); + this.enable_command('close', 'logout', 'mail', 'addressbook', 'settings', 'save-pref', + 'compose', 'undo', 'about', 'switch-task', 'menu-open', 'menu-save', true); if (this.env.permaurl) this.enable_command('permaurl', 'extwin', true); @@ -211,7 +212,7 @@ function rcube_webmail() this.gui_objects.messagelist.parentNode.onmousedown = function(e){ return p.click_on_list(e); }; this.message_list.init(); - this.enable_command('toggle_status', 'toggle_flag', 'menu-open', 'menu-save', 'sort', true); + this.enable_command('toggle_status', 'toggle_flag', 'sort', true); // load messages this.command('list'); @@ -227,7 +228,7 @@ function rcube_webmail() this.env.message_commands = ['show', 'reply', 'reply-all', 'reply-list', 'moveto', 'copy', 'delete', 'open', 'mark', 'edit', 'viewsource', - 'print', 'load-attachment', 'show-headers', 'hide-headers', 'download', + 'print', 'load-attachment', 'download-attachment', 'show-headers', 'hide-headers', 'download', 'forward', 'forward-inline', 'forward-attachment']; if (this.env.action == 'show' || this.env.action == 'preview') { @@ -608,6 +609,11 @@ function rcube_webmail() break; case 'menu-open': + if (props && props.menu == 'attachmentmenu') { + var mimetype = this.env.attachments[props.id]; + this.enable_command('open-attachment', mimetype && this.env.mimetypes && $.inArray(mimetype, this.env.mimetypes) >= 0); + } + case 'menu-save': this.triggerEvent(command, {props:props}); return false; @@ -833,11 +839,14 @@ function rcube_webmail() break; case 'load-attachment': - var qstring = '_mbox='+urlencode(this.env.mailbox)+'&_uid='+this.env.uid+'&_part='+props.part; + case 'open-attachment': + case 'download-attachment': + var qstring = '_mbox='+urlencode(this.env.mailbox)+'&_uid='+this.env.uid+'&_part='+props, + mimetype = this.env.attachments[props]; // open attachment in frame if it's of a supported mimetype - if (this.env.uid && props.mimetype && this.env.mimetypes && $.inArray(props.mimetype, this.env.mimetypes) >= 0) { - var attachment_win = window.open(this.env.comm_path+'&_action=get&'+qstring+'&_frame=1', 'rcubemailattachment'+this.env.uid+props.part); + if (command != 'download-attachment' && mimetype && this.env.mimetypes && $.inArray(mimetype, this.env.mimetypes) >= 0) { + var attachment_win = window.open(this.env.comm_path+'&_action=get&'+qstring+'&_frame=1', 'rcubemailattachment'+this.env.uid+props); if (attachment_win) { setTimeout(function(){ attachment_win.focus(); }, 10); break; diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 0750e7848..61a13e9ab 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -64,6 +64,7 @@ $labels['copy'] = 'Copy'; $labels['move'] = 'Move'; $labels['moveto'] = 'Move to...'; $labels['download'] = 'Download'; +$labels['open'] = 'Open'; $labels['showattachment'] = 'Show'; $labels['showanyway'] = 'Show it anyway'; diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index 437dbaafa..87555cbbe 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -147,6 +147,7 @@ function rcmail_message_attachments($attrib) global $PRINT_MODE, $MESSAGE, $RCMAIL; $out = $ol = ''; + $attachments = array(); if (sizeof($MESSAGE->attachments)) { foreach ($MESSAGE->attachments as $attach_prop) { @@ -165,21 +166,23 @@ function rcmail_message_attachments($attrib) $title = ''; } - $ol .= html::tag('li', rcmail_filetype2classname($attach_prop->mimetype, $filename), - html::a(array( + $mimetype = rcmail_fix_mimetype($attach_prop->mimetype); + $class = rcmail_filetype2classname($mimetype, $filename); + $id = 'attach' . $attach_prop->mime_id; + $link = html::a(array( 'href' => $MESSAGE->get_part_url($attach_prop->mime_id, false), - 'onclick' => sprintf( - 'return %s.command(\'load-attachment\',{part:\'%s\', mimetype:\'%s\'},this)', - JS_OBJECT_NAME, - $attach_prop->mime_id, - rcmail_fix_mimetype($attach_prop->mimetype)), - 'title' => Q($title), - ), - Q($filename))); + 'onclick' => sprintf('return %s.command(\'load-attachment\',\'%s\',this)', + JS_OBJECT_NAME, $attach_prop->mime_id), + 'title' => Q($title), + ), Q($filename)); + $ol .= html::tag('li', array('class' => $class, 'id' => $id), $link); + + $attachments[$attach_prop->mime_id] = $mimetype; } } $out = html::tag('ul', $attrib, $ol, html::$common_attrib); + $RCMAIL->output->set_env('attachments', $attachments); } return $out; diff --git a/skins/classic/functions.js b/skins/classic/functions.js index c59ea9bf8..499783b3f 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -92,6 +92,7 @@ function rcube_mail_ui() forwardmenu: {id:'forwardmenu', editable:1}, searchmenu: {id:'searchmenu', editable:1}, messagemenu: {id:'messagemenu'}, + attachmentmenu: {id:'attachmentmenu'}, listmenu: {id:'listmenu', editable:1}, dragmessagemenu:{id:'dragmessagemenu', sticky:1}, groupmenu: {id:'groupoptionsmenu', above:1}, @@ -133,24 +134,24 @@ show_popupmenu: function(popup, show) { var obj = this.popups[popup].obj, above = this.popups[popup].above, - ref = rcube_find_object(popup+'link'); + ref = $(this.popups[popup].link ? this.popups[popup].link : rcube_find_object(popup+'link')); if (typeof show == 'undefined') show = obj.is(':visible') ? false : true; else if (this.popups[popup].toggle && show && this.popups[popup].obj.is(':visible') ) show = false; - if (show && ref) { - var parent = $(ref).parent(), + if (show && ref.length) { + var parent = ref.parent(), win = $(window), - pos = parent.hasClass('dropbutton') ? parent.offset() : $(ref).offset(); + pos = parent.hasClass('dropbutton') ? parent.offset() : ref.offset(); - if (!above && pos.top + ref.offsetHeight + obj.height() > win.height()) + if (!above && pos.top + ref.height() + obj.height() > win.height()) above = true; if (pos.left + obj.width() > win.width()) pos.left = win.width() - obj.width() - 30; - obj.css({ left:pos.left, top:(pos.top + (above ? -obj.height() : ref.offsetHeight)) }); + obj.css({ left:pos.left, top:(pos.top + (above ? -obj.height() : ref.height())) }); } obj[show?'show':'hide'](); @@ -325,7 +326,7 @@ listmenu: function(show) }; }, -open_listmenu: function(e) +open_listmenu: function() { this.listmenu(); }, @@ -380,6 +381,35 @@ spellmenu: function(show) this.show_popupmenu('spellmenu', show); }, +show_attachmentmenu: function(elem) +{ + var id = elem.parentNode.id.replace(/^attach/, ''); + + $('#attachmenuopen').unbind('click').attr('onclick', '').click(function(e) { + return rcmail.command('open-attachment', id, this); + }); + + $('#attachmenudownload').unbind('click').attr('onclick', '').click(function() { + rcmail.command('download-attachment', id, this); + }); + + this.popups.attachmentmenu.link = elem; + rcmail.command('menu-open', {menu: 'attachmentmenu', id: id}); +}, + +menu_open: function(p) +{ + if (p && p.props && p.props.menu == 'attachmentmenu') + this.show_popup('attachmentmenu'); + else + this.open_listmenu(); +}, + +menu_save: function(prop) +{ + this.save_listmenu(); +}, + body_mouseup: function(evt, p) { var i, target = rcube_event.get_target(evt); @@ -800,8 +830,8 @@ function rcube_init_mail_ui() .contents().mouseup(function(e){rcmail_ui.body_mouseup(e)}); if (rcmail.env.task == 'mail') { - rcmail.addEventListener('menu-open', 'open_listmenu', rcmail_ui); - rcmail.addEventListener('menu-save', 'save_listmenu', rcmail_ui); + rcmail.addEventListener('menu-open', 'menu_open', rcmail_ui); + rcmail.addEventListener('menu-save', 'menu_save', rcmail_ui); rcmail.addEventListener('aftersend-attachment', 'uploadmenu', rcmail_ui); rcmail.addEventListener('aftertoggle-editor', 'resize_compose_body_ev', rcmail_ui); rcmail.gui_object('message_dragmenu', 'dragmessagemenu'); @@ -817,6 +847,11 @@ function rcube_init_mail_ui() if (rcmail.env.action == 'compose') rcmail_ui.init_compose_form(); + else if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') + // add menu link for each attachment + $('#attachment-list > li[id^="attach"]').each(function() { + $(this).append($('').click(function() { rcmail_ui.show_attachmentmenu(this); })); + }); } else if (rcmail.env.task == 'addressbook') { rcmail.addEventListener('afterupload-photo', function(){ rcmail_ui.show_popup('uploadform', false); }); diff --git a/skins/classic/mail.css b/skins/classic/mail.css index 8be35aaa6..4d42d98ff 100644 --- a/skins/classic/mail.css +++ b/skins/classic/mail.css @@ -173,13 +173,15 @@ } #messagemenu li a.active:hover, +#attachmentmenu li a.active:hover, #markmessagemenu li a.active:hover { color: #fff; background-color: #c00; } -#messagemenu li a +#messagemenu li a, +#attachmentmenu li a { background: url(images/messageactions.png) no-repeat 7px 0; background-position: 7px 20px; @@ -190,7 +192,8 @@ background-position: 7px 1px; } -#messagemenu li a.downloadlink +#messagemenu li a.downloadlink, +#attachmentmenu li a.downloadlink { background-position: 7px -17px; } @@ -200,7 +203,8 @@ background-position: 7px -35px; } -#messagemenu li a.openlink +#messagemenu li a.openlink, +#attachmentmenu li a.openlink { background-position: 7px -53px; } @@ -1135,6 +1139,16 @@ table.headers-table tr td.header span text-decoration: underline; } +#attachment-list li a.drop { + background: url(images/icons/down_small.gif) no-repeat center 6px; + width: 12px; + height: 7px; + cursor: pointer; + padding: 5px 0 0; + margin-left: 3px; + display: inline-block; +} + #messagebody { position:relative; diff --git a/skins/classic/templates/message.html b/skins/classic/templates/message.html index d1594ea28..73dfcb976 100644 --- a/skins/classic/templates/message.html +++ b/skins/classic/templates/message.html @@ -65,5 +65,13 @@ +
        +
          +
        • +
        • + +
        +
        + diff --git a/skins/classic/templates/messagepreview.html b/skins/classic/templates/messagepreview.html index 78b2306f6..935238edf 100644 --- a/skins/classic/templates/messagepreview.html +++ b/skins/classic/templates/messagepreview.html @@ -3,8 +3,10 @@ <roundcube:object name="pagetitle" /> + + - +
        @@ -16,5 +18,13 @@ +
        +
          +
        • +
        • + +
        +
        + diff --git a/skins/larry/images/buttons.gif b/skins/larry/images/buttons.gif index d8a33d6b2..8a4a78ee4 100644 Binary files a/skins/larry/images/buttons.gif and b/skins/larry/images/buttons.gif differ diff --git a/skins/larry/images/buttons.png b/skins/larry/images/buttons.png index 4438d9cbc..0ec061a78 100644 Binary files a/skins/larry/images/buttons.png and b/skins/larry/images/buttons.png differ diff --git a/skins/larry/mail.css b/skins/larry/mail.css index c99370830..e6529d118 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -868,7 +868,7 @@ div.more-headers { } div.hide-headers { - background-position: center -1589px; + background-position: center -1600px; } #all-headers { diff --git a/skins/larry/styles.css b/skins/larry/styles.css index 044a09e05..1e3e6f7d5 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -2219,7 +2219,7 @@ ul.toolbarmenu li span.conversation { display: block; color: #333; font-weight: bold; - padding: 8px 4px 3px 30px; + padding: 8px 15px 3px 30px; text-shadow: 0px 1px 1px #fff; text-decoration: none; white-space: nowrap; @@ -2227,6 +2227,17 @@ ul.toolbarmenu li span.conversation { text-overflow: ellipsis; } +.attachmentslist li a.drop { + background: url(images/buttons.png) no-repeat scroll center -1570px; + width: 14px; + height: 26px; + cursor: pointer; + position: absolute; + right: 0; + top: 0; + padding: 0; +} + #compose-attachments ul li { padding-right: 28px; } diff --git a/skins/larry/templates/message.html b/skins/larry/templates/message.html index b4ceb6a6c..36e0efa0a 100644 --- a/skins/larry/templates/message.html +++ b/skins/larry/templates/message.html @@ -73,6 +73,14 @@
        + + diff --git a/skins/larry/templates/messagepreview.html b/skins/larry/templates/messagepreview.html index aef282ac9..dbfe2dc7b 100644 --- a/skins/larry/templates/messagepreview.html +++ b/skins/larry/templates/messagepreview.html @@ -51,6 +51,14 @@
    + + diff --git a/skins/larry/ui.js b/skins/larry/ui.js index d2638bbca..6b2a5c7d0 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -17,6 +17,7 @@ function rcube_mail_ui() var popupconfig = { forwardmenu: { editable:1 }, searchmenu: { editable:1, callback:searchmenu }, + attachmentmenu: { }, listoptions: { editable:1 }, dragmessagemenu: { sticky:1 }, groupmenu: { above:1 }, @@ -81,8 +82,8 @@ function rcube_mail_ui() /*** mail task ***/ if (rcmail.env.task == 'mail') { - rcmail.addEventListener('menu-open', show_listoptions); - rcmail.addEventListener('menu-save', save_listoptions); + rcmail.addEventListener('menu-open', menu_open); + rcmail.addEventListener('menu-save', menu_save); rcmail.addEventListener('responseafterlist', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list') }); var dragmenu = $('#dragmessagemenu'); @@ -95,6 +96,11 @@ function rcube_mail_ui() rcmail.addEventListener('aftershow-headers', function() { layout_messageview(); }); rcmail.addEventListener('afterhide-headers', function() { layout_messageview(); }); $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(this); return false }); + + // add menu link for each attachment + $('#attachment-list > li').each(function() { + $(this).append($('').click(function() { attachmentmenu(this); })); + }); } else if (rcmail.env.action == 'compose') { rcmail.addEventListener('aftertoggle-editor', function(){ window.setTimeout(function(){ layout_composeview() }, 200); }); @@ -436,7 +442,7 @@ function rcube_mail_ui() { var obj = popups[popup], config = popupconfig[popup], - ref = $('#'+popup+'link'), + ref = $(config.link ? config.link : '#'+popup+'link'), above = config.above; if (!obj) { @@ -452,7 +458,7 @@ function rcube_mail_ui() else if (config.toggle && show && obj.is(':visible')) show = false; - if (show && ref) { + if (show && ref.length) { var parent = ref.parent(), win = $(window), pos; @@ -575,6 +581,19 @@ function rcube_mail_ui() /**** popup callbacks ****/ + function menu_open(p) + { + if (p && p.props && p.props.menu == 'attachmentmenu') + show_popupmenu('attachmentmenu'); + else + show_listoptions(); + } + + function menu_save(prop) + { + save_listoptions(); + } + function searchmenu(show) { if (show && rcmail.env.search_mods) { @@ -605,6 +624,21 @@ function rcube_mail_ui() } } + function attachmentmenu(elem) + { + var id = elem.parentNode.id.replace(/^attach/, ''); + + $('#attachmenuopen').unbind('click').attr('onclick', '').click(function(e) { + return rcmail.command('open-attachment', id, this); + }); + + $('#attachmenudownload').unbind('click').attr('onclick', '').click(function() { + rcmail.command('download-attachment', id, this); + }); + + popupconfig.attachmentmenu.link = elem; + rcmail.command('menu-open', {menu: 'attachmentmenu', id: id}); + } function spellmenu(show) { -- cgit v1.2.3 From a02c77c584906f629d382409e76f0df4d2cfaf01 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 15 Mar 2013 10:30:53 +0100 Subject: Add ability to toggle between view as HTML and text while viewing a message (#1486939) --- CHANGELOG | 1 + program/js/app.js | 13 ++++++++++++- program/localization/en_US/labels.inc | 2 ++ program/steps/mail/compose.inc | 19 ++++++++++++++----- program/steps/mail/show.inc | 27 ++++++++++++++++++++++----- skins/classic/images/icons/html.png | Bin 0 -> 379 bytes skins/classic/images/icons/text.png | Bin 0 -> 372 bytes skins/classic/mail.css | 19 +++++++++++++------ skins/classic/templates/message.html | 8 ++++++++ skins/classic/templates/messagepreview.html | 10 +++++++++- 10 files changed, 81 insertions(+), 18 deletions(-) create mode 100644 skins/classic/images/icons/html.png create mode 100644 skins/classic/images/icons/text.png (limited to 'program/localization/en_US') diff --git a/CHANGELOG b/CHANGELOG index 6d0a959a6..42d6cc72a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Add ability to toggle between HTML and text while viewing a message (#1486939) - Better handling of session errors in ajax requests (#1488960) - Fix HTML part detection for some specific message structures (#1488992) - Don't show fake address - phishing prevention (#1488981) diff --git a/program/js/app.js b/program/js/app.js index 637d6f5d8..d3c319ecd 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -229,7 +229,7 @@ function rcube_webmail() this.env.message_commands = ['show', 'reply', 'reply-all', 'reply-list', 'moveto', 'copy', 'delete', 'open', 'mark', 'edit', 'viewsource', 'print', 'load-attachment', 'download-attachment', 'show-headers', 'hide-headers', 'download', - 'forward', 'forward-inline', 'forward-attachment']; + 'forward', 'forward-inline', 'forward-attachment', 'change-format']; if (this.env.action == 'show' || this.env.action == 'preview') { this.enable_command(this.env.message_commands, this.env.uid); @@ -608,6 +608,17 @@ function rcube_webmail() } break; + case 'change-format': + url = this.env.permaurl + '&_format=' + props; + + if (this.env.action == 'preview') + url = url.replace(/_action=show/, '_action=preview') + '&_framed=1'; + if (this.env.extwin) + url += '&_extwin=1'; + + location.href = url; + break; + case 'menu-open': if (props && props.menu == 'attachmentmenu') { var mimetype = this.env.attachments[props.id]; diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 61a13e9ab..252e0ce68 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -205,6 +205,8 @@ $labels['body'] = 'Body'; $labels['openinextwin'] = 'Open in new window'; $labels['emlsave'] = 'Download (.eml)'; +$labels['changeformattext'] = 'Display in plain text format'; +$labels['changeformathtml'] = 'Display in HTML format'; // message compose $labels['editasnew'] = 'Edit as new'; diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 640272400..6a579f754 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -183,9 +183,18 @@ $LINE_LENGTH = $RCMAIL->config->get('line_length', 72); if (!empty($msg_uid) && empty($COMPOSE['as_attachment'])) { - // similar as in program/steps/mail/show.inc - // re-set 'prefer_html' to have possibility to use html part for compose - $CONFIG['prefer_html'] = $CONFIG['prefer_html'] || $CONFIG['htmleditor'] || $compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT; + $mbox_name = $RCMAIL->storage->get_folder(); + + // set format before rcube_message construction + // use the same format as for the message view + if (isset($_SESSION['msg_formats'][$mbox_name.':'.$msg_uid])) { + $RCMAIL->config->set('prefer_html', $_SESSION['msg_formats'][$mbox_name.':'.$msg_uid]); + } + else { + $prefer_html = $CONFIG['prefer_html'] || $CONFIG['htmleditor'] || $compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT; + $RCMAIL->config->set('prefer_html', $prefer_html); + } + $MESSAGE = new rcube_message($msg_uid); // make sure message is marked as read @@ -538,8 +547,8 @@ function rcmail_compose_editor_mode() function rcmail_message_is_html() { - global $MESSAGE; - return ($MESSAGE instanceof rcube_message) && $MESSAGE->has_html_part(true); + global $RCMAIL, $MESSAGE; + return $RCMAIL->config->get('prefer_html') && ($MESSAGE instanceof rcube_message) && $MESSAGE->has_html_part(true); } function rcmail_prepare_message_body() diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index 87555cbbe..552c180f5 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -19,7 +19,7 @@ +-----------------------------------------------------------------------+ */ -$PRINT_MODE = $RCMAIL->action=='print' ? TRUE : FALSE; +$PRINT_MODE = $RCMAIL->action == 'print' ? TRUE : FALSE; // Read browser capabilities and store them in session if ($caps = get_input_value('_caps', RCUBE_INPUT_GET)) { @@ -31,8 +31,21 @@ if ($caps = get_input_value('_caps', RCUBE_INPUT_GET)) { $_SESSION['browser_caps'] = $browser_caps; } +$uid = get_input_value('_uid', RCUBE_INPUT_GET); +$mbox_name = $RCMAIL->storage->get_folder(); + // similar code as in program/steps/mail/get.inc -if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) { +if ($uid) { + // set message format (need to be done before rcube_message construction) + if (!empty($_GET['_format'])) { + $prefer_html = $_GET['_format'] == 'html'; + $RCMAIL->config->set('prefer_html', $prefer_html); + $_SESSION['msg_formats'][$mbox_name.':'.$uid] = $prefer_html; + } + else if (isset($_SESSION['msg_formats'][$mbox_name.':'.$uid])) { + $RCMAIL->config->set('prefer_html', $_SESSION['msg_formats'][$mbox_name.':'.$uid]); + } + $MESSAGE = new rcube_message($uid); // if message not found (wrong UID)... @@ -40,7 +53,6 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) { rcmail_message_error($uid); } - $mbox_name = $RCMAIL->storage->get_folder(); // show images? rcmail_check_safe($MESSAGE); @@ -106,6 +118,11 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) { $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage', 'deletingmessage', 'markingmessage'); + $prefer_html = $RCMAIL->config->get('prefer_html'); + if ($MESSAGE->has_html_part()) { + $OUTPUT->set_env('optional_format', $prefer_html ? 'text' : 'html'); + } + // check for unset disposition notification if ($MESSAGE->headers->mdn_to && empty($MESSAGE->headers->flags['MDNSENT']) @@ -288,9 +305,9 @@ $OUTPUT->add_handlers(array( )); -if ($RCMAIL->action=='print' && $OUTPUT->template_exists('messageprint')) +if ($RCMAIL->action == 'print' && $OUTPUT->template_exists('messageprint')) $OUTPUT->send('messageprint', false); -else if ($RCMAIL->action=='preview' && $OUTPUT->template_exists('messagepreview')) +else if ($RCMAIL->action == 'preview' && $OUTPUT->template_exists('messagepreview')) $OUTPUT->send('messagepreview', false); else $OUTPUT->send('message', false); diff --git a/skins/classic/images/icons/html.png b/skins/classic/images/icons/html.png new file mode 100644 index 000000000..3f022f678 Binary files /dev/null and b/skins/classic/images/icons/html.png differ diff --git a/skins/classic/images/icons/text.png b/skins/classic/images/icons/text.png new file mode 100644 index 000000000..94891be80 Binary files /dev/null and b/skins/classic/images/icons/text.png differ diff --git a/skins/classic/mail.css b/skins/classic/mail.css index 4d42d98ff..7c350ca3d 100644 --- a/skins/classic/mail.css +++ b/skins/classic/mail.css @@ -1312,20 +1312,27 @@ div.message-htmlpart div.rcmBody text-decoration: underline; } -#openextwinlink +#messagelinks { position: absolute; top: 8px; right: 10px; - width: 15px; - height: 15px; - border: 0; + height: 16px; + text-align: right; +} + +#messageframe #messagelinks +{ + top: 2px; + right: 2px; } #compose-headers #openextwinlink { - top: 4px; - right: 2px; + position: absolute; + height: 15px; + top: 4px; + right: 2px; } #full-headers diff --git a/skins/classic/templates/message.html b/skins/classic/templates/message.html index 73dfcb976..11e58c711 100644 --- a/skins/classic/templates/message.html +++ b/skins/classic/templates/message.html @@ -39,6 +39,14 @@
    + diff --git a/skins/classic/templates/messagepreview.html b/skins/classic/templates/messagepreview.html index 935238edf..80dbe381a 100644 --- a/skins/classic/templates/messagepreview.html +++ b/skins/classic/templates/messagepreview.html @@ -9,7 +9,15 @@
    - + -- cgit v1.2.3 From 1d4c84f4d74217a6639b143c14c99e3473fc539a Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 26 Mar 2013 19:36:47 +0100 Subject: Remove sig_above configuration option, use reply_mode only (#1489001) --- CHANGELOG | 1 + config/main.inc.php.dist | 3 --- program/js/app.js | 6 +++--- program/localization/en_US/labels.inc | 3 --- program/steps/mail/compose.inc | 3 +-- program/steps/settings/func.inc | 15 +-------------- program/steps/settings/save_prefs.inc | 1 - 7 files changed, 6 insertions(+), 26 deletions(-) (limited to 'program/localization/en_US') diff --git a/CHANGELOG b/CHANGELOG index c1032630b..0dc5d94cc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Remove sig_above configuration option, use reply_mode only (#1489001) - Refresh current folder in opener window after draft save or message sent (#1488997) - Fix saving draft just after entering compose window (#1489012) - Call resize handler in intervals to prevent lags and double onresize calls in Chrome (#1489005) diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist index b113b41a8..5a652a5b1 100644 --- a/config/main.inc.php.dist +++ b/config/main.inc.php.dist @@ -835,9 +835,6 @@ $rcmail_config['strip_existing_sig'] = true; // 3 - Forwards and Replies only $rcmail_config['show_sig'] = 1; -// When replying or forwarding place sender's signature above existing message -$rcmail_config['sig_above'] = false; - // Use MIME encoding (quoted-printable) for 8bit characters in message body $rcmail_config['force_7bit'] = false; diff --git a/program/js/app.js b/program/js/app.js index 758e4b893..ad82ba579 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3376,7 +3376,7 @@ function rcube_webmail() sig = this.env.signatures[sig].text; sig = sig.replace(/\r\n/g, '\n'); - p = this.env.sig_above ? message.indexOf(sig) : message.lastIndexOf(sig); + p = this.env.top_posting ? message.indexOf(sig) : message.lastIndexOf(sig); if (p >= 0) message = message.substring(0, p) + message.substring(p+sig.length, message.length); } @@ -3385,7 +3385,7 @@ function rcube_webmail() sig = this.env.signatures[id].text; sig = sig.replace(/\r\n/g, '\n'); - if (this.env.sig_above) { + if (this.env.top_posting) { if (p >= 0) { // in place of removed signature message = message.substring(0, p) + sig + message.substring(p, message.length); cursor_pos = p - 1; @@ -3429,7 +3429,7 @@ function rcube_webmail() sigElem = doc.createElement('div'); sigElem.setAttribute('id', '_rc_sig'); - if (this.env.sig_above) { + if (this.env.top_posting) { // if no existing sig and top posting then insert at caret pos editor.getWin().focus(); // correct focus in IE & Chrome diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index 252e0ce68..0a4e329e5 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -454,9 +454,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from $labels['autoaddsignature'] = 'Automatically add signature'; $labels['newmessageonly'] = 'new message only'; $labels['replyandforwardonly'] = 'replies and forwards only'; -$labels['replysignaturepos'] = 'When replying or forwarding place signature'; -$labels['belowquote'] = 'below the quote'; -$labels['abovequote'] = 'above the quote'; $labels['insertsignature'] = 'Insert signature'; $labels['previewpanemarkread'] = 'Mark previewed messages as read'; $labels['afternseconds'] = 'after $n seconds'; diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 129d43701..cc7cf687f 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -139,7 +139,6 @@ if (!empty($CONFIG['drafts_mbox'])) { } // set current mailbox in client environment $OUTPUT->set_env('mailbox', $RCMAIL->storage->get_folder()); -$OUTPUT->set_env('sig_above', $RCMAIL->config->get('sig_above', false)); $OUTPUT->set_env('top_posting', intval($RCMAIL->config->get('reply_mode')) > 0); $OUTPUT->set_env('recipients_separator', trim($RCMAIL->config->get('recipients_separator', ','))); @@ -462,7 +461,7 @@ function rcmail_compose_header_from($attrib) if (count($MESSAGE->identities)) { $a_signatures = array(); - $separator = $RCMAIL->config->get('sig_above') + $separator = intval($RCMAIL->config->get('reply_mode')) > 0 && ($compose_mode == RCUBE_COMPOSE_REPLY || $compose_mode == RCUBE_COMPOSE_FORWARD) ? '---' : '-- '; $field_attrib['onchange'] = JS_OBJECT_NAME.".change_identity(this)"; diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 2f726c7e8..319c58db9 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -581,8 +581,7 @@ function rcmail_user_prefs($current=null) if (!isset($no_override['reply_mode'])) { $field_id = 'rcmfd_reply_mode'; - $select_replymode = new html_select(array('name' => '_reply_mode', 'id' => $field_id, - 'onchange' => "\$('#rcmfd_sig_above').attr('disabled',this.selectedIndex<2)")); + $select_replymode = new html_select(array('name' => '_reply_mode', 'id' => $field_id)); $select_replymode->add(rcube_label('replyempty'), -1); $select_replymode->add(rcube_label('replybottomposting'), 0); $select_replymode->add(rcube_label('replytopposting'), 1); @@ -631,18 +630,6 @@ function rcmail_user_prefs($current=null) ); } - if (!isset($no_override['sig_above'])) { - $field_id = 'rcmfd_sig_above'; - $select_sigabove = new html_select(array('name' => '_sig_above', 'id' => $field_id, 'disabled' => $config['reply_mode'] < 1)); - $select_sigabove->add(rcube_label('belowquote'), 0); - $select_sigabove->add(rcube_label('abovequote'), 1); - - $blocks['sig']['options']['sig_above'] = array( - 'title' => html::label($field_id, Q(rcube_label('replysignaturepos'))), - 'content' => $select_sigabove->show($config['sig_above']?1:0), - ); - } - if (!isset($no_override['strip_existing_sig'])) { $field_id = 'rcmfd_strip_existing_sig'; $input_stripexistingsig = new html_checkbox(array('name' => '_strip_existing_sig', 'id' => $field_id, 'value' => 1)); diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 5daab0d24..140f173c6 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -86,7 +86,6 @@ switch ($CURR_SECTION) 'show_sig' => isset($_POST['_show_sig']) ? intval($_POST['_show_sig']) : 1, 'reply_mode' => isset($_POST['_reply_mode']) ? intval($_POST['_reply_mode']) : 0, 'strip_existing_sig' => isset($_POST['_strip_existing_sig']), - 'sig_above' => !empty($_POST['_sig_above']) && $_POST['_reply_mode'] > 0, 'default_font' => get_input_value('_default_font', RCUBE_INPUT_POST), 'forward_attachment' => !empty($_POST['_forward_attachment']), ); -- cgit v1.2.3