From a8a72e2e7ee89caa04f8f13b6067e1b4ad870612 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Mon, 10 Dec 2012 22:26:45 +0100 Subject: Nicely render headers of message/rfc822 parts --- skins/classic/mail.css | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'skins/classic') diff --git a/skins/classic/mail.css b/skins/classic/mail.css index 85c53d569..98325d9d2 100644 --- a/skins/classic/mail.css +++ b/skins/classic/mail.css @@ -1070,6 +1070,17 @@ table.headers-table background-color: #F4F4F4; } +#messagebody table.headers-table +{ + margin: 16px 6px 6px 6px; +} + +div.message-partheaders + div.message-part +{ + border-top: 0; + padding-top: 4px; +} + table.headers-table tr td { font-size: 11px; -- cgit v1.2.3 From d9f109b56af2015eae7aadc5e87c06365854eda0 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 11 Dec 2012 08:30:49 +0100 Subject: Allow forwarding of multiple emails (#1486854) --- CHANGELOG | 1 + program/js/app.js | 19 ++-- program/steps/mail/compose.inc | 147 +++++++++++++++++------------ program/steps/mail/sendmail.inc | 3 +- skins/classic/includes/messagetoolbar.html | 2 +- skins/larry/includes/mailtoolbar.html | 2 +- 6 files changed, 101 insertions(+), 73 deletions(-) (limited to 'skins/classic') diff --git a/CHANGELOG b/CHANGELOG index 79f19b904..ebc279622 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Allow forwarding of multiple emails (#1486854) - Fix big memory consumption of DB layer (#1488856) - Add workaround for IE<=8 bug where Content-Disposition:inline was ignored (#1488844) - Fix XSS vulnerability in vbscript: and data:text links handling (#1488850) diff --git a/program/js/app.js b/program/js/app.js index 955c77ff5..4db7fa0c8 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -224,9 +224,10 @@ function rcube_webmail() this.set_button_titles(); - this.env.message_commands = ['show', 'reply', 'reply-all', 'reply-list', 'forward', - 'moveto', 'copy', 'delete', 'open', 'mark', 'edit', 'viewsource', 'download', - 'print', 'load-attachment', 'show-headers', 'hide-headers', 'forward-attachment']; + 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', + 'forward', 'forward-inline', 'forward-attachment']; if (this.env.action == 'show' || this.env.action == 'preview') { this.enable_command(this.env.message_commands, this.env.uid); @@ -999,10 +1000,12 @@ function rcube_webmail() break; case 'forward-attachment': + case 'forward-inline': case 'forward': - if (uid = this.get_single_uid()) { - url = { _forward_uid: uid, _mbox: this.env.mailbox }; - if (command == 'forward-attachment' || (!props && this.env.forward_attachment)) + var uids = this.env.uid ? [this.env.uid] : (this.message_list ? this.message_list.get_selection() : []); + if (uids.length) { + url = { _forward_uid: this.uids_to_list(uids), _mbox: this.env.mailbox }; + if (command == 'forward-attachment' || (!props && this.env.forward_attachment) || uids.length > 1) url._attachment = 1; this.open_compose_step(url); } @@ -1526,7 +1529,7 @@ function rcube_webmail() if (selected) { // Hide certain command buttons when Drafts folder is selected if (this.env.mailbox == this.env.drafts_mailbox) - this.enable_command('reply', 'reply-all', 'reply-list', 'forward', 'forward-attachment', false); + this.enable_command('reply', 'reply-all', 'reply-list', 'forward', 'forward-attachment', 'forward-inline', false); // Disable reply-list when List-Post header is not set else { var msg = this.env.messages[list.get_single_selection()]; @@ -1535,7 +1538,7 @@ function rcube_webmail() } } // Multi-message commands - this.enable_command('delete', 'moveto', 'copy', 'mark', (list.selection.length > 0 ? true : false)); + this.enable_command('delete', 'moveto', 'copy', 'mark', 'forward', 'forward-attachment', list.selection.length > 0); // reset all-pages-selection if (selected || (list.selection.length && list.selection.length != list.rowcount)) diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 908de950e..d181a72e6 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -151,15 +151,22 @@ if ($font && !is_array($font)) { // get reference message and set compose mode if ($msg_uid = $COMPOSE['param']['draft_uid']) { - $RCMAIL->storage->set_folder($CONFIG['drafts_mbox']); $compose_mode = RCUBE_COMPOSE_DRAFT; + $RCMAIL->storage->set_folder($CONFIG['drafts_mbox']); } -else if ($msg_uid = $COMPOSE['param']['reply_uid']) +else if ($msg_uid = $COMPOSE['param']['reply_uid']) { $compose_mode = RCUBE_COMPOSE_REPLY; -else if ($msg_uid = $COMPOSE['param']['forward_uid']) + $OUTPUT->set_env('compose_mode', 'reply'); +} +else if ($msg_uid = $COMPOSE['param']['forward_uid']) { $compose_mode = RCUBE_COMPOSE_FORWARD; -else if ($msg_uid = $COMPOSE['param']['uid']) + $OUTPUT->set_env('compose_mode', 'forward'); + $COMPOSE['forward_uid'] = $msg_uid; + $COMPOSE['as_attachment'] = !empty($COMPOSE['param']['attachment']); +} +else if ($msg_uid = $COMPOSE['param']['uid']) { $compose_mode = RCUBE_COMPOSE_EDIT; +} $config_show_sig = $RCMAIL->config->get('show_sig', 1); if ($config_show_sig == 1) @@ -174,7 +181,7 @@ else // set line length for body wrapping $LINE_LENGTH = $RCMAIL->config->get('line_length', 72); -if (!empty($msg_uid)) +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 @@ -188,8 +195,7 @@ if (!empty($msg_uid)) if (!empty($MESSAGE->headers->charset)) $RCMAIL->storage->set_charset($MESSAGE->headers->charset); - if ($compose_mode == RCUBE_COMPOSE_REPLY) - { + if ($compose_mode == RCUBE_COMPOSE_REPLY) { $COMPOSE['reply_uid'] = $msg_uid; $COMPOSE['reply_msgid'] = $MESSAGE->headers->messageID; $COMPOSE['references'] = trim($MESSAGE->headers->references . " " . $MESSAGE->headers->messageID); @@ -197,8 +203,6 @@ if (!empty($msg_uid)) if (!empty($COMPOSE['param']['all'])) $MESSAGE->reply_all = $COMPOSE['param']['all']; - $OUTPUT->set_env('compose_mode', 'reply'); - // Save the sent message in the same folder of the message being replied to if ($RCMAIL->config->get('reply_same_folder') && ($sent_folder = $COMPOSE['mailbox']) && rcmail_check_sent_folder($sent_folder, false) @@ -206,10 +210,8 @@ if (!empty($msg_uid)) $COMPOSE['param']['sent_mbox'] = $sent_folder; } } - else if ($compose_mode == RCUBE_COMPOSE_DRAFT) - { - if ($MESSAGE->headers->others['x-draft-info']) - { + else if ($compose_mode == RCUBE_COMPOSE_DRAFT) { + if ($MESSAGE->headers->others['x-draft-info']) { // get reply_uid/forward_uid to flag the original message when sending $info = rcmail_draftinfo_decode($MESSAGE->headers->others['x-draft-info']); @@ -233,14 +235,6 @@ if (!empty($msg_uid)) $COMPOSE['references'] = $MESSAGE->headers->references; } - else if ($compose_mode == RCUBE_COMPOSE_FORWARD) - { - $COMPOSE['forward_uid'] = $msg_uid; - $OUTPUT->set_env('compose_mode', 'forward'); - - if (!empty($COMPOSE['param']['attachment'])) - $MESSAGE->forward_attachment = true; - } } else { $MESSAGE = new stdClass(); @@ -643,11 +637,11 @@ function rcmail_prepare_message_body() $isHtml = false; } // forward as attachment - else if ($compose_mode == RCUBE_COMPOSE_FORWARD && $MESSAGE->forward_attachment) { + else if ($compose_mode == RCUBE_COMPOSE_FORWARD && $COMPOSE['as_attachment']) { $isHtml = rcmail_compose_editor_mode(); $body = ''; if (empty($COMPOSE['attachments'])) - rcmail_write_forward_attachment($MESSAGE); + rcmail_write_forward_attachments(); } // reply/edit/draft/forward else if ($compose_mode && ($compose_mode != RCUBE_COMPOSE_REPLY || $RCMAIL->config->get('reply_mode') != -1)) { @@ -1135,55 +1129,86 @@ function rcmail_write_inline_attachments(&$message) return $cid_map; } -// Creates an attachment from the forwarded message -function rcmail_write_forward_attachment(&$message) +// Creates attachment(s) from the forwarded message(s) +function rcmail_write_forward_attachments() { - global $RCMAIL, $COMPOSE; + global $RCMAIL, $COMPOSE, $MESSAGE; + + $storage = $RCMAIL->get_storage(); + $mem_limit = parse_bytes(ini_get('memory_limit')); + $curr_mem = function_exists('memory_get_usage') ? memory_get_usage() : 16*1024*1024; // safe value: 16MB + $names = array(); - if (strlen($message->subject)) { - $name = mb_substr($message->subject, 0, 64) . '.eml'; + if ($COMPOSE['forward_uid'] == '*') { + $index = $storage->index(null, rcmail_sort_column(), rcmail_sort_order()); + $COMPOSE['forward_uid'] = $index->get(); } else { - $name = 'message_rfc822.eml'; + $COMPOSE['forward_uid'] = explode(',', $COMPOSE['forward_uid']); } - $mem_limit = parse_bytes(ini_get('memory_limit')); - $curr_mem = function_exists('memory_get_usage') ? memory_get_usage() : 16*1024*1024; // safe value: 16MB - $data = $path = null; + foreach ((array)$COMPOSE['forward_uid'] as $uid) { + $message = new rcube_message($uid); - // don't load too big attachments into memory - if ($mem_limit > 0 && $message->size > $mem_limit - $curr_mem) { - $temp_dir = unslashify($RCMAIL->config->get('temp_dir')); - $path = tempnam($temp_dir, 'rcmAttmnt'); - if ($fp = fopen($path, 'w')) { - $RCMAIL->storage->get_raw_body($message->uid, $fp); - fclose($fp); - } else - return false; - } else { - $data = $RCMAIL->storage->get_raw_body($message->uid); - } + if (empty($message->headers)) { + continue; + } - $attachment = array( - 'group' => $COMPOSE['id'], - 'name' => $name, - 'mimetype' => 'message/rfc822', - 'data' => $data, - 'path' => $path, - 'size' => $path ? filesize($path) : strlen($data), - ); + if (!empty($message->headers->charset)) { + $storage->set_charset($message->headers->charset); + } - $attachment = $RCMAIL->plugins->exec_hook('attachment_save', $attachment); + if (empty($MESSAGE->subject)) { + $MESSAGE->subject = $message->subject; + } - if ($attachment['status']) { - unset($attachment['data'], $attachment['status'], $attachment['content_id'], $attachment['abort']); - $COMPOSE['attachments'][$attachment['id']] = $attachment; - return true; - } else if ($path) { - @unlink($path); - } + // generate (unique) attachment name + $name = strlen($message->subject) ? mb_substr($message->subject, 0, 64) : 'message_rfc822'; + if (!empty($names[$name])) { + $names[$name]++; + $name .= '_' . $names[$name]; + } + $names[$name] = 1; + $name .= '.eml'; + + $data = $path = null; + + // don't load too big attachments into memory + if ($mem_limit > 0 && $message->size > $mem_limit - $curr_mem) { + $temp_dir = unslashify($RCMAIL->config->get('temp_dir')); + $path = tempnam($temp_dir, 'rcmAttmnt'); + if ($fp = fopen($path, 'w')) { + $storage->get_raw_body($message->uid, $fp); + fclose($fp); + } + else { + return false; + } + } + else { + $data = $storage->get_raw_body($message->uid); + $curr_mem += $message->size; + } - return false; + $attachment = array( + 'group' => $COMPOSE['id'], + 'name' => $name, + 'mimetype' => 'message/rfc822', + 'data' => $data, + 'path' => $path, + 'size' => $path ? filesize($path) : strlen($data), + ); + + $attachment = $RCMAIL->plugins->exec_hook('attachment_save', $attachment); + + if ($attachment['status']) { + unset($attachment['data'], $attachment['status'], $attachment['content_id'], $attachment['abort']); + $COMPOSE['attachments'][$attachment['id']] = $attachment; + } + else if ($path) { + @unlink($path); + } + } } diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index c26d774a2..d48834bb4 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -617,13 +617,12 @@ if (is_array($COMPOSE['attachments'])) $ctype = str_replace('image/pjpeg', 'image/jpeg', $attachment['mimetype']); // #1484914 $file = $attachment['data'] ? $attachment['data'] : $attachment['path']; - // .eml attachments send inline $MAIL_MIME->addAttachment($file, $ctype, $attachment['name'], ($attachment['data'] ? false : true), ($ctype == 'message/rfc822' ? '8bit' : 'base64'), - ($ctype == 'message/rfc822' ? 'inline' : 'attachment'), + 'attachment', '', '', '', $CONFIG['mime_param_folding'] ? 'quoted-printable' : NULL, $CONFIG['mime_param_folding'] == 2 ? 'quoted-printable' : NULL, diff --git a/skins/classic/includes/messagetoolbar.html b/skins/classic/includes/messagetoolbar.html index eebb55708..371c83fd9 100644 --- a/skins/classic/includes/messagetoolbar.html +++ b/skins/classic/includes/messagetoolbar.html @@ -27,7 +27,7 @@
    -
  • +
diff --git a/skins/larry/includes/mailtoolbar.html b/skins/larry/includes/mailtoolbar.html index 31472cbb3..8efcc762c 100644 --- a/skins/larry/includes/mailtoolbar.html +++ b/skins/larry/includes/mailtoolbar.html @@ -17,7 +17,7 @@
    -
  • +
-- cgit v1.2.3 From f5e7a1f36a04bdf830ee935a651295cb9794ecf4 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 19 Dec 2012 10:11:58 +0100 Subject: Add Compose button on message view page (#1488747) Fixed javascript error on extwin message page (classic skin) - removed splitter. --- CHANGELOG | 1 + skins/classic/includes/messagetoolbar.html | 2 +- skins/classic/templates/message.html | 2 ++ skins/larry/includes/mailtoolbar.html | 2 ++ skins/larry/templates/mail.html | 2 -- skins/larry/templates/message.html | 1 - 6 files changed, 6 insertions(+), 4 deletions(-) (limited to 'skins/classic') diff --git a/CHANGELOG b/CHANGELOG index 8cfeaf89d..41e266d0c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Add Compose button on message view page (#1488747) - Display 'Sender' header in message preview - Plugin API: Added message_before_send hook - Fix contact copy/add-to-group operations on search result (#1488862) diff --git a/skins/classic/includes/messagetoolbar.html b/skins/classic/includes/messagetoolbar.html index 371c83fd9..bd14f490f 100644 --- a/skins/classic/includes/messagetoolbar.html +++ b/skins/classic/includes/messagetoolbar.html @@ -5,8 +5,8 @@ - + diff --git a/skins/classic/templates/message.html b/skins/classic/templates/message.html index fcf0b22c8..b9c928f8f 100644 --- a/skins/classic/templates/message.html +++ b/skins/classic/templates/message.html @@ -58,10 +58,12 @@
+ + diff --git a/skins/larry/includes/mailtoolbar.html b/skins/larry/includes/mailtoolbar.html index 8efcc762c..59f2d581a 100644 --- a/skins/larry/includes/mailtoolbar.html +++ b/skins/larry/includes/mailtoolbar.html @@ -1,3 +1,5 @@ + + diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html index 8b205efbe..751ab82a4 100644 --- a/skins/larry/templates/mail.html +++ b/skins/larry/templates/mail.html @@ -21,8 +21,6 @@
- -
diff --git a/skins/larry/templates/message.html b/skins/larry/templates/message.html index 04381f5e9..ae77c0dc0 100644 --- a/skins/larry/templates/message.html +++ b/skins/larry/templates/message.html @@ -14,7 +14,6 @@
-
-- 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 'skins/classic') 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 eecb447b2a067f3e9af012e512dec7a7b73f4a6b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 1 Jan 2013 12:12:37 +0100 Subject: Fix checkbox/label alignment. We do this by additional span inside label and vertical-align:middle on both checkbox and span. --- skins/classic/common.css | 8 ++++ skins/classic/templates/addressbook.html | 10 ++--- skins/classic/templates/mail.html | 74 ++++++++++++++++---------------- skins/larry/styles.css | 6 +++ skins/larry/templates/addressbook.html | 10 ++--- skins/larry/templates/mail.html | 62 +++++++++++++------------- 6 files changed, 92 insertions(+), 78 deletions(-) (limited to 'skins/classic') diff --git a/skins/classic/common.css b/skins/classic/common.css index 8115c1bfc..b4adc58a7 100644 --- a/skins/classic/common.css +++ b/skins/classic/common.css @@ -145,6 +145,14 @@ img color: #999999; } +/* fixes vertical alignment of checkboxes and labels */ +label input, +label span +{ + vertical-align: middle; +} + + /** common user interface objects */ #mainscreen diff --git a/skins/classic/templates/addressbook.html b/skins/classic/templates/addressbook.html index d77bb38d9..74673007a 100644 --- a/skins/classic/templates/addressbook.html +++ b/skins/classic/templates/addressbook.html @@ -40,11 +40,11 @@
      -
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +
    • +
    diff --git a/skins/classic/templates/mail.html b/skins/classic/templates/mail.html index ad67d8e89..3ad258299 100644 --- a/skins/classic/templates/mail.html +++ b/skins/classic/templates/mail.html @@ -76,7 +76,7 @@ - + /> @@ -110,13 +110,13 @@
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    @@ -150,52 +150,52 @@
      -
    • -
    • +
    • +
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    -
      -
    • -
    • -
    +
      +
    • +
    • +
    diff --git a/skins/larry/styles.css b/skins/larry/styles.css index cd6810e8d..4f6073fdd 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -71,6 +71,12 @@ textarea.placeholder { font-weight: bold; } +/* fixes vertical alignment of checkboxes and labels */ +label input, +label span { + vertical-align: middle; +} + /*** buttons ***/ input.button { diff --git a/skins/larry/templates/addressbook.html b/skins/larry/templates/addressbook.html index c39c2fe87..9a9a2d747 100644 --- a/skins/larry/templates/addressbook.html +++ b/skins/larry/templates/addressbook.html @@ -78,11 +78,11 @@
      -
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +
    • +
    diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html index cd817c1de..58f6cc01d 100644 --- a/skins/larry/templates/mail.html +++ b/skins/larry/templates/mail.html @@ -128,13 +128,13 @@
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    @@ -178,19 +178,19 @@
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    @@ -198,15 +198,15 @@
      -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • -
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    @@ -214,8 +214,8 @@
      -
    • -
    • +
    • +
    -- cgit v1.2.3 From 240ad59dcded9b33826582fe6b9abd22dd479121 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 2 Jan 2013 20:05:54 +0100 Subject: Fix #countcontrols issue in IE<=8 when text is very long (#1488890) --- CHANGELOG | 1 + skins/classic/iehacks.css | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'skins/classic') diff --git a/CHANGELOG b/CHANGELOG index 8b26fbc14..525aac44d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix #countcontrols issue in IE<=8 when text is very long (#1488890) - Add option to use envelope From address for MDN responses (#1488880) - Add possibility to search in message body only (#1488770) - Support "multipart/relative" as an alias for "multipart/related" type (#1488886) diff --git a/skins/classic/iehacks.css b/skins/classic/iehacks.css index 2bd3ce865..c8b9b3740 100644 --- a/skins/classic/iehacks.css +++ b/skins/classic/iehacks.css @@ -184,13 +184,7 @@ body.iframe div.messageheaderbox overflow: hidden; } -#countcontrols -{ - width: 24em; - padding-right: 10px; -} - -body.iframe +body.iframe { width: expression((parseInt(document.documentElement.clientWidth))+'px'); } -- 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 'skins/classic') 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 @@
      +
      +
        +
      • +
      • +
      +