From 271efe53e084779a8141228c29b5819d1acd2762 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 17 Oct 2012 22:42:35 +0200 Subject: Add user settings to open message view and compose form in new windows. This natevely implements the compose_newwindow plugin functionslity and more --- config/main.inc.php.dist | 6 ++ program/include/rcube_message.php | 9 +- program/include/rcube_output_html.php | 11 ++- program/js/app.js | 144 ++++++++++++++++++++++-------- program/localization/en_US/labels.inc | 2 + program/steps/addressbook/func.inc | 1 + program/steps/addressbook/mailto.inc | 2 +- program/steps/mail/compose.inc | 19 +++- program/steps/mail/func.inc | 17 ++-- program/steps/mail/show.inc | 1 + program/steps/settings/func.inc | 24 ++++- program/steps/settings/save_prefs.inc | 2 + skins/larry/includes/header.html | 10 ++- skins/larry/mail.css | 4 + skins/larry/styles.css | 4 + skins/larry/templates/compose.html | 5 +- skins/larry/templates/message.html | 10 ++- skins/larry/templates/messagepreview.html | 2 +- 18 files changed, 205 insertions(+), 68 deletions(-) diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist index a6661c323..15052c332 100644 --- a/config/main.inc.php.dist +++ b/config/main.inc.php.dist @@ -724,6 +724,12 @@ $rcmail_config['prefer_html'] = true; // 2 - Always show inline images $rcmail_config['show_images'] = 0; +// open messages in new window +$rcmail_config['message_extwin'] = false; + +// open message compose form in new window +$rcmail_config['compose_extwin'] = false; + // compose html formatted messages by default // 0 - never, 1 - always, 2 - on reply to HTML message, 3 - on forward or reply to HTML message $rcmail_config['htmleditor'] = 0; diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php index 7bf95d1c5..c189df57d 100644 --- a/program/include/rcube_message.php +++ b/program/include/rcube_message.php @@ -210,15 +210,16 @@ class rcube_message if (!$recursive) { $level = explode('.', $part->mime_id); - // Level too high - if (count($level) > 2) { + // Skip if level too deep or part has a file name + if (count($level) > 2 || $part->filename) { continue; } // HTML part can be on the lower level, if not... if (count($level) > 1) { - // It can be an alternative or related message part - $parent = $this->mime_parts[0]; + array_pop($level); + $parent = $this->mime_parts[join('.', $level)]; + // ... parent isn't multipart/alternative or related if ($parent->mimetype != 'multipart/alternative' && $parent->mimetype != 'multipart/related') { continue; } diff --git a/program/include/rcube_output_html.php b/program/include/rcube_output_html.php index 6138e2a30..616ab3883 100644 --- a/program/include/rcube_output_html.php +++ b/program/include/rcube_output_html.php @@ -77,6 +77,9 @@ class rcube_output_html extends rcube_output $this->set_skin($skin); $this->set_env('skin', $skin); + if (!empty($_REQUEST['_extwin'])) + $this->set_env('extwin', 1); + // add common javascripts $this->add_script('var '.rcmail::JS_OBJECT_NAME.' = new rcube_webmail();', 'head_top'); @@ -274,6 +277,8 @@ class rcube_output_html extends rcube_output */ public function redirect($p = array(), $delay = 1) { + if ($this->env['extwin']) + $p['extwin'] = 1; $location = $this->app->url($p); header('Location: ' . $location); exit; @@ -974,7 +979,7 @@ class rcube_output_html extends rcube_output else if (in_array($attrib['command'], $a_static_commands)) { $attrib['href'] = $this->app->url(array('action' => $attrib['command'])); } - else if ($attrib['command'] == 'permaurl' && !empty($this->env['permaurl'])) { + else if (($attrib['command'] == 'permaurl' || $attrib['command'] == 'extwin') && !empty($this->env['permaurl'])) { $attrib['href'] = $this->env['permaurl']; } } @@ -1319,6 +1324,10 @@ class rcube_output_html extends rcube_output $hiddenfield = new html_hiddenfield(array('name' => '_framed', 'value' => '1')); $hidden = $hiddenfield->show(); } + if ($this->env['extwin']) { + $hiddenfield = new html_hiddenfield(array('name' => '_extwin', 'value' => '1')); + $hidden = $hiddenfield->show(); + } if (!$content) $attrib['noclose'] = true; diff --git a/program/js/app.js b/program/js/app.js index 06eb9295c..7e55a3395 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -176,10 +176,10 @@ function rcube_webmail() } // enable general commands - this.enable_command('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', true); if (this.env.permaurl) - this.enable_command('permaurl', true); + this.enable_command('permaurl', 'extwin', true); switch (this.task) { @@ -249,7 +249,7 @@ function rcube_webmail() } } else if (this.env.action == 'compose') { - this.env.compose_commands = ['send-attachment', 'remove-attachment', 'send', 'cancel', 'toggle-editor', 'list-adresses']; + this.env.compose_commands = ['send-attachment', 'remove-attachment', 'send', 'cancel', 'toggle-editor', 'list-adresses', 'extwin']; if (this.env.drafts_mailbox) this.env.compose_commands.push('savedraft') @@ -570,6 +570,19 @@ function rcube_webmail() parent.location.href = this.env.permaurl; break; + case 'extwin': + if (this.env.action == 'compose') { + var prevstate = this.env.compose_extwin; + $("input[name='_action']", this.gui_objects.messageform).val('compose'); + this.gui_objects.messageform.action = this.url('mail/compose', { _id: this.env.compose_id, _extwin: 1 }); + this.gui_objects.messageform.target = this.open_window('about:blank', 1150, 900); + this.gui_objects.messageform.submit(); + } + else { + this.open_window(this.env.permaurl, 1000, 1200); + } + break; + case 'menu-open': case 'menu-save': this.triggerEvent(command, {props:props}); @@ -582,10 +595,18 @@ function rcube_webmail() } break; + case 'close': + if (this.env.extwin) + window.close(); + break; + case 'list': if (props && props != '') this.reset_qsearch(); - if (this.task == 'mail') { + if (this.env.action == 'compose' && this.env.extwin) { + window.close(); + } + else if (this.task == 'mail') { this.list_mailbox(props); this.set_button_titles(); } @@ -641,7 +662,7 @@ function rcube_webmail() uid = this.get_single_uid(); if (uid && (!this.env.uid || uid != this.env.uid)) { if (this.env.mailbox == this.env.drafts_mailbox) - this.goto_url('compose', { _draft_uid: uid, _mbox: this.env.mailbox }, true); + this.open_compose_step({ _draft_uid: uid, _mbox: this.env.mailbox }); else this.show_message(uid); } @@ -670,7 +691,7 @@ function rcube_webmail() else if (this.task == 'mail' && (cid = this.get_single_uid())) { url = { _mbox: this.env.mailbox }; url[this.env.mailbox == this.env.drafts_mailbox && props != 'new' ? '_draft_uid' : '_uid'] = cid; - this.goto_url('compose', url, true); + this.open_compose_step(url); } break; @@ -863,47 +884,46 @@ function rcube_webmail() break; case 'compose': - url = this.url('mail/compose'); + url = {}; if (this.task == 'mail') { - url += '&_mbox='+urlencode(this.env.mailbox); + url._mbox = this.env.mailbox; if (props) - url += '&_to='+urlencode(props); + url._to = props; // also send search request so we can go back to search result after message is sent if (this.env.search_request) - url += '&_search='+this.env.search_request; + url._search = this.env.search_request; } // modify url if we're in addressbook else if (this.task == 'addressbook') { // switch to mail compose step directly if (props && props.indexOf('@') > 0) { - url = this.get_task_url('mail', url); - this.redirect(url + '&_to='+urlencode(props)); - break; - } - - // use contact_id passed as command parameter - var n, len, a_cids = []; - if (props) - a_cids.push(props); - // get selected contacts - else if (this.contact_list) { - var selection = this.contact_list.get_selection(); - for (n=0, len=selection.length; n= 0) + if (this.env.extwin) + url += '&_extwin=1'; + + if (preview && String(target.location.href).indexOf(url) >= 0) { this.show_contentframe(true); + } else { - this.location_href(this.env.comm_path+url, target, true); + if (!preview && this.env.message_extwin && !this.env.extwin) + this.open_window(this.env.comm_path+url, 1000, 1200); + else + this.location_href(this.env.comm_path+url, target, true); // mark as read and change mbox unread counter if (preview && this.message_list && this.message_list.rows[id] && this.message_list.rows[id].unread && this.env.preview_pane_mark_read >= 0) { @@ -2963,6 +3005,17 @@ function rcube_webmail() /********* message compose methods *********/ /*********************************************************/ + this.open_compose_step = function(p) + { + var url = this.url('mail/compose', p); + + // open new compose window + if (this.env.compose_extwin) + this.open_window(url, 1150, 900); + else + this.redirect(url); + }; + // init message compose form: set focus and eventhandlers this.init_messageform = function() { @@ -2977,6 +3030,11 @@ function rcube_webmail() ac_fields = ['cc', 'bcc', 'replyto', 'followupto'], ac_props; + // copy contents from opener (after opening in a new window) + if (window.opener && opener.rcmail && opener.rcmail.env.action == 'compose') { + //opener.history.back(); + } + // configure parallel autocompletion if (this.env.autocomplete_threads > 0) { ac_props = { @@ -3631,8 +3689,16 @@ function rcube_webmail() this.sent_successfully = function(type, msg) { this.display_message(msg, type); - // before redirect we need to wait some time for Chrome (#1486177) - setTimeout(function(){ ref.list_mailbox(); }, 500); + + if (this.env.extwin && window.opener && opener.rcmail) { + this.lock_form(this.gui_objects.messageform); + opener.rcmail.display_message(msg, type); + setTimeout(function(){ window.close() }, 1000); + } + else { + // before redirect we need to wait some time for Chrome (#1486177) + setTimeout(function(){ ref.list_mailbox(); }, 500); + } }; diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index fbc154b88..fcf7fac19 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -383,6 +383,8 @@ $labels['timezone'] = 'Time zone'; $labels['pagesize'] = 'Rows per page'; $labels['signature'] = 'Signature'; $labels['dstactive'] = 'Daylight saving time'; +$labels['showinextwin'] = 'Open message in a new window'; +$labels['composeextwin'] = 'Compose in a new window'; $labels['htmleditor'] = 'Compose HTML messages'; $labels['htmlonreply'] = 'on reply to HTML message'; $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message'; diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index 4ef4d1b51..3a0508025 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -87,6 +87,7 @@ if (!$RCMAIL->action && !$OUTPUT->ajax_call) { $OUTPUT->set_env('search_mods', $search_mods); $OUTPUT->set_env('address_sources', $js_list); $OUTPUT->set_env('writable_source', $writeable); + $OUTPUT->set_env('compose_extwin', $RCMAIL->config->get('compose_extwin',false)); $OUTPUT->set_pagetitle(rcube_label('addressbook')); $_SESSION['addressbooks_count'] = $count; diff --git a/program/steps/addressbook/mailto.inc b/program/steps/addressbook/mailto.inc index 3806c2c87..c3cbcadca 100644 --- a/program/steps/addressbook/mailto.inc +++ b/program/steps/addressbook/mailto.inc @@ -68,7 +68,7 @@ if (!empty($mailto)) $mailto_str = join(', ', $mailto); $mailto_id = substr(md5($mailto_str), 0, 16); $_SESSION['mailto'][$mailto_id] = urlencode($mailto_str); - $OUTPUT->redirect(array('task' => 'mail', '_action' => 'compose', '_mailto' => $mailto_id)); + $OUTPUT->command('open_compose_step', array('_mailto' => $mailto_id)); } else { $OUTPUT->show_message('nocontactsfound', 'warning'); diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 691eca2db..24cd5e425 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -130,6 +130,7 @@ $OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubj 'fileuploaderror', 'sendmessage'); $OUTPUT->set_env('compose_id', $COMPOSE['id']); +$OUTPUT->set_pagetitle(rcube_label('compose')); // add config parameters to client script if (!empty($CONFIG['drafts_mbox'])) { @@ -606,7 +607,10 @@ function rcmail_compose_editor_mode() $html_editor = intval($RCMAIL->config->get('htmleditor')); - if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) { + if (isset($_POST['_is_html'])) { + $useHtml = !empty($_POST['_is_html']); + } + else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) { $useHtml = $MESSAGE->has_html_part(false); } else if ($compose_mode == RCUBE_COMPOSE_REPLY) { @@ -1445,7 +1449,9 @@ function rcmail_receipt_checkbox($attrib) $attrib['value'] = '1'; $checkbox = new html_checkbox($attrib); - if (in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT))) + if (isset($_POST['_receipt'])) + $mdn_default = $_POST['_receipt']; + else if (in_array($compose_mode, array(RCUBE_COMPOSE_DRAFT, RCUBE_COMPOSE_EDIT))) $mdn_default = (bool) $MESSAGE->headers->mdn_to; else $mdn_default = $RCMAIL->config->get('mdn_default'); @@ -1472,8 +1478,13 @@ function rcmail_dsn_checkbox($attrib) $attrib['value'] = '1'; $checkbox = new html_checkbox($attrib); + if (isset($_POST['_dsn'])) + $dsn_value = $_POST['_dsn']; + else + $dsn_value = $RCMAIL->config->get('dsn_default'); + $out = $form_start ? "$form_start\n" : ''; - $out .= $checkbox->show($RCMAIL->config->get('dsn_default')); + $out .= $checkbox->show($dsn_value); $out .= $form_end ? "\n$form_end" : ''; return $out; @@ -1520,7 +1531,7 @@ function rcmail_store_target_selection($attrib) 'folder_filter' => 'mail', 'folder_rights' => 'w', ))); - return $select->show($COMPOSE['param']['sent_mbox'], $attrib); + return $select->show(isset($_POST['_store_target']) ? $_POST['_store_target'] : $COMPOSE['param']['sent_mbox'], $attrib); } diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index c21202588..c18d2cd13 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -101,18 +101,11 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') { $OUTPUT->set_env('quota', true); } - if ($CONFIG['delete_junk']) - $OUTPUT->set_env('delete_junk', true); - if ($CONFIG['flag_for_deletion']) - $OUTPUT->set_env('flag_for_deletion', true); - if ($CONFIG['read_when_deleted']) - $OUTPUT->set_env('read_when_deleted', true); - if ($CONFIG['skip_deleted']) - $OUTPUT->set_env('skip_deleted', true); - if ($CONFIG['display_next']) - $OUTPUT->set_env('display_next', true); - if ($CONFIG['forward_attachment']) - $OUTPUT->set_env('forward_attachment', true); + foreach (array('delete_junk','flag_for_deletion','read_when_deleted','skip_deleted','display_next','message_extwin','compose_extwin','forward_attachment') as $prop) { + if ($CONFIG[$prop]) + $OUTPUT->set_env($prop, true); + } + if ($CONFIG['trash_mbox']) $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']); if ($CONFIG['drafts_mbox']) diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index 029bc5f8d..f89660719 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -59,6 +59,7 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) { $OUTPUT->set_env('permaurl', rcmail_url('show', array('_uid' => $MESSAGE->uid, '_mbox' => $mbox_name))); $OUTPUT->set_env('delimiter', $RCMAIL->storage->get_hierarchy_delimiter()); $OUTPUT->set_env('mailbox', $mbox_name); + $OUTPUT->set_env('compose_extwin', $RCMAIL->config->get('compose_extwin',false)); // mimetypes supported by the browser (default settings) $mimetypes = $RCMAIL->config->get('client_mimetypes', 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,image/bmp,image/tiff,application/x-javascript,application/pdf,application/x-shockwave-flash'); diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index c60d17f30..e94630635 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -129,8 +129,8 @@ function rcmail_user_prefs($current=null) $sections['general'] = array('id' => 'general', 'section' => rcube_label('uisettings')); $sections['mailbox'] = array('id' => 'mailbox', 'section' => rcube_label('mailboxview')); - $sections['compose'] = array('id' => 'compose', 'section' => rcube_label('messagescomposition')); $sections['mailview'] = array('id' => 'mailview','section' => rcube_label('messagesdisplaying')); + $sections['compose'] = array('id' => 'compose', 'section' => rcube_label('messagescomposition')); $sections['addressbook'] = array('id' => 'addressbook','section' => rcube_label('addressbook')); $sections['folders'] = array('id' => 'folders', 'section' => rcube_label('specialfolders')); $sections['server'] = array('id' => 'server', 'section' => rcube_label('serversettings')); @@ -414,6 +414,17 @@ function rcmail_user_prefs($current=null) 'main' => array('name' => Q(rcube_label('mainoptions'))), ); + // show checkbox to open message view in new window + if (!isset($no_override['message_extwin'])) { + $field_id = 'rcmfd_message_extwin'; + $input_msgextwin = new html_checkbox(array('name' => '_message_extwin', 'id' => $field_id, 'value' => 1)); + + $blocks['main']['options']['message_extwin'] = array( + 'title' => html::label($field_id, Q(rcube_label('showinextwin'))), + 'content' => $input_msgextwin->show($config['message_extwin']?1:0), + ); + } + // show checkbox for HTML/plaintext messages if (!isset($no_override['prefer_html'])) { $field_id = 'rcmfd_htmlmsg'; @@ -483,6 +494,17 @@ function rcmail_user_prefs($current=null) 'sig' => array('name' => Q(rcube_label('signatureoptions'))), ); + // show checkbox to compose messages in a new window + if (!isset($no_override['compose_extwin'])) { + $field_id = 'rcmfdcompose_extwin'; + $input_compextwin = new html_checkbox(array('name' => '_compose_extwin', 'id' => $field_id, 'value' => 1)); + + $blocks['main']['options']['compose_extwin'] = array( + 'title' => html::label($field_id, Q(rcube_label('composeextwin'))), + 'content' => $input_compextwin->show($config['compose_extwin']?1:0), + ); + } + if (!isset($no_override['htmleditor'])) { $field_id = 'rcmfd_htmleditor'; $select_htmleditor = new html_select(array('name' => '_htmleditor', 'id' => $field_id)); diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index d1627ecea..db7b134c4 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -59,6 +59,7 @@ switch ($CURR_SECTION) case 'mailview': $a_user_prefs = array( + 'message_extwin' => intval($_POST['_message_extwin']), 'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE, 'inline_images' => isset($_POST['_inline_images']) ? TRUE : FALSE, 'show_images' => isset($_POST['_show_images']) ? intval($_POST['_show_images']) : 0, @@ -70,6 +71,7 @@ switch ($CURR_SECTION) case 'compose': $a_user_prefs = array( + 'compose_extwin' => intval($_POST['_compose_extwin']), 'htmleditor' => intval($_POST['_htmleditor']), 'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0, 'mime_param_folding' => isset($_POST['_mime_param_folding']) ? intval($_POST['_mime_param_folding']) : 0, diff --git a/skins/larry/includes/header.html b/skins/larry/includes/header.html index 9187c6f46..25bcc0b64 100644 --- a/skins/larry/includes/header.html +++ b/skins/larry/includes/header.html @@ -7,11 +7,16 @@
- - + + + + + +
+
@@ -21,6 +26,7 @@
+
diff --git a/skins/larry/mail.css b/skins/larry/mail.css index a2756638d..b819e777b 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -30,6 +30,10 @@ z-index: 3; } +#mailview-right.fullwidth { + left: 0; +} + #mailview-top { position: absolute; top: 42px; diff --git a/skins/larry/styles.css b/skins/larry/styles.css index 340688078..be43668f6 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -637,6 +637,10 @@ a.iconlink.upload { bottom: 20px; } +.extwin #mainscreen { + top: 40px; +} + #mainscreen.offset { top: 130px; } diff --git a/skins/larry/templates/compose.html b/skins/larry/templates/compose.html index d29c1bd2a..33f4ba36b 100644 --- a/skins/larry/templates/compose.html +++ b/skins/larry/templates/compose.html @@ -7,7 +7,7 @@ - +
@@ -108,10 +108,11 @@ -
+
diff --git a/skins/larry/templates/message.html b/skins/larry/templates/message.html index e99f2066a..92bb3589d 100644 --- a/skins/larry/templates/message.html +++ b/skins/larry/templates/message.html @@ -4,7 +4,7 @@ <roundcube:object name="pagetitle" /> - + @@ -12,14 +12,18 @@
+ +
+ +
@@ -32,6 +36,10 @@
+ + +
+
diff --git a/skins/larry/templates/messagepreview.html b/skins/larry/templates/messagepreview.html index de02b050b..ae1a3acc8 100644 --- a/skins/larry/templates/messagepreview.html +++ b/skins/larry/templates/messagepreview.html @@ -36,7 +36,7 @@   - +
-- cgit v1.2.3 From b50a6c843d9f69e926998fcc16fac3ed6fd2f737 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 17 Oct 2012 23:31:25 +0200 Subject: Copy translations from plugin --- program/localization/de_CH/labels.inc | 2 ++ program/localization/de_DE/labels.inc | 2 ++ program/localization/es_ES/labels.inc | 1 + program/localization/it_IT/labels.inc | 1 + program/localization/nl_NL/labels.inc | 1 + program/localization/pt_BR/labels.inc | 1 + program/localization/ru_RU/labels.inc | 1 + 7 files changed, 9 insertions(+) diff --git a/program/localization/de_CH/labels.inc b/program/localization/de_CH/labels.inc index 4164e0333..c693805c5 100644 --- a/program/localization/de_CH/labels.inc +++ b/program/localization/de_CH/labels.inc @@ -323,6 +323,8 @@ $labels['timezone'] = 'Zeitzone'; $labels['pagesize'] = 'Einträge pro Seite'; $labels['signature'] = 'Signatur'; $labels['dstactive'] = 'Sommerzeit'; +$labels['showinextwin'] = 'Nachrichten in neuem Fenster öffnen'; +$labels['composeextwin'] = 'Nachrichten in neuem Fenster verfassen'; $labels['htmleditor'] = 'HTML-Nachrichten verfassen'; $labels['htmlonreply'] = 'nur Antworten auf HTML-Nachrichten'; $labels['htmlsignature'] = 'HTML-Signatur'; diff --git a/program/localization/de_DE/labels.inc b/program/localization/de_DE/labels.inc index 71d5b80f2..18f4d7f1c 100644 --- a/program/localization/de_DE/labels.inc +++ b/program/localization/de_DE/labels.inc @@ -323,6 +323,8 @@ $labels['timezone'] = 'Zeitzone'; $labels['pagesize'] = 'Einträge pro Seite'; $labels['signature'] = 'Signatur'; $labels['dstactive'] = 'Sommerzeit'; +$labels['showinextwin'] = 'Nachrichten in neuem Fenster öffnen'; +$labels['composeextwin'] = 'Nachrichten in neuem Fenster verfassen'; $labels['htmleditor'] = 'HTML-Nachrichten verfassen'; $labels['htmlonreply'] = 'nur Antworten auf HTML-Nachrichten'; $labels['htmlsignature'] = 'HTML-Signatur'; diff --git a/program/localization/es_ES/labels.inc b/program/localization/es_ES/labels.inc index 7425dd7b8..d47bd0f4b 100644 --- a/program/localization/es_ES/labels.inc +++ b/program/localization/es_ES/labels.inc @@ -323,6 +323,7 @@ $labels['timezone'] = 'Zona horaria'; $labels['pagesize'] = 'Filas por página'; $labels['signature'] = 'Firma'; $labels['dstactive'] = 'Cambio de horario'; +$labels['composeextwin'] = 'Redactar en una ventana nueva'; $labels['htmleditor'] = 'Componer mensaje en HTML'; $labels['htmlonreply'] = 'sólo en respuesta a un mensaje HTML'; $labels['htmlsignature'] = 'Firma HTML'; diff --git a/program/localization/it_IT/labels.inc b/program/localization/it_IT/labels.inc index 4d61ace8e..61b48b0cc 100644 --- a/program/localization/it_IT/labels.inc +++ b/program/localization/it_IT/labels.inc @@ -323,6 +323,7 @@ $labels['timezone'] = 'Fuso orario'; $labels['pagesize'] = 'Righe per pagina'; $labels['signature'] = 'Firma'; $labels['dstactive'] = 'Gestione ora legale'; +$labels['composeextwin'] = 'Componi in nuova finestra'; $labels['htmleditor'] = 'Scrivi i messaggi in HTML'; $labels['htmlonreply'] = 'solo in risposta a messaggi HTML'; $labels['htmlsignature'] = 'Firma in HTML'; diff --git a/program/localization/nl_NL/labels.inc b/program/localization/nl_NL/labels.inc index 93537c58b..bb93004ff 100644 --- a/program/localization/nl_NL/labels.inc +++ b/program/localization/nl_NL/labels.inc @@ -323,6 +323,7 @@ $labels['timezone'] = 'Tijdzone'; $labels['pagesize'] = 'Aantal berichten per pagina'; $labels['signature'] = 'Ondertekening'; $labels['dstactive'] = 'Zomertijd'; +$labels['composeextwin'] = 'Berichten in nieuw venster'; $labels['htmleditor'] = 'Berichten opstellen in HTML-opmaak'; $labels['htmlonreply'] = 'alleen bij beantwoorden van HTML-berichten'; $labels['htmlsignature'] = 'HTML-ondertekening'; diff --git a/program/localization/pt_BR/labels.inc b/program/localization/pt_BR/labels.inc index 5abdf205d..ffb8cd244 100644 --- a/program/localization/pt_BR/labels.inc +++ b/program/localization/pt_BR/labels.inc @@ -323,6 +323,7 @@ $labels['timezone'] = 'Fuso horário'; $labels['pagesize'] = 'Mensagens por página'; $labels['signature'] = 'Assinatura'; $labels['dstactive'] = 'Horário de verão'; +$labels['composeextwin'] = 'Escrever em nova janela'; $labels['htmleditor'] = 'Criar mensagens em HTML'; $labels['htmlonreply'] = 'em resposta à mensagem em HTML somente'; $labels['htmlsignature'] = 'Assinatura em HTML'; diff --git a/program/localization/ru_RU/labels.inc b/program/localization/ru_RU/labels.inc index 8b69d22dd..33cb1e43b 100644 --- a/program/localization/ru_RU/labels.inc +++ b/program/localization/ru_RU/labels.inc @@ -323,6 +323,7 @@ $labels['timezone'] = 'Часовой пояс'; $labels['pagesize'] = 'Строк на странице'; $labels['signature'] = 'Подпись'; $labels['dstactive'] = 'Летнее время'; +$labels['composeextwin'] = 'Написать сообщение в новом окне'; $labels['htmleditor'] = 'Создавать сообщения в HTML'; $labels['htmlonreply'] = 'только в ответ на сообщение в HTML'; $labels['htmlsignature'] = 'Подпись в HTML'; -- cgit v1.2.3 From 3bc6ae04ae11a2e84a457a80a3892d6072bcc334 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 17 Oct 2012 23:32:08 +0200 Subject: Adapt classic skin to new extwin feature --- skins/classic/common.css | 5 +++++ skins/classic/includes/messagetoolbar.html | 6 ++++-- skins/classic/mail.css | 19 ++++++++++++++++++- skins/classic/templates/compose.html | 10 +++++++++- skins/classic/templates/message.html | 7 +++++++ skins/classic/templates/messagepreview.html | 2 +- skins/larry/mail.css | 5 +++++ 7 files changed, 49 insertions(+), 5 deletions(-) diff --git a/skins/classic/common.css b/skins/classic/common.css index 735a73614..8f5daee2e 100644 --- a/skins/classic/common.css +++ b/skins/classic/common.css @@ -156,6 +156,11 @@ img left: 20px; } +.extwin #mainscreen +{ + top: 43px; +} + body > #logo { margin-left: 12px; diff --git a/skins/classic/includes/messagetoolbar.html b/skins/classic/includes/messagetoolbar.html index 302e95002..eebb55708 100644 --- a/skins/classic/includes/messagetoolbar.html +++ b/skins/classic/includes/messagetoolbar.html @@ -1,10 +1,12 @@
- + + + - + diff --git a/skins/classic/mail.css b/skins/classic/mail.css index 4b54f22de..08d1266f1 100644 --- a/skins/classic/mail.css +++ b/skins/classic/mail.css @@ -13,6 +13,12 @@ /* border: 1px solid #cccccc; */ } +.extwin #messagetoolbar +{ + top: 5px; + left: 20px; +} + #messagetoolbar a, #messagetoolbar select { @@ -1041,6 +1047,11 @@ td span.branch div.l3 z-index: 1; } +.extwin #messageframe +{ + left: 0; +} + div.messageheaderbox { margin: -14px 8px 0px 8px; @@ -1245,7 +1256,7 @@ div.message-htmlpart div.rcmBody color: #333333; } -#messageviewlink +#openextwinlink { position: absolute; top: 8px; @@ -1255,6 +1266,12 @@ div.message-htmlpart div.rcmBody border: 0; } +#compose-headers #openextwinlink +{ + top: 4px; + right: 2px; +} + #full-headers { color: #666666; diff --git a/skins/classic/templates/compose.html b/skins/classic/templates/compose.html index 1e1403e18..985e62e86 100644 --- a/skins/classic/templates/compose.html +++ b/skins/classic/templates/compose.html @@ -15,15 +15,22 @@ } + + + - +
+ + + + @@ -64,6 +71,7 @@ + diff --git a/skins/classic/templates/message.html b/skins/classic/templates/message.html index c03376e4a..9b7cb9f1c 100644 --- a/skins/classic/templates/message.html +++ b/skins/classic/templates/message.html @@ -12,13 +12,19 @@ } + + + + +
+
@@ -28,6 +34,7 @@
+
diff --git a/skins/classic/templates/messagepreview.html b/skins/classic/templates/messagepreview.html index a606311e1..78b2306f6 100644 --- a/skins/classic/templates/messagepreview.html +++ b/skins/classic/templates/messagepreview.html @@ -7,7 +7,7 @@
- + diff --git a/skins/larry/mail.css b/skins/larry/mail.css index b819e777b..3ec325b6f 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -1174,6 +1174,11 @@ div.message-part blockquote blockquote blockquote { z-index: 100; } +#composebuttons a.button.extwin { + padding: 2px 3px; + margin-top: -3px; +} + .compose-headers { width: 99%; margin: 4px 0; -- cgit v1.2.3 From 715a39416ec44e0e12b967afabbb17233b85e687 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 17 Oct 2012 23:32:32 +0200 Subject: Close compose step in opener window --- program/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 7e55a3395..2c0cf6c39 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3030,9 +3030,9 @@ function rcube_webmail() ac_fields = ['cc', 'bcc', 'replyto', 'followupto'], ac_props; - // copy contents from opener (after opening in a new window) + // close compose step in opener if (window.opener && opener.rcmail && opener.rcmail.env.action == 'compose') { - //opener.history.back(); + opener.history.back(); } // configure parallel autocompletion -- cgit v1.2.3 From edfe79a46fa31b766cc3b44799e682ddec1ac700 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 24 Oct 2012 13:13:43 +0200 Subject: Refactored compose UI according to discussions on the mailing list --- program/localization/de_CH/labels.inc | 3 +- program/localization/de_DE/labels.inc | 3 +- program/localization/en_US/labels.inc | 3 +- skins/larry/ie7hacks.css | 4 -- skins/larry/iehacks.css | 6 +- skins/larry/images/buttons.png | Bin 34940 -> 34993 bytes skins/larry/mail.css | 82 +++++++++++++----------- skins/larry/styles.css | 21 ++++++- skins/larry/svggradients.css | 2 +- skins/larry/templates/compose.html | 101 +++++++++++++++--------------- skins/larry/templates/message.html | 2 +- skins/larry/templates/messagepreview.html | 2 +- skins/larry/ui.js | 16 +++-- 13 files changed, 134 insertions(+), 111 deletions(-) diff --git a/program/localization/de_CH/labels.inc b/program/localization/de_CH/labels.inc index c693805c5..f9f9531e8 100644 --- a/program/localization/de_CH/labels.inc +++ b/program/localization/de_CH/labels.inc @@ -169,8 +169,9 @@ $labels['msgtext'] = 'Ganze Nachricht'; $labels['openinextwin'] = 'In neuem Fenster öffnen'; $labels['emlsave'] = 'Herunterladen (.eml)'; $labels['editasnew'] = 'Als neue Nachricht öffnen'; -$labels['savemessage'] = 'Nachricht speichern'; +$labels['send'] = 'Senden'; $labels['sendmessage'] = 'Nachricht jetzt senden'; +$labels['savemessage'] = 'Nachricht speichern'; $labels['addattachment'] = 'Datei anfügen'; $labels['charset'] = 'Zeichensatz'; $labels['editortype'] = 'Editor-Typ'; diff --git a/program/localization/de_DE/labels.inc b/program/localization/de_DE/labels.inc index 18f4d7f1c..5c6303479 100644 --- a/program/localization/de_DE/labels.inc +++ b/program/localization/de_DE/labels.inc @@ -169,8 +169,9 @@ $labels['msgtext'] = 'Nachricht'; $labels['openinextwin'] = 'In neuem Fenster öffnen'; $labels['emlsave'] = 'Lokal speichern (.eml)'; $labels['editasnew'] = 'Als neue Nachricht öffnen'; -$labels['savemessage'] = 'Nachricht speichern'; +$labels['send'] = 'Senden'; $labels['sendmessage'] = 'Nachricht jetzt senden'; +$labels['savemessage'] = 'Nachricht speichern'; $labels['addattachment'] = 'Datei anfügen'; $labels['charset'] = 'Zeichensatz'; $labels['editortype'] = 'Editor Typ'; diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc index fcf7fac19..2b1397f02 100644 --- a/program/localization/en_US/labels.inc +++ b/program/localization/en_US/labels.inc @@ -203,8 +203,9 @@ $labels['emlsave'] = 'Download (.eml)'; // message compose $labels['editasnew'] = 'Edit as new'; -$labels['savemessage'] = 'Save as draft'; +$labels['send'] = 'Send'; $labels['sendmessage'] = 'Send message'; +$labels['savemessage'] = 'Save as draft'; $labels['addattachment'] = 'Attach a file'; $labels['charset'] = 'Charset'; $labels['editortype'] = 'Editor type'; diff --git a/skins/larry/ie7hacks.css b/skins/larry/ie7hacks.css index 893ffdfef..f07d79a65 100644 --- a/skins/larry/ie7hacks.css +++ b/skins/larry/ie7hacks.css @@ -151,10 +151,6 @@ ul.toolbarmenu li label { bottom: 0; } -#composeoptionsbox { - padding-top: 2px; -} - #composeoptionstoggle { display: inline; top: 3px; diff --git a/skins/larry/iehacks.css b/skins/larry/iehacks.css index 93f483c11..83ea946fa 100644 --- a/skins/larry/iehacks.css +++ b/skins/larry/iehacks.css @@ -147,14 +147,10 @@ ul.toolbarmenu li a.active:hover, filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f0f0f0', GradientType=0); } -#previewheaderstoggle { +.moreheaderstoggle { filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbfbfb', endColorstr='#e9e9e9', GradientType=1); } -#composeoptionsbox { - border-top: 1px solid #999; -} - #messagelist tbody tr td span.branch div { float: left; height: 18px; diff --git a/skins/larry/images/buttons.png b/skins/larry/images/buttons.png index 0d3b5cc7a..c70a96088 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 3ec325b6f..b95be00fc 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -796,7 +796,7 @@ h3.subject { padding-right: 18px; } -#previewheaderstoggle { +.moreheaderstoggle { display: block; position: absolute; top: 0; @@ -815,7 +815,7 @@ h3.subject { border-radius: 3px 0 0 0; /* for Opera */ } -#previewheaderstoggle .iconlink { +.moreheaderstoggle .iconlink { display: inline-block; position: absolute; top: 8px; @@ -825,7 +825,7 @@ h3.subject { background: url(images/buttons.png) -27px -242px no-repeat; } -#previewheaderstoggle.remove .iconlink { +.moreheaderstoggle.remove .iconlink { top: auto; bottom: 5px; background-position: -5px -242px; @@ -842,11 +842,11 @@ div.more-headers { width: 12px; height: 10px; cursor: pointer; - background: url(images/buttons.png) center -1619px no-repeat; + background: url(images/buttons.png) center -1579px no-repeat; } div.hide-headers { - background-position: center -1629px; + background-position: center -1589px; } #all-headers { @@ -1163,12 +1163,13 @@ div.message-part blockquote blockquote blockquote { -moz-box-shadow: 0 2px 3px 0 #999; box-shadow: 0 2px 3px 0 #999; border-bottom: 0; + padding-left: 19px; } #composebuttons { position: absolute; - top: 8px; - right: 8px; + top: 6px; + right: 6px; width: auto; white-space: nowrap; z-index: 100; @@ -1176,21 +1177,21 @@ div.message-part blockquote blockquote blockquote { #composebuttons a.button.extwin { padding: 2px 3px; - margin-top: -3px; } .compose-headers { width: 99%; - margin: 4px 0; + margin-bottom: 2px; } .compose-headers td { - padding: 4px 4px 4px 8px; + padding: 2px 4px; } .compose-headers td.title { width: 11%; white-space: nowrap; + padding-left: 6px; } .compose-headers td.title label { @@ -1234,51 +1235,33 @@ div.message-part blockquote blockquote blockquote { display: none; } -#composeoptionsbox { - padding: 4px 8px 0 8px; - background: #d2d2d2; - border-bottom: 1px solid #e8e8e8; - -webkit-box-shadow: 0 2px 3px 0 #999; - -moz-box-shadow: 0 2px 3px 0 #999; - box-shadow: 0 2px 3px 0 #999; - white-space: nowrap; -} - #composeoptions { display: none; - padding: 2px 0; + padding: 2px 0 0 8px; white-space: normal; + border-top: 1px solid #dfdfdf; + box-shadow: inset 0 1px 0 0 #fff; + -o-box-shadow: inset 0 1px 0 0 #fff; + -webkit-box-shadow: inset 0 1px 0 0 #fff; + -moz-box-shadow: inset 0 1px 0 0 #fff; + } .composeoption { + color: #666; padding-right: 22px; white-space: nowrap; } #composeoptions .composeoption { display: inline-block; - padding: 4px 28px 4px 0; + padding: 4px 22px 4px 0; } #composeoptions .composeoption:last-child { padding-right: 4px; } -#composeoptionstoggle { - display: inline-block; - position: relative; - top: -1px; - left: 6px; - width: 20px; - height: 18px; - background: url(images/buttons.png) -3px -1640px no-repeat; - text-decoration: none; -} - -#composeoptionstoggle.enabled { - background-position: -28px -1640px; -} - #composeview-bottom { position: relative; width: 100%; @@ -1293,6 +1276,10 @@ div.message-part blockquote blockquote blockquote { bottom: 0; } +#composebodycontainer.buttons { + bottom: 42px; +} + #composebody { position: absolute; top: 1px; @@ -1302,15 +1289,22 @@ div.message-part blockquote blockquote blockquote { border: 0; border-radius: 0; padding: 8px 0 8px 8px; - box-shadow: none; resize: none; font-family: monospace; font-size: 9pt; outline: none; + box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.2); + -moz-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.2); + -webkit-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.2); + -o-box-shadow: inset 0 0 2px 1px rgba(0,0,0, 0.2); } #composebody:active, #composebody:focus { + box-shadow: inset 0 0 3px 2px rgba(71,135,177, 0.9); + -moz-box-shadow: inset 0 0 3px 2px rgba(71,135,177, 0.9); + -webkit-box-shadow: inset 0 0 3px 2px rgba(71,135,177, 0.9); + -o-box-shadow: inset 0 0 3px 2px rgba(71,135,177, 0.9); } #compose-attachments { @@ -1350,11 +1344,23 @@ div.message-part blockquote blockquote blockquote { -o-box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9); } +#composeview-bottom .formbuttons.floating { + position: absolute; + width: auto; + right: 260px; + z-index: 200; + padding-bottom: 8px; +} + .defaultSkin table.mceLayout, .defaultSkin table.mceLayout tr.mceLast td { border: 0 !important; } +.defaultSkin table.mceLayout tr.mceFirst td { + background: #dfdfdf; +} + #composebody_toolbargroup { border-bottom: 1px solid #ddd; } diff --git a/skins/larry/styles.css b/skins/larry/styles.css index be43668f6..9127fbe7c 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -1088,7 +1088,8 @@ body.iframe .boxtitle { z-index: 100; } -body.iframe .footerleft.floating { +body.iframe .footerleft.floating, +#composeview-bottom .formbuttons.floating { position: fixed; left: 0; bottom: 0; @@ -1099,7 +1100,8 @@ body.iframe .footerleft.floating { padding-bottom: 12px; } -body.iframe .footerleft.floating:before { +body.iframe .footerleft.floating:before, +#composeview-bottom .formbuttons.floating:before { content: " "; position: absolute; top: -6px; @@ -1480,7 +1482,7 @@ ul.proplist li { } .toolbar a.button.spellcheck.selected { - background-position: left -1580px; + background-position: left -1620px; color: #1978a1; } @@ -1500,6 +1502,19 @@ ul.proplist li { background-position: center -1054px; } +.toolbar a.button.send { + background-position: center -1660px; +} + +.toolbar a.button.savedraft { + background-position: center -1700px; +} + +.toolbar a.button.close { + background-position: 0 -1745px; +} + + a.menuselector { display: inline-block; border: 1px solid #ababab; diff --git a/skins/larry/svggradients.css b/skins/larry/svggradients.css index 5b3fedbfc..06c6f4732 100644 --- a/skins/larry/svggradients.css +++ b/skins/larry/svggradients.css @@ -137,7 +137,7 @@ ul.toolbarmenu li a.active:hover, background-image: url(svggradient.php?c=ffffff;f0f0f0); } -#previewheaderstoggle { +.moreheaderstoggle { background-image: url(svggradient.php?c=fbfbfb;e9e9e9&h=1); } diff --git a/skins/larry/templates/compose.html b/skins/larry/templates/compose.html index 33f4ba36b..2612685a9 100644 --- a/skins/larry/templates/compose.html +++ b/skins/larry/templates/compose.html @@ -9,11 +9,31 @@ -
+ +
+
+ + + + + + + + + + + + + + + +
+
+
@@ -38,25 +58,11 @@
- -
-
- - - - - - - - - -
-
-
+ @@ -109,43 +115,33 @@
-
- -
+
+ - + - -
- - - - - - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + +
+
@@ -155,11 +151,18 @@
- +
+
@@ -172,8 +175,6 @@
-
-
diff --git a/skins/larry/templates/message.html b/skins/larry/templates/message.html index 92bb3589d..f7e188f5f 100644 --- a/skins/larry/templates/message.html +++ b/skins/larry/templates/message.html @@ -42,7 +42,7 @@
- +

diff --git a/skins/larry/templates/messagepreview.html b/skins/larry/templates/messagepreview.html index ae1a3acc8..9eb4d1e00 100644 --- a/skins/larry/templates/messagepreview.html +++ b/skins/larry/templates/messagepreview.html @@ -9,7 +9,7 @@

- +
diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 42d5237ea..12dae3118 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -21,7 +21,6 @@ function rcube_mail_ui() dragmessagemenu: { sticky:1 }, groupmenu: { above:1 }, mailboxmenu: { above:1 }, - composeoptionsmenu: { editable:1, overlap:1 }, spellmenu: { callback: spellmenu }, // toggle: #1486823, #1486930 'attachment-form': { editable:1, above:1, toggle:!bw.ie&&!bw.linux }, @@ -90,8 +89,8 @@ function rcube_mail_ui() show_header_row(fields[f], true); } - $('#composeoptionstoggle').parent().click(function(){ - $('#composeoptionstoggle').toggleClass('enabled'); + $('#composeoptionstoggle').click(function(){ + $('#composeoptionstoggle').toggleClass('remove'); $('#composeoptions').toggle(); layout_composeview(); return false; @@ -354,9 +353,14 @@ function rcube_mail_ui() var body = $('#composebody'), form = $('#compose-content'), bottom = $('#composeview-bottom'), - w, h; + w, h, bh, ovflw, btns = 0, + minheight = 300, - bottom.css('height', (form.height() - bottom.position().top) + 'px'); + bh = (form.height() - bottom.position().top); + ovflw = minheight - bh; + btns = ovflw > -100 ? 0 : 40; + bottom.css('height', Math.max(minheight, bh) + 'px'); + form.css('overflow', ovflw > 0 ? 'auto' : 'hidden'); w = body.parent().width() - 5; h = body.parent().height() - 16; @@ -365,6 +369,8 @@ function rcube_mail_ui() $('#composebody_tbl').width((w+8)+'px').height('').css('margin-top', '1px'); $('#composebody_ifr').width((w+8)+'px').height((h-40)+'px'); $('#googie_edit_layer').height(h+'px'); +// $('#composebodycontainer')[(btns ? 'addClass' : 'removeClass')]('buttons'); +// $('#composeformbuttons')[(btns ? 'show' : 'hide')](); var abooks = $('#directorylist'); $('#compose-contacts .scroller').css('top', abooks.position().top + abooks.outerHeight()); -- cgit v1.2.3 From 838e4204b161b00b0978038b2dcf42b396e8d400 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 24 Oct 2012 16:53:10 +0200 Subject: Fix new (empty) window opening on FF and others --- program/js/app.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 2c0cf6c39..b73148219 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -575,7 +575,7 @@ function rcube_webmail() var prevstate = this.env.compose_extwin; $("input[name='_action']", this.gui_objects.messageform).val('compose'); this.gui_objects.messageform.action = this.url('mail/compose', { _id: this.env.compose_id, _extwin: 1 }); - this.gui_objects.messageform.target = this.open_window('about:blank', 1150, 900); + this.gui_objects.messageform.target = this.open_window('', 1150, 900); this.gui_objects.messageform.submit(); } else { @@ -1672,8 +1672,15 @@ function rcube_webmail() t = Math.max(0, (screen.height - h) / 2 + (screen.top || 0) - 20); var wname = 'rcmextwin' + new Date().getTime(), - extwin = window.open(url + '&_extwin=1', wname, 'width='+w+',height='+h+',top='+t+',left='+l); + extwin = window.open(url + '&_extwin=1', wname, 'width='+w+',height='+h+',top='+t+',left='+l+',resizable=yes,toolbar=no,status=no'); extwin.moveTo(l,t); + + // write loading... message to empty windows + if (!url && extwin.document) { + extwin.document.write('' + this.get_label('loading') + ''); + } + + // focus window, delayed to bring to front window.setTimeout(function(){ extwin.focus(); }, 10); return wname; -- cgit v1.2.3 From eb514742ecf9ca2fb5331d6ccbe2f1a13accd438 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 24 Oct 2012 18:14:31 +0200 Subject: Show compose options if they were visible in opener --- program/js/app.js | 2 +- skins/larry/ui.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/program/js/app.js b/program/js/app.js index b73148219..b80422983 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3039,7 +3039,7 @@ function rcube_webmail() // close compose step in opener if (window.opener && opener.rcmail && opener.rcmail.env.action == 'compose') { - opener.history.back(); + setTimeout(function(){ opener.history.back(); }, 100); } // configure parallel autocompletion diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 12dae3118..da4f2300e 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -96,6 +96,10 @@ function rcube_mail_ui() return false; }).css('cursor', 'pointer'); + // toggle compose options if opened in new window and they were visible before + if (window.opener && opener.rcmail && opener.rcmail.env.action == 'compose' && $('#composeoptionstoggle', opener.document).hasClass('remove')) + $('#composeoptionstoggle').click(); + new rcube_splitter({ id:'composesplitterv', p1:'#composeview-left', p2:'#composeview-right', orientation:'v', relative:true, start:248, min:170, size:12, render:layout_composeview }).init(); } -- cgit v1.2.3 From 9e2ff8ca95bac0b689342bcb79b27645ddaf59b5 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 26 Oct 2012 10:16:53 +0200 Subject: Style improvements in compose screen --- skins/larry/mail.css | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/skins/larry/mail.css b/skins/larry/mail.css index b95be00fc..6d350d714 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -51,7 +51,9 @@ left: 0; bottom: 0; width: 100%; - height: 26px; + height: 27px; + border-radius: 0 0 4px 4px; + border-top: none; } #folderlist-header { @@ -1145,24 +1147,19 @@ div.message-part blockquote blockquote blockquote { background-position: 6px -1627px; } - #compose-content { position: absolute; top: 42px; left: 0; width: 100%; bottom: 28px; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; + border-radius: 4px 4px 0 0; + border-bottom: none; overflow: hidden; } #composeheaders { border-radius: 4px 4px 0 0; - -webkit-box-shadow: 0 2px 3px 0 #999; - -moz-box-shadow: 0 2px 3px 0 #999; - box-shadow: 0 2px 3px 0 #999; - border-bottom: 0; padding-left: 19px; } @@ -1262,6 +1259,10 @@ div.message-part blockquote blockquote blockquote { padding-right: 4px; } +.mozilla .composeoption input { + vertical-align: -3px; +} + #composeview-bottom { position: relative; width: 100%; @@ -1357,8 +1358,12 @@ div.message-part blockquote blockquote blockquote { border: 0 !important; } +.defaultSkin td.mceToolbar { + border: 0 !important; +} + .defaultSkin table.mceLayout tr.mceFirst td { - background: #dfdfdf; + background: #f0f0f0; } #composebody_toolbargroup { -- cgit v1.2.3