From e327ebd7fedaf4a5b85da07ca37d9544eb067a03 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 30 Nov 2012 11:19:06 +0100 Subject: Unify top-border on message-part and image-attachment elements --- skins/larry/mail.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'skins') diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 48eba6e02..6512e52a3 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -1001,7 +1001,7 @@ div.hide-headers { div.message-part, div.message-htmlpart { padding: 0 2px 10px 2px; - border-top: 2px solid #f0f0f0; + border-top: 1px solid #ccc; } #messagebody div:first-child { -- cgit v1.2.3 From 04acc75f774f8bc6292f574375b6a2f23b3ac0d4 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 6 Dec 2012 09:50:35 +0100 Subject: Replace topline container with topline-left, topline-center, topline-right containers (#1488846) --- skins/larry/includes/header.html | 6 +++--- skins/larry/styles.css | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'skins') diff --git a/skins/larry/includes/header.html b/skins/larry/includes/header.html index 4be475bac..2620fafe5 100644 --- a/skins/larry/includes/header.html +++ b/skins/larry/includes/header.html @@ -1,13 +1,15 @@
- +
diff --git a/skins/larry/templates/messagepreview.html b/skins/larry/templates/messagepreview.html index 9eb4d1e00..aef282ac9 100644 --- a/skins/larry/templates/messagepreview.html +++ b/skins/larry/templates/messagepreview.html @@ -47,7 +47,7 @@
- +
-- 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') 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 3f08b3a35af0305adada893cbef48336aa7851fa Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 14 Dec 2012 08:33:33 +0100 Subject: Fix unwanted horizontal scrollbar in message preview header (#1488866) --- CHANGELOG | 1 + skins/larry/mail.css | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'skins') diff --git a/CHANGELOG b/CHANGELOG index 840c34901..43ba0c2e4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix unwanted horizontal scrollbar in message preview header (#1488866) - Fix handling of signatures on draft edit (#1488798) - Fix so compacting of non-empty folder is possible also when messages list is empty (#1488858) - Allow forwarding of multiple emails (#1486854) diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 12a2b7a82..57d968fb4 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -729,7 +729,7 @@ h2.subject { h3.subject { font-size: 14px; - margin: 0 8em 0 0; + margin: 0 12em 0 0; padding: 8px 8px 4px 8px; white-space: nowrap; overflow: hidden; @@ -938,7 +938,6 @@ div.hide-headers { position: absolute; top: 8px; right: 8px; - width: 20em; text-align: right; white-space: nowrap; } -- 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') 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 54241516d7e4e44520b9c4dea1bc82e078432018 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Sat, 29 Dec 2012 16:24:39 +0100 Subject: Add toggle to minimize page header; automatically triggers on small screens --- skins/larry/ie7hacks.css | 24 +++++- skins/larry/images/buttons.png | Bin 34009 -> 36693 bytes skins/larry/includes/header.html | 2 + skins/larry/styles.css | 156 ++++++++++++++++++++++++++++++++++++++- skins/larry/ui.js | 20 +++++ 5 files changed, 200 insertions(+), 2 deletions(-) (limited to 'skins') diff --git a/skins/larry/ie7hacks.css b/skins/larry/ie7hacks.css index f07d79a65..d383c1e3e 100644 --- a/skins/larry/ie7hacks.css +++ b/skins/larry/ie7hacks.css @@ -17,6 +17,14 @@ height: expression((parseInt(document.documentElement.clientHeight)-150)+'px'); } +.minimal #mainscreen { + height: expression((parseInt(document.documentElement.clientHeight)-82)+'px'); +} + +.minimal #mainscreen.offset { + height: expression((parseInt(document.documentElement.clientHeight)-120)+'px'); +} + input.button { display: inline; font-size: 90%; @@ -29,7 +37,8 @@ a.deletebutton, .boxfooter .listbutton .inner, .attachmentslist li a.delete, .attachmentslist li a.cancelupload, -.previewheader .iconlink { +.previewheader .iconlink, +.minimal #taskbar .button-inner { /* workaround for text-indent which also offsets the background image */ text-indent: 0; font-size: 0; @@ -183,3 +192,16 @@ ul.toolbarmenu li label { padding: 0 1px 0 0; } +.minimal #topline { + width: 100%; + height: 18px; + box-sizing: border-box; +} + + +.minimal #taskbar a:hover .tooltip { + right: 34px; + top: 1px; +} + + diff --git a/skins/larry/images/buttons.png b/skins/larry/images/buttons.png index 7d042cb23..4438d9cbc 100644 Binary files a/skins/larry/images/buttons.png and b/skins/larry/images/buttons.png differ diff --git a/skins/larry/includes/header.html b/skins/larry/includes/header.html index 2620fafe5..5a30020f3 100644 --- a/skins/larry/includes/header.html +++ b/skins/larry/includes/header.html @@ -26,6 +26,8 @@ + +
diff --git a/skins/larry/styles.css b/skins/larry/styles.css index f3b02779e..cd6810e8d 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -570,9 +570,139 @@ a.iconlink.upload { color: #fff; } +#taskbar .button-logout { + display: none; +} + +#taskbar a.button-logout span.button-inner { + background-position: -2px -1791px; +} + +#taskbar a.button-logout:hover span.button-inner { + background-position: -2px -1829px; +} + + +/*** minimal version of the page header ***/ + +.minimal #topline { + position: fixed; + top: -18px; + background: #444; + z-index: 5000; + width: 100%; + height: 22px; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.minimal #topline:hover { + top: 0px; + opacity: 0.94; + filter: alpha(opacity=94); + -webkit-transition: top 0.3s ease-in-out; + -moz-transition: top 0.3s ease-in-out; + -o-transition: top 0.3s ease-in-out; + transition: top 0.3s ease-in-out; +} + +.minimal #topline a.button-logout { + display: none; +} + +.minimal #topline span.username { + display: inline-block; + padding-top: 2px; +} + +.minimal #topnav { + position: relative; + top: 4px; + height: 42px; +} + +.minimal #taskbar { + height: ; +} + +.minimal #taskbar a { + position: relative; + padding: 10px 10px 0 6px; + height: 32px; +} + +.minimal #taskbar .button-logout { + display: inline-block; +} + +.minimal #taskbar .button-inner { + top: -4px; + padding: 0; + height: 24px !important; + width: 27px; + text-indent: -5000px; +} + +#taskbar .tooltip { + display: none; +} + +.minimal #taskbar .tooltip { + position: absolute; + top: -500px; + right: 2px; + display: inline-block; + padding: 2px 8px 3px 8px; + background: #444; + background: -moz-linear-gradient(top, #444 0%, #333 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#444), color-stop(100%,#333)); + background: -o-linear-gradient(top, #444 0%, #333 100%); + background: -ms-linear-gradient(top, #444 0%, #333 100%); + background: linear-gradient(top, #444 0%, #333 100%); + color: #eee; + font-weight: bold; + white-space: nowrap; + border: 1px solid #777; + box-shadow: 0 1px 5px 0 #333; + -moz-box-shadow: 0 1px 5px 0 #333; + -webkit-box-shadow: 0 1px 5px 0 #333; + -o-box-shadow: 0 1px 5px 0 #333; + z-index: 200; + white-space: nowrap; + text-shadow: 0px 1px 1px #000; +} + +.minimal #taskbar .tooltip:after { + content: ""; + position: absolute; + top: -4px; + right: 15px; + border-style: solid; + border-width: 0 4px 4px; + border-color: #888 transparent; + /* reduce the damage in FF3.0 */ + display: block; + width: 0; + z-index: 251; +} + +.ie8 .minimal #taskbar .tooltip:after { + top: -6px; +} + +.minimal #taskbar a:hover .tooltip { + display: block; + top: 39px; +} + /*** taskbar ***/ +#taskbar { + position: relative; + padding-right: 18px; +} + #taskbar a { display: inline-block; height: 34px; @@ -630,6 +760,22 @@ a.iconlink.upload { background-position: 0 -168px; } +#taskbar .minmodetoggle { + position: absolute; + top: 0; + right: 0; + display: block; + width: 19px; + height: 46px; + cursor: pointer; + background: url(images/buttons.png) -35px -1778px no-repeat; +} + +.minimal #taskbar .minmodetoggle { + height: 42px; + background-position: -35px -1820px; +} + #mainscreen { position: absolute; top: 88px; @@ -643,13 +789,21 @@ a.iconlink.upload { } #mainscreen.offset { - top: 130px; + top: 132px; } #mainscreen .offset { margin-top: 42px; } +.minimal #mainscreen { + top: 62px; +} + +.minimal #mainscreen.offset { + top: 102px; +} + .uibox { border: 1px solid #a3a3a3; border-radius: 4px; diff --git a/skins/larry/ui.js b/skins/larry/ui.js index da4f2300e..d2faa3611 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -43,6 +43,15 @@ function rcube_mail_ui() this.hide_header_row = hide_header_row; + // set minimal mode on small screens (don't wait for document.ready) + if (window.$ && document.body) { + var minmode = rcmail.get_cookie('minimalmode'); + if (parseInt(minmode) || (minmode === null && $(window).height() < 850)) { + $(document.body).addClass('minimal'); + } + } + + /** * */ @@ -59,6 +68,17 @@ function rcube_mail_ui() { rcmail.addEventListener('message', message_displayed); + /*** prepare minmode functions ***/ + $('#taskbar a').each(function(i,elem){ + $(elem).append('' + $('.button-inner', this).html() + '') + }); + + $('#taskbar .minmodetoggle').click(function(e){ + var ismin = $(document.body).toggleClass('minimal').hasClass('minimal'); + rcmail.set_cookie('minimalmode', ismin?1:0); + $(window).resize(); + }); + /*** mail task ***/ if (rcmail.env.task == 'mail') { rcmail.addEventListener('menu-open', show_listoptions); -- cgit v1.2.3 From d9f180adf9e1e8a63ea9bfdb534dc376a4829fee Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Sat, 29 Dec 2012 16:54:41 +0100 Subject: Minor IE7/8 fixes --- program/steps/mail/get.inc | 7 +++---- skins/larry/ie7hacks.css | 4 ++++ skins/larry/mail.css | 2 ++ skins/larry/templates/messagepart.html | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) (limited to 'skins') diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index 37f728ebf..9d9032b6a 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -160,10 +160,9 @@ else if (strlen($pid = get_input_value('_part', RCUBE_INPUT_GET))) { 'vars' => array('expected' => "$mimetype (.$file_extension)", 'detected' => "$real_mimetype (.$extensions[0])") )) . html::p('buttons', - html::a(array( - 'href' => $RCMAIL->url(array_merge($_GET, array('_nocheck' => 1))), - 'style' => 'text-decoration:none;color:#000', - ), html::tag('button', null, rcube_label('showanyway')))) + html::tag('button', + array('onclick' => "location.href='" . $RCMAIL->url(array_merge($_GET, array('_nocheck' => 1))) . "'"), + rcube_label('showanyway'))) ) ))); exit; diff --git a/skins/larry/ie7hacks.css b/skins/larry/ie7hacks.css index d383c1e3e..bca39e92d 100644 --- a/skins/larry/ie7hacks.css +++ b/skins/larry/ie7hacks.css @@ -25,6 +25,10 @@ height: expression((parseInt(document.documentElement.clientHeight)-120)+'px'); } +#messagepartframe { + height: expression((parseInt(this.parentNode.offsetHeight)-1)+'px'); +} + input.button { display: inline; font-size: 90%; diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 57d968fb4..34c623391 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -1126,6 +1126,8 @@ div.message-partheaders .headers-table td.header { #messagepartframe { border: 0; + width: 100%; + height: 100%; } /*** message composition ***/ diff --git a/skins/larry/templates/messagepart.html b/skins/larry/templates/messagepart.html index e029973a8..dbb4940de 100644 --- a/skins/larry/templates/messagepart.html +++ b/skins/larry/templates/messagepart.html @@ -27,7 +27,7 @@
- +
-- 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') 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') 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 b903c2145084f2d294a92e98971ab14ba47aa060 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 2 Jan 2013 17:26:22 +0100 Subject: Fix minimal header mode in ext wins --- skins/larry/styles.css | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'skins') diff --git a/skins/larry/styles.css b/skins/larry/styles.css index 4f6073fdd..72ea74aaf 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -612,6 +612,17 @@ a.iconlink.upload { transition: top 0.3s ease-in-out; } +.extwin #topline, +.extwin #topline:hover { + position: static; + top: 0px; + height: 18px; + width: auto; + -moz-box-sizing: content-box; + box-sizing: content-box; + opacity: 0.999; +} + .minimal #topline a.button-logout { display: none; } @@ -790,6 +801,14 @@ a.iconlink.upload { bottom: 20px; } +.minimal #mainscreen { + top: 62px; +} + +.minimal #mainscreen.offset { + top: 102px; +} + .extwin #mainscreen { top: 40px; } @@ -802,14 +821,6 @@ a.iconlink.upload { margin-top: 42px; } -.minimal #mainscreen { - top: 62px; -} - -.minimal #mainscreen.offset { - top: 102px; -} - .uibox { border: 1px solid #a3a3a3; border-radius: 4px; -- 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') 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 0b56baa06cb301bb165968bec0fff9ca9fcd3530 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 3 Jan 2013 19:33:51 +0100 Subject: Remove invalid css rule --- skins/larry/styles.css | 4 ---- 1 file changed, 4 deletions(-) (limited to 'skins') diff --git a/skins/larry/styles.css b/skins/larry/styles.css index 72ea74aaf..34d7dad24 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -638,10 +638,6 @@ a.iconlink.upload { height: 42px; } -.minimal #taskbar { - height: ; -} - .minimal #taskbar a { position: relative; padding: 10px 10px 0 6px; -- cgit v1.2.3 From 212ff905bb95eeb7d154b9937e5d51e04e27bd3c Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 6 Jan 2013 10:17:45 +0100 Subject: Fix Chrome issue with unwanted horizontal scrollbar (#1488851) --- skins/larry/styles.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'skins') diff --git a/skins/larry/styles.css b/skins/larry/styles.css index 34d7dad24..51dc0363c 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -510,6 +510,10 @@ a.iconlink.upload { /*** basic page layout ***/ +#header { + overflow: hidden; /* Chrome bug #1488851 */ +} + #topline { height: 18px; background: url(images/linen_header.jpg) repeat #666; -- cgit v1.2.3 From dee159317fcb869e470aee0ac6e5a4af06400c97 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 9 Jan 2013 16:33:13 +0100 Subject: Adjust searchbox position --- skins/larry/mail.css | 2 +- skins/larry/styles.css | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'skins') diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 34c623391..33e66d10e 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -332,7 +332,7 @@ a.iconbutton.threadmode.selected { position: absolute; right: 256px; width: auto; - top: 7px; + top: 2px; } #searchfilter select { diff --git a/skins/larry/styles.css b/skins/larry/styles.css index 51dc0363c..d7485e709 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -511,7 +511,7 @@ a.iconlink.upload { /*** basic page layout ***/ #header { - overflow: hidden; /* Chrome bug #1488851 */ + overflow-x: hidden; /* Chrome bug #1488851 */ } #topline { @@ -1503,7 +1503,7 @@ ul.proplist li { #quicksearchbar { position: absolute; right: 1px; - top: 0; + top: -5px; width: 240px; } -- cgit v1.2.3 From 18e23ab763bab2875d4c8fb70034e218ec7c6d14 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 9 Jan 2013 17:50:51 +0100 Subject: Welcome to 2013 --- index.php | 2 +- program/include/iniset.php | 2 +- program/lib/Roundcube/bootstrap.php | 2 +- skins/larry/templates/about.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'skins') diff --git a/index.php b/index.php index aee94e971..3e398c00d 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ | Roundcube Webmail IMAP Client | | Version 0.9-git | | | - | Copyright (C) 2005-2012, The Roundcube Dev Team | + | Copyright (C) 2005-2013, The Roundcube Dev Team | | | | This program is free software: you can redistribute it and/or modify | | it under the terms of the GNU General Public License (with exceptions | diff --git a/program/include/iniset.php b/program/include/iniset.php index be71fc084..35b5522fc 100644 --- a/program/include/iniset.php +++ b/program/include/iniset.php @@ -5,7 +5,7 @@ | program/include/iniset.php | | | | This file is part of the Roundcube Webmail client | - | Copyright (C) 2008-2012, The Roundcube Dev Team | + | Copyright (C) 2008-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/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php index 530a7f855..8cea48122 100644 --- a/program/lib/Roundcube/bootstrap.php +++ b/program/lib/Roundcube/bootstrap.php @@ -3,7 +3,7 @@ /* +-----------------------------------------------------------------------+ | This file is part of the Roundcube PHP suite | - | 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/skins/larry/templates/about.html b/skins/larry/templates/about.html index 2c18e8889..301c301a9 100644 --- a/skins/larry/templates/about.html +++ b/skins/larry/templates/about.html @@ -10,7 +10,7 @@

    Roundcube Webmail

    - +

    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
    -- cgit v1.2.3 From 1f87107b0801a1881d426993c7fca18ca25356b0 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Thu, 10 Jan 2013 09:20:19 +0100 Subject: Fix logo display in IE8 (#1488889) --- skins/larry/iehacks.css | 6 ++++++ skins/larry/styles.css | 1 + 2 files changed, 7 insertions(+) (limited to 'skins') diff --git a/skins/larry/iehacks.css b/skins/larry/iehacks.css index 83ea946fa..357ea220f 100644 --- a/skins/larry/iehacks.css +++ b/skins/larry/iehacks.css @@ -65,6 +65,12 @@ input.button:active { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#404040', endColorstr='#060606', GradientType=0); } +#toplogo { + position: absolute; + top: 0px; + left: 10px; +} + .records-table tr.selected td { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#019bc6', endColorstr='#017cb4', GradientType=0); } diff --git a/skins/larry/styles.css b/skins/larry/styles.css index d7485e709..9386c79d7 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -524,6 +524,7 @@ a.iconlink.upload { } #topnav { + position: relative; height: 46px; margin-bottom: 10px; padding: 0 0 0 10px; -- 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') 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 @@ +
    +
      +
    • +
    • +
    +
    +