Merge branch 'dev-compose-newwindow'

pull/44/head
Thomas Bruederli 12 years ago
commit ddafe4e410

@ -730,6 +730,12 @@ $rcmail_config['prefer_html'] = true;
// 2 - Always show inline images // 2 - Always show inline images
$rcmail_config['show_images'] = 0; $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 // compose html formatted messages by default
// 0 - never, 1 - always, 2 - on reply to HTML message, 3 - on forward or reply to HTML message // 0 - never, 1 - always, 2 - on reply to HTML message, 3 - on forward or reply to HTML message
$rcmail_config['htmleditor'] = 0; $rcmail_config['htmleditor'] = 0;

@ -210,26 +210,16 @@ class rcube_message
if (!$recursive) { if (!$recursive) {
$level = explode('.', $part->mime_id); $level = explode('.', $part->mime_id);
// Level too high // Skip if level too deep or part has a file name
if (count($level) > 2) { if (count($level) > 2 || $part->filename) {
continue; continue;
} }
// HTML part can be on the lower level, if not... // HTML part can be on the lower level, if not...
if (count($level) > 1) { if (count($level) > 1) {
// It can be an alternative or related message part array_pop($level);
// find parent part $parent = $this->mime_parts[join('.', $level)];
$parent = null; // ... parent isn't multipart/alternative or related
foreach ($this->mime_parts as $part) {
if ($part->mime_id == $level[0]) {
$parent = $part;
}
}
if (!$parent) {
continue;
}
if ($parent->mimetype != 'multipart/alternative' && $parent->mimetype != 'multipart/related') { if ($parent->mimetype != 'multipart/alternative' && $parent->mimetype != 'multipart/related') {
continue; continue;
} }

@ -77,6 +77,9 @@ class rcube_output_html extends rcube_output
$this->set_skin($skin); $this->set_skin($skin);
$this->set_env('skin', $skin); $this->set_env('skin', $skin);
if (!empty($_REQUEST['_extwin']))
$this->set_env('extwin', 1);
// add common javascripts // add common javascripts
$this->add_script('var '.rcmail::JS_OBJECT_NAME.' = new rcube_webmail();', 'head_top'); $this->add_script('var '.rcmail::JS_OBJECT_NAME.' = new rcube_webmail();', 'head_top');
@ -298,6 +301,8 @@ class rcube_output_html extends rcube_output
*/ */
public function redirect($p = array(), $delay = 1) public function redirect($p = array(), $delay = 1)
{ {
if ($this->env['extwin'])
$p['extwin'] = 1;
$location = $this->app->url($p); $location = $this->app->url($p);
header('Location: ' . $location); header('Location: ' . $location);
exit; exit;
@ -1068,7 +1073,7 @@ class rcube_output_html extends rcube_output
else if (in_array($attrib['command'], $a_static_commands)) { else if (in_array($attrib['command'], $a_static_commands)) {
$attrib['href'] = $this->app->url(array('action' => $attrib['command'])); $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']; $attrib['href'] = $this->env['permaurl'];
} }
} }
@ -1380,6 +1385,10 @@ class rcube_output_html extends rcube_output
$hiddenfield = new html_hiddenfield(array('name' => '_framed', 'value' => '1')); $hiddenfield = new html_hiddenfield(array('name' => '_framed', 'value' => '1'));
$hidden = $hiddenfield->show(); $hidden = $hiddenfield->show();
} }
if ($this->env['extwin']) {
$hiddenfield = new html_hiddenfield(array('name' => '_extwin', 'value' => '1'));
$hidden = $hiddenfield->show();
}
if (!$content) if (!$content)
$attrib['noclose'] = true; $attrib['noclose'] = true;

@ -176,10 +176,10 @@ function rcube_webmail()
} }
// enable general commands // 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) if (this.env.permaurl)
this.enable_command('permaurl', true); this.enable_command('permaurl', 'extwin', true);
switch (this.task) { switch (this.task) {
@ -249,7 +249,7 @@ function rcube_webmail()
} }
} }
else if (this.env.action == 'compose') { 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) if (this.env.drafts_mailbox)
this.env.compose_commands.push('savedraft') this.env.compose_commands.push('savedraft')
@ -570,6 +570,19 @@ function rcube_webmail()
parent.location.href = this.env.permaurl; parent.location.href = this.env.permaurl;
break; 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('', 1150, 900);
this.gui_objects.messageform.submit();
}
else {
this.open_window(this.env.permaurl, 1000, 1200);
}
break;
case 'menu-open': case 'menu-open':
case 'menu-save': case 'menu-save':
this.triggerEvent(command, {props:props}); this.triggerEvent(command, {props:props});
@ -582,10 +595,18 @@ function rcube_webmail()
} }
break; break;
case 'close':
if (this.env.extwin)
window.close();
break;
case 'list': case 'list':
if (props && props != '') if (props && props != '')
this.reset_qsearch(); 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.list_mailbox(props);
this.set_button_titles(); this.set_button_titles();
} }
@ -640,7 +661,7 @@ function rcube_webmail()
uid = this.get_single_uid(); uid = this.get_single_uid();
if (uid && (!this.env.uid || uid != this.env.uid)) { if (uid && (!this.env.uid || uid != this.env.uid)) {
if (this.env.mailbox == this.env.drafts_mailbox) 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 else
this.show_message(uid); this.show_message(uid);
} }
@ -669,7 +690,7 @@ function rcube_webmail()
else if (this.task == 'mail' && (cid = this.get_single_uid())) { else if (this.task == 'mail' && (cid = this.get_single_uid())) {
url = { _mbox: this.env.mailbox }; url = { _mbox: this.env.mailbox };
url[this.env.mailbox == this.env.drafts_mailbox && props != 'new' ? '_draft_uid' : '_uid'] = cid; 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; break;
@ -862,25 +883,23 @@ function rcube_webmail()
break; break;
case 'compose': case 'compose':
url = this.url('mail/compose'); url = {};
if (this.task == 'mail') { if (this.task == 'mail') {
url += '&_mbox='+urlencode(this.env.mailbox); url._mbox = this.env.mailbox;
if (props) 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 // also send search request so we can go back to search result after message is sent
if (this.env.search_request) if (this.env.search_request)
url += '&_search='+this.env.search_request; url._search = this.env.search_request;
} }
// modify url if we're in addressbook // modify url if we're in addressbook
else if (this.task == 'addressbook') { else if (this.task == 'addressbook') {
// switch to mail compose step directly // switch to mail compose step directly
if (props && props.indexOf('@') > 0) { if (props && props.indexOf('@') > 0) {
url = this.get_task_url('mail', url); url._to = props;
this.redirect(url + '&_to='+urlencode(props));
break;
} }
else {
// use contact_id passed as command parameter // use contact_id passed as command parameter
var n, len, a_cids = []; var n, len, a_cids = [];
if (props) if (props)
@ -893,16 +912,17 @@ function rcube_webmail()
} }
if (a_cids.length) if (a_cids.length)
this.http_post('mailto', { _cid: a_cids.join(','), _source: this.env.source}, true); this.http_post('mailto', { _cid: a_cids.join(','), _source: this.env.source, }, true);
else if (this.env.group) else if (this.env.group)
this.http_post('mailto', { _gid: this.env.group, _source: this.env.source}, true); this.http_post('mailto', { _gid: this.env.group, _source: this.env.source }, true);
break; break;
} }
}
else if (props) else if (props)
url += '&_to='+urlencode(props); url._to = props;
this.redirect(url); this.open_compose_step(url);
break; break;
case 'spellcheck': case 'spellcheck':
@ -977,7 +997,7 @@ function rcube_webmail()
else if (command == 'reply-list') else if (command == 'reply-list')
url._all = 'list'; url._all = 'list';
this.goto_url('compose', url, true); this.open_compose_step(url);
} }
break; break;
@ -987,7 +1007,7 @@ function rcube_webmail()
url = { _forward_uid: uid, _mbox: this.env.mailbox }; url = { _forward_uid: uid, _mbox: this.env.mailbox };
if (command == 'forward-attachment' || (!props && this.env.forward_attachment)) if (command == 'forward-attachment' || (!props && this.env.forward_attachment))
url._attachment = 1; url._attachment = 1;
this.goto_url('compose', url, true); this.open_compose_step(url);
} }
break; break;
@ -1561,7 +1581,7 @@ function rcube_webmail()
var uid = list.get_single_selection(); var uid = list.get_single_selection();
if (uid && this.env.mailbox == this.env.drafts_mailbox) if (uid && 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 if (uid) else if (uid)
this.show_message(uid, false, false); this.show_message(uid, false, false);
}; };
@ -1643,6 +1663,28 @@ function rcube_webmail()
return allow ? (copy ? 2 : 1) : 0; return allow ? (copy ? 2 : 1) : 0;
}; };
this.open_window = function(url, width, height)
{
var w = Math.min(width, screen.width - 10),
h = Math.min(height, screen.height - 100),
l = (screen.width - w) / 2 + (screen.left || 0),
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+',resizable=yes,toolbar=no,status=no');
extwin.moveTo(l,t);
// write loading... message to empty windows
if (!url && extwin.document) {
extwin.document.write('<html><body>' + this.get_label('loading') + '</body></html>');
}
// focus window, delayed to bring to front
window.setTimeout(function(){ extwin.focus(); }, 10);
return wname;
};
/*********************************************************/ /*********************************************************/
/********* (message) list functionality *********/ /********* (message) list functionality *********/
@ -1906,7 +1948,7 @@ function rcube_webmail()
this.list_mailbox('', '', sort_col+'_'+sort_order, post_data); this.list_mailbox('', '', sort_col+'_'+sort_order, post_data);
}; };
// when user doble-clicks on a row // when user double-clicks on a row
this.show_message = function(id, safe, preview) this.show_message = function(id, safe, preview)
{ {
if (!id) if (!id)
@ -1931,9 +1973,16 @@ function rcube_webmail()
// add browser capabilities, so we can properly handle attachments // add browser capabilities, so we can properly handle attachments
url += '&_caps='+urlencode(this.browser_capabilities()); url += '&_caps='+urlencode(this.browser_capabilities());
if (preview && String(target.location.href).indexOf(url) >= 0) if (this.env.extwin)
url += '&_extwin=1';
if (preview && String(target.location.href).indexOf(url) >= 0) {
this.show_contentframe(true); this.show_contentframe(true);
}
else { else {
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); this.location_href(this.env.comm_path+url, target, true);
// mark as read and change mbox unread counter // mark as read and change mbox unread counter
@ -2962,6 +3011,17 @@ function rcube_webmail()
/********* message compose methods *********/ /********* 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 // init message compose form: set focus and eventhandlers
this.init_messageform = function() this.init_messageform = function()
{ {
@ -2976,6 +3036,11 @@ function rcube_webmail()
ac_fields = ['cc', 'bcc', 'replyto', 'followupto'], ac_fields = ['cc', 'bcc', 'replyto', 'followupto'],
ac_props; ac_props;
// close compose step in opener
if (window.opener && opener.rcmail && opener.rcmail.env.action == 'compose') {
setTimeout(function(){ opener.history.back(); }, 100);
}
// configure parallel autocompletion // configure parallel autocompletion
if (this.env.autocomplete_threads > 0) { if (this.env.autocomplete_threads > 0) {
ac_props = { ac_props = {
@ -3630,8 +3695,16 @@ function rcube_webmail()
this.sent_successfully = function(type, msg) this.sent_successfully = function(type, msg)
{ {
this.display_message(msg, type); this.display_message(msg, type);
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) // before redirect we need to wait some time for Chrome (#1486177)
setTimeout(function(){ ref.list_mailbox(); }, 500); setTimeout(function(){ ref.list_mailbox(); }, 500);
}
}; };

@ -169,8 +169,9 @@ $labels['msgtext'] = 'Ganze Nachricht';
$labels['openinextwin'] = 'In neuem Fenster öffnen'; $labels['openinextwin'] = 'In neuem Fenster öffnen';
$labels['emlsave'] = 'Herunterladen (.eml)'; $labels['emlsave'] = 'Herunterladen (.eml)';
$labels['editasnew'] = 'Als neue Nachricht öffnen'; $labels['editasnew'] = 'Als neue Nachricht öffnen';
$labels['savemessage'] = 'Nachricht speichern'; $labels['send'] = 'Senden';
$labels['sendmessage'] = 'Nachricht jetzt senden'; $labels['sendmessage'] = 'Nachricht jetzt senden';
$labels['savemessage'] = 'Nachricht speichern';
$labels['addattachment'] = 'Datei anfügen'; $labels['addattachment'] = 'Datei anfügen';
$labels['charset'] = 'Zeichensatz'; $labels['charset'] = 'Zeichensatz';
$labels['editortype'] = 'Editor-Typ'; $labels['editortype'] = 'Editor-Typ';
@ -323,6 +324,8 @@ $labels['timezone'] = 'Zeitzone';
$labels['pagesize'] = 'Einträge pro Seite'; $labels['pagesize'] = 'Einträge pro Seite';
$labels['signature'] = 'Signatur'; $labels['signature'] = 'Signatur';
$labels['dstactive'] = 'Sommerzeit'; $labels['dstactive'] = 'Sommerzeit';
$labels['showinextwin'] = 'Nachrichten in neuem Fenster öffnen';
$labels['composeextwin'] = 'Nachrichten in neuem Fenster verfassen';
$labels['htmleditor'] = 'HTML-Nachrichten verfassen'; $labels['htmleditor'] = 'HTML-Nachrichten verfassen';
$labels['htmlonreply'] = 'nur Antworten auf HTML-Nachrichten'; $labels['htmlonreply'] = 'nur Antworten auf HTML-Nachrichten';
$labels['htmlsignature'] = 'HTML-Signatur'; $labels['htmlsignature'] = 'HTML-Signatur';

@ -169,8 +169,9 @@ $labels['msgtext'] = 'Nachricht';
$labels['openinextwin'] = 'In neuem Fenster öffnen'; $labels['openinextwin'] = 'In neuem Fenster öffnen';
$labels['emlsave'] = 'Lokal speichern (.eml)'; $labels['emlsave'] = 'Lokal speichern (.eml)';
$labels['editasnew'] = 'Als neue Nachricht öffnen'; $labels['editasnew'] = 'Als neue Nachricht öffnen';
$labels['savemessage'] = 'Nachricht speichern'; $labels['send'] = 'Senden';
$labels['sendmessage'] = 'Nachricht jetzt senden'; $labels['sendmessage'] = 'Nachricht jetzt senden';
$labels['savemessage'] = 'Nachricht speichern';
$labels['addattachment'] = 'Datei anfügen'; $labels['addattachment'] = 'Datei anfügen';
$labels['charset'] = 'Zeichensatz'; $labels['charset'] = 'Zeichensatz';
$labels['editortype'] = 'Editor Typ'; $labels['editortype'] = 'Editor Typ';
@ -323,6 +324,8 @@ $labels['timezone'] = 'Zeitzone';
$labels['pagesize'] = 'Einträge pro Seite'; $labels['pagesize'] = 'Einträge pro Seite';
$labels['signature'] = 'Signatur'; $labels['signature'] = 'Signatur';
$labels['dstactive'] = 'Sommerzeit'; $labels['dstactive'] = 'Sommerzeit';
$labels['showinextwin'] = 'Nachrichten in neuem Fenster öffnen';
$labels['composeextwin'] = 'Nachrichten in neuem Fenster verfassen';
$labels['htmleditor'] = 'HTML-Nachrichten verfassen'; $labels['htmleditor'] = 'HTML-Nachrichten verfassen';
$labels['htmlonreply'] = 'nur Antworten auf HTML-Nachrichten'; $labels['htmlonreply'] = 'nur Antworten auf HTML-Nachrichten';
$labels['htmlsignature'] = 'HTML-Signatur'; $labels['htmlsignature'] = 'HTML-Signatur';

@ -203,8 +203,9 @@ $labels['emlsave'] = 'Download (.eml)';
// message compose // message compose
$labels['editasnew'] = 'Edit as new'; $labels['editasnew'] = 'Edit as new';
$labels['savemessage'] = 'Save as draft'; $labels['send'] = 'Send';
$labels['sendmessage'] = 'Send message'; $labels['sendmessage'] = 'Send message';
$labels['savemessage'] = 'Save as draft';
$labels['addattachment'] = 'Attach a file'; $labels['addattachment'] = 'Attach a file';
$labels['charset'] = 'Charset'; $labels['charset'] = 'Charset';
$labels['editortype'] = 'Editor type'; $labels['editortype'] = 'Editor type';
@ -383,6 +384,8 @@ $labels['timezone'] = 'Time zone';
$labels['pagesize'] = 'Rows per page'; $labels['pagesize'] = 'Rows per page';
$labels['signature'] = 'Signature'; $labels['signature'] = 'Signature';
$labels['dstactive'] = 'Daylight saving time'; $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['htmleditor'] = 'Compose HTML messages';
$labels['htmlonreply'] = 'on reply to HTML message'; $labels['htmlonreply'] = 'on reply to HTML message';
$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message'; $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';

@ -323,6 +323,7 @@ $labels['timezone'] = 'Zona horaria';
$labels['pagesize'] = 'Filas por página'; $labels['pagesize'] = 'Filas por página';
$labels['signature'] = 'Firma'; $labels['signature'] = 'Firma';
$labels['dstactive'] = 'Cambio de horario'; $labels['dstactive'] = 'Cambio de horario';
$labels['composeextwin'] = 'Redactar en una ventana nueva';
$labels['htmleditor'] = 'Componer mensaje en HTML'; $labels['htmleditor'] = 'Componer mensaje en HTML';
$labels['htmlonreply'] = 'sólo en respuesta a un mensaje HTML'; $labels['htmlonreply'] = 'sólo en respuesta a un mensaje HTML';
$labels['htmlsignature'] = 'Firma HTML'; $labels['htmlsignature'] = 'Firma HTML';

@ -323,6 +323,7 @@ $labels['timezone'] = 'Fuso orario';
$labels['pagesize'] = 'Righe per pagina'; $labels['pagesize'] = 'Righe per pagina';
$labels['signature'] = 'Firma'; $labels['signature'] = 'Firma';
$labels['dstactive'] = 'Gestione ora legale'; $labels['dstactive'] = 'Gestione ora legale';
$labels['composeextwin'] = 'Componi in nuova finestra';
$labels['htmleditor'] = 'Scrivi i messaggi in HTML'; $labels['htmleditor'] = 'Scrivi i messaggi in HTML';
$labels['htmlonreply'] = 'solo in risposta a messaggi HTML'; $labels['htmlonreply'] = 'solo in risposta a messaggi HTML';
$labels['htmlsignature'] = 'Firma in HTML'; $labels['htmlsignature'] = 'Firma in HTML';

@ -323,6 +323,7 @@ $labels['timezone'] = 'Tijdzone';
$labels['pagesize'] = 'Aantal berichten per pagina'; $labels['pagesize'] = 'Aantal berichten per pagina';
$labels['signature'] = 'Ondertekening'; $labels['signature'] = 'Ondertekening';
$labels['dstactive'] = 'Zomertijd'; $labels['dstactive'] = 'Zomertijd';
$labels['composeextwin'] = 'Berichten in nieuw venster';
$labels['htmleditor'] = 'Berichten opstellen in HTML-opmaak'; $labels['htmleditor'] = 'Berichten opstellen in HTML-opmaak';
$labels['htmlonreply'] = 'alleen bij beantwoorden van HTML-berichten'; $labels['htmlonreply'] = 'alleen bij beantwoorden van HTML-berichten';
$labels['htmlsignature'] = 'HTML-ondertekening'; $labels['htmlsignature'] = 'HTML-ondertekening';

@ -323,6 +323,7 @@ $labels['timezone'] = 'Fuso horário';
$labels['pagesize'] = 'Mensagens por página'; $labels['pagesize'] = 'Mensagens por página';
$labels['signature'] = 'Assinatura'; $labels['signature'] = 'Assinatura';
$labels['dstactive'] = 'Horário de verão'; $labels['dstactive'] = 'Horário de verão';
$labels['composeextwin'] = 'Escrever em nova janela';
$labels['htmleditor'] = 'Criar mensagens em HTML'; $labels['htmleditor'] = 'Criar mensagens em HTML';
$labels['htmlonreply'] = 'em resposta à mensagem em HTML somente'; $labels['htmlonreply'] = 'em resposta à mensagem em HTML somente';
$labels['htmlsignature'] = 'Assinatura em HTML'; $labels['htmlsignature'] = 'Assinatura em HTML';

@ -323,6 +323,7 @@ $labels['timezone'] = 'Часовой пояс';
$labels['pagesize'] = 'Строк на странице'; $labels['pagesize'] = 'Строк на странице';
$labels['signature'] = 'Подпись'; $labels['signature'] = 'Подпись';
$labels['dstactive'] = 'Летнее время'; $labels['dstactive'] = 'Летнее время';
$labels['composeextwin'] = 'Написать сообщение в новом окне';
$labels['htmleditor'] = 'Создавать сообщения в HTML'; $labels['htmleditor'] = 'Создавать сообщения в HTML';
$labels['htmlonreply'] = 'только в ответ на сообщение в HTML'; $labels['htmlonreply'] = 'только в ответ на сообщение в HTML';
$labels['htmlsignature'] = 'Подпись в HTML'; $labels['htmlsignature'] = 'Подпись в HTML';

@ -87,6 +87,7 @@ if (!$RCMAIL->action && !$OUTPUT->ajax_call) {
$OUTPUT->set_env('search_mods', $search_mods); $OUTPUT->set_env('search_mods', $search_mods);
$OUTPUT->set_env('address_sources', $js_list); $OUTPUT->set_env('address_sources', $js_list);
$OUTPUT->set_env('writable_source', $writeable); $OUTPUT->set_env('writable_source', $writeable);
$OUTPUT->set_env('compose_extwin', $RCMAIL->config->get('compose_extwin',false));
$OUTPUT->set_pagetitle(rcube_label('addressbook')); $OUTPUT->set_pagetitle(rcube_label('addressbook'));
$_SESSION['addressbooks_count'] = $count; $_SESSION['addressbooks_count'] = $count;

@ -68,7 +68,7 @@ if (!empty($mailto))
$mailto_str = join(', ', $mailto); $mailto_str = join(', ', $mailto);
$mailto_id = substr(md5($mailto_str), 0, 16); $mailto_id = substr(md5($mailto_str), 0, 16);
$_SESSION['mailto'][$mailto_id] = urlencode($mailto_str); $_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 { else {
$OUTPUT->show_message('nocontactsfound', 'warning'); $OUTPUT->show_message('nocontactsfound', 'warning');

@ -130,6 +130,7 @@ $OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubj
'fileuploaderror', 'sendmessage'); 'fileuploaderror', 'sendmessage');
$OUTPUT->set_env('compose_id', $COMPOSE['id']); $OUTPUT->set_env('compose_id', $COMPOSE['id']);
$OUTPUT->set_pagetitle(rcube_label('compose'));
// add config parameters to client script // add config parameters to client script
if (!empty($CONFIG['drafts_mbox'])) { if (!empty($CONFIG['drafts_mbox'])) {
@ -606,7 +607,10 @@ function rcmail_compose_editor_mode()
$html_editor = intval($RCMAIL->config->get('htmleditor')); $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); $useHtml = $MESSAGE->has_html_part(false);
} }
else if ($compose_mode == RCUBE_COMPOSE_REPLY) { else if ($compose_mode == RCUBE_COMPOSE_REPLY) {
@ -1445,7 +1449,9 @@ function rcmail_receipt_checkbox($attrib)
$attrib['value'] = '1'; $attrib['value'] = '1';
$checkbox = new html_checkbox($attrib); $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; $mdn_default = (bool) $MESSAGE->headers->mdn_to;
else else
$mdn_default = $RCMAIL->config->get('mdn_default'); $mdn_default = $RCMAIL->config->get('mdn_default');
@ -1472,8 +1478,13 @@ function rcmail_dsn_checkbox($attrib)
$attrib['value'] = '1'; $attrib['value'] = '1';
$checkbox = new html_checkbox($attrib); $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 = $form_start ? "$form_start\n" : '';
$out .= $checkbox->show($RCMAIL->config->get('dsn_default')); $out .= $checkbox->show($dsn_value);
$out .= $form_end ? "\n$form_end" : ''; $out .= $form_end ? "\n$form_end" : '';
return $out; return $out;
@ -1520,7 +1531,7 @@ function rcmail_store_target_selection($attrib)
'folder_filter' => 'mail', 'folder_filter' => 'mail',
'folder_rights' => 'w', '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);
} }

@ -101,18 +101,11 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
$OUTPUT->set_env('quota', true); $OUTPUT->set_env('quota', true);
} }
if ($CONFIG['delete_junk']) foreach (array('delete_junk','flag_for_deletion','read_when_deleted','skip_deleted','display_next','message_extwin','compose_extwin','forward_attachment') as $prop) {
$OUTPUT->set_env('delete_junk', true); if ($CONFIG[$prop])
if ($CONFIG['flag_for_deletion']) $OUTPUT->set_env($prop, true);
$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);
if ($CONFIG['trash_mbox']) if ($CONFIG['trash_mbox'])
$OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']); $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']);
if ($CONFIG['drafts_mbox']) if ($CONFIG['drafts_mbox'])

@ -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('permaurl', rcmail_url('show', array('_uid' => $MESSAGE->uid, '_mbox' => $mbox_name)));
$OUTPUT->set_env('delimiter', $RCMAIL->storage->get_hierarchy_delimiter()); $OUTPUT->set_env('delimiter', $RCMAIL->storage->get_hierarchy_delimiter());
$OUTPUT->set_env('mailbox', $mbox_name); $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 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'); $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');

@ -129,8 +129,8 @@ function rcmail_user_prefs($current=null)
$sections['general'] = array('id' => 'general', 'section' => rcube_label('uisettings')); $sections['general'] = array('id' => 'general', 'section' => rcube_label('uisettings'));
$sections['mailbox'] = array('id' => 'mailbox', 'section' => rcube_label('mailboxview')); $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['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['addressbook'] = array('id' => 'addressbook','section' => rcube_label('addressbook'));
$sections['folders'] = array('id' => 'folders', 'section' => rcube_label('specialfolders')); $sections['folders'] = array('id' => 'folders', 'section' => rcube_label('specialfolders'));
$sections['server'] = array('id' => 'server', 'section' => rcube_label('serversettings')); $sections['server'] = array('id' => 'server', 'section' => rcube_label('serversettings'));
@ -411,6 +411,17 @@ function rcmail_user_prefs($current=null)
'main' => array('name' => Q(rcube_label('mainoptions'))), '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 // show checkbox for HTML/plaintext messages
if (!isset($no_override['prefer_html'])) { if (!isset($no_override['prefer_html'])) {
$field_id = 'rcmfd_htmlmsg'; $field_id = 'rcmfd_htmlmsg';
@ -480,6 +491,17 @@ function rcmail_user_prefs($current=null)
'sig' => array('name' => Q(rcube_label('signatureoptions'))), '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'])) { if (!isset($no_override['htmleditor'])) {
$field_id = 'rcmfd_htmleditor'; $field_id = 'rcmfd_htmleditor';
$select_htmleditor = new html_select(array('name' => '_htmleditor', 'id' => $field_id)); $select_htmleditor = new html_select(array('name' => '_htmleditor', 'id' => $field_id));

@ -59,6 +59,7 @@ switch ($CURR_SECTION)
case 'mailview': case 'mailview':
$a_user_prefs = array( $a_user_prefs = array(
'message_extwin' => intval($_POST['_message_extwin']),
'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE, 'prefer_html' => isset($_POST['_prefer_html']) ? TRUE : FALSE,
'inline_images' => isset($_POST['_inline_images']) ? TRUE : FALSE, 'inline_images' => isset($_POST['_inline_images']) ? TRUE : FALSE,
'show_images' => isset($_POST['_show_images']) ? intval($_POST['_show_images']) : 0, 'show_images' => isset($_POST['_show_images']) ? intval($_POST['_show_images']) : 0,
@ -70,6 +71,7 @@ switch ($CURR_SECTION)
case 'compose': case 'compose':
$a_user_prefs = array( $a_user_prefs = array(
'compose_extwin' => intval($_POST['_compose_extwin']),
'htmleditor' => intval($_POST['_htmleditor']), 'htmleditor' => intval($_POST['_htmleditor']),
'draft_autosave' => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0, '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, 'mime_param_folding' => isset($_POST['_mime_param_folding']) ? intval($_POST['_mime_param_folding']) : 0,

@ -156,6 +156,11 @@ img
left: 20px; left: 20px;
} }
.extwin #mainscreen
{
top: 43px;
}
body > #logo body > #logo
{ {
margin-left: 12px; margin-left: 12px;

@ -1,10 +1,12 @@
<div id="messagetoolbar"> <div id="messagetoolbar">
<roundcube:if condition="template:name == 'message'" /> <roundcube:if condition="template:name == 'message' && env:extwin" />
<roundcube:button command="close" type="link" class="button back" classAct="button back" classSel="button backSel" title="close" content=" " />
<roundcube:elseif condition="template:name == 'message'" />
<roundcube:button command="list" type="link" class="button back" classAct="button back" classSel="button backSel" title="backtolist" content=" " /> <roundcube:button command="list" type="link" class="button back" classAct="button back" classSel="button backSel" title="backtolist" content=" " />
<roundcube:else /> <roundcube:else />
<roundcube:button command="checkmail" type="link" class="button checkmail" classAct="button checkmail" classSel="button checkmailSel" title="checkmail" content=" " /> <roundcube:button command="checkmail" type="link" class="button checkmail" classAct="button checkmail" classSel="button checkmailSel" title="checkmail" content=" " />
<roundcube:endif />
<roundcube:button command="compose" type="link" class="button compose" classAct="button compose" classSel="button composeSel" title="writenewmessage" content=" " /> <roundcube:button command="compose" type="link" class="button compose" classAct="button compose" classSel="button composeSel" title="writenewmessage" content=" " />
<roundcube:endif />
<roundcube:button command="reply" type="link" class="buttonPas reply" classAct="button reply" classSel="button replySel" title="replytomessage" content=" " /> <roundcube:button command="reply" type="link" class="buttonPas reply" classAct="button reply" classSel="button replySel" title="replytomessage" content=" " />
<span class="dropbutton"> <span class="dropbutton">
<roundcube:button command="reply-all" type="link" class="buttonPas replyAll" classAct="button replyAll" classSel="button replyAllSel" title="replytoallmessage" content=" " /> <roundcube:button command="reply-all" type="link" class="buttonPas replyAll" classAct="button replyAll" classSel="button replyAllSel" title="replytoallmessage" content=" " />

@ -13,6 +13,12 @@
/* border: 1px solid #cccccc; */ /* border: 1px solid #cccccc; */
} }
.extwin #messagetoolbar
{
top: 5px;
left: 20px;
}
#messagetoolbar a, #messagetoolbar a,
#messagetoolbar select #messagetoolbar select
{ {
@ -1039,6 +1045,11 @@ td span.branch div.l3
z-index: 1; z-index: 1;
} }
.extwin #messageframe
{
left: 0;
}
div.messageheaderbox div.messageheaderbox
{ {
margin: -14px 8px 0px 8px; margin: -14px 8px 0px 8px;
@ -1243,7 +1254,7 @@ div.message-htmlpart div.rcmBody
color: #333333; color: #333333;
} }
#messageviewlink #openextwinlink
{ {
position: absolute; position: absolute;
top: 8px; top: 8px;
@ -1253,6 +1264,12 @@ div.message-htmlpart div.rcmBody
border: 0; border: 0;
} }
#compose-headers #openextwinlink
{
top: 4px;
right: 2px;
}
#full-headers #full-headers
{ {
color: #666666; color: #666666;

@ -15,15 +15,22 @@
} }
</style> </style>
</head> </head>
<roundcube:if condition="env:extwin" />
<body class="extwin" onload="rcube_init_mail_ui()">
<roundcube:else />
<body onload="rcube_init_mail_ui()"> <body onload="rcube_init_mail_ui()">
<roundcube:include file="/includes/taskbar.html" /> <roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" /> <roundcube:include file="/includes/header.html" />
<roundcube:endif />
<form name="form" action="./" method="post"> <form name="form" action="./" method="post">
<div id="messagetoolbar"> <div id="messagetoolbar">
<roundcube:if condition="env:extwin" />
<roundcube:button command="close" type="link" class="button back" classAct="button back" classSel="button backSel" title="close" content=" " />
<roundcube:else />
<roundcube:button command="list" type="link" class="button back" classAct="button back" classSel="button backSel" title="backtolist" content=" " /> <roundcube:button command="list" type="link" class="button back" classAct="button back" classSel="button backSel" title="backtolist" content=" " />
<roundcube:endif />
<roundcube:button command="send" type="link" class="buttonPas send" classAct="button send" classSel="button sendSel" title="sendmessage" content=" " /> <roundcube:button command="send" type="link" class="buttonPas send" classAct="button send" classSel="button sendSel" title="sendmessage" content=" " />
<roundcube:if condition="config:enable_spellcheck" /> <roundcube:if condition="config:enable_spellcheck" />
<span class="dropbutton"> <span class="dropbutton">
@ -64,6 +71,7 @@
<td class="editfield formlinks"> <td class="editfield formlinks">
<roundcube:object name="composeHeaders" part="from" form="form" id="_from" tabindex="1" /> <roundcube:object name="composeHeaders" part="from" form="form" id="_from" tabindex="1" />
<a href="#identities" onclick="return rcmail.command('identities')"><roundcube:label name="editidents" /></a> <a href="#identities" onclick="return rcmail.command('identities')"><roundcube:label name="editidents" /></a>
<roundcube:button command="extwin" image="/images/icons/extwin.png" width="15" height="15" title="openinextwin" id="openextwinlink" condition="!env:extwin" />
</td> </td>
</tr><tr> </tr><tr>
<td class="title top"><label for="_to"><roundcube:label name="to" /></label></td> <td class="title top"><label for="_to"><roundcube:label name="to" /></label></td>

@ -12,13 +12,19 @@
} }
</style> </style>
</head> </head>
<roundcube:if condition="env:extwin" />
<body class="extwin" onload="rcube_init_mail_ui()">
<roundcube:else />
<body onload="rcube_init_mail_ui()"> <body onload="rcube_init_mail_ui()">
<roundcube:include file="/includes/taskbar.html" /> <roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" /> <roundcube:include file="/includes/header.html" />
<roundcube:endif />
<roundcube:include file="/includes/messagetoolbar.html" /> <roundcube:include file="/includes/messagetoolbar.html" />
<div id="mainscreen"> <div id="mainscreen">
<roundcube:if condition="!env:extwin" />
<div id="mailleftcontainer"> <div id="mailleftcontainer">
<div id="mailboxlist-container"> <div id="mailboxlist-container">
<div id="mailboxlist-title" class="boxtitle"><roundcube:label name="mailboxlist" /></div> <div id="mailboxlist-title" class="boxtitle"><roundcube:label name="mailboxlist" /></div>
@ -28,6 +34,7 @@
<div class="boxfooter"></div> <div class="boxfooter"></div>
</div> </div>
</div> </div>
<roundcube:endif />
<div id="messageframe"> <div id="messageframe">
<div class="boxlistcontent" style="top:0; overflow-x:auto"> <div class="boxlistcontent" style="top:0; overflow-x:auto">

@ -7,7 +7,7 @@
<body class="iframe"> <body class="iframe">
<div class="messageheaderbox"> <div class="messageheaderbox">
<roundcube:button command="permaurl" image="/images/icons/extwin.png" width="15" height="15" title="openinextwin" id="messageviewlink" target="_blank" /> <roundcube:button command="extwin" image="/images/icons/extwin.png" width="15" height="15" title="openinextwin" id="openextwinlink" />
<roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" addicon="/images/icons/silhouette.png" summary="Message headers" /> <roundcube:object name="messageHeaders" class="headers-table" cellspacing="0" cellpadding="2" addicon="/images/icons/silhouette.png" summary="Message headers" />
<roundcube:object name="messageFullHeaders" id="full-headers" /> <roundcube:object name="messageFullHeaders" id="full-headers" />
<roundcube:object name="messageAttachments" id="attachment-list" /> <roundcube:object name="messageAttachments" id="attachment-list" />

@ -151,10 +151,6 @@ ul.toolbarmenu li label {
bottom: 0; bottom: 0;
} }
#composeoptionsbox {
padding-top: 2px;
}
#composeoptionstoggle { #composeoptionstoggle {
display: inline; display: inline;
top: 3px; top: 3px;

@ -147,14 +147,10 @@ ul.toolbarmenu li a.active:hover,
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f0f0f0', GradientType=0); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f0f0f0', GradientType=0);
} }
#previewheaderstoggle { .moreheaderstoggle {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbfbfb', endColorstr='#e9e9e9', GradientType=1); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbfbfb', endColorstr='#e9e9e9', GradientType=1);
} }
#composeoptionsbox {
border-top: 1px solid #999;
}
#messagelist tbody tr td span.branch div { #messagelist tbody tr td span.branch div {
float: left; float: left;
height: 18px; height: 18px;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

@ -7,11 +7,16 @@
<roundcube:endif /> <roundcube:endif />
</div> </div>
<div class="topright"> <div class="topright">
<roundcube:if condition="!env:extwin" />
<span class="username"><roundcube:object name="username" /></span> <span class="username"><roundcube:object name="username" /></span>
<roundcube:button command="logout" label="logout" class="button-logout" /> <roundcube:button command="logout" label="logout" class="button-logout" />
<roundcube:else />
<roundcube:button command="close" label="close" class="closelink" />
<roundcube:endif />
</div> </div>
</div> </div>
<roundcube:if condition="!env:extwin" />
<div id="topnav"> <div id="topnav">
<div id="taskbar" class="topright"> <div id="taskbar" class="topright">
<roundcube:button command="mail" label="mail" class="button-mail" classSel="button-mail button-selected" innerClass="button-inner" /> <roundcube:button command="mail" label="mail" class="button-mail" classSel="button-mail button-selected" innerClass="button-inner" />
@ -21,6 +26,7 @@
</div> </div>
<roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" border="0" alt="Logo" onclick="rcmail.command('switch-task','mail');return false;" /> <roundcube:object name="logo" src="/images/roundcube_logo.png" id="toplogo" border="0" alt="Logo" onclick="rcmail.command('switch-task','mail');return false;" />
</div> </div>
<roundcube:endif />
<br style="clear:both" /> <br style="clear:both" />
</div> </div>

@ -30,6 +30,10 @@
z-index: 3; z-index: 3;
} }
#mailview-right.fullwidth {
left: 0;
}
#mailview-top { #mailview-top {
position: absolute; position: absolute;
top: 42px; top: 42px;
@ -47,7 +51,9 @@
left: 0; left: 0;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 26px; height: 27px;
border-radius: 0 0 4px 4px;
border-top: none;
} }
#folderlist-header { #folderlist-header {
@ -795,7 +801,7 @@ h3.subject {
padding-right: 18px; padding-right: 18px;
} }
#previewheaderstoggle { .moreheaderstoggle {
display: block; display: block;
position: absolute; position: absolute;
top: 0; top: 0;
@ -814,7 +820,7 @@ h3.subject {
border-radius: 3px 0 0 0; /* for Opera */ border-radius: 3px 0 0 0; /* for Opera */
} }
#previewheaderstoggle .iconlink { .moreheaderstoggle .iconlink {
display: inline-block; display: inline-block;
position: absolute; position: absolute;
top: 8px; top: 8px;
@ -824,7 +830,7 @@ h3.subject {
background: url(images/buttons.png) -27px -242px no-repeat; background: url(images/buttons.png) -27px -242px no-repeat;
} }
#previewheaderstoggle.remove .iconlink { .moreheaderstoggle.remove .iconlink {
top: auto; top: auto;
bottom: 5px; bottom: 5px;
background-position: -5px -242px; background-position: -5px -242px;
@ -841,11 +847,11 @@ div.more-headers {
width: 12px; width: 12px;
height: 10px; height: 10px;
cursor: pointer; cursor: pointer;
background: url(images/buttons.png) center -1619px no-repeat; background: url(images/buttons.png) center -1579px no-repeat;
} }
div.hide-headers { div.hide-headers {
background-position: center -1629px; background-position: center -1589px;
} }
#all-headers { #all-headers {
@ -1151,47 +1157,48 @@ div.message-part blockquote blockquote blockquote {
background-position: 6px -1627px; background-position: 6px -1627px;
} }
#compose-content { #compose-content {
position: absolute; position: absolute;
top: 42px; top: 42px;
left: 0; left: 0;
width: 100%; width: 100%;
bottom: 28px; bottom: 28px;
border-bottom-left-radius: 0; border-radius: 4px 4px 0 0;
border-bottom-right-radius: 0; border-bottom: none;
overflow: hidden; overflow: hidden;
} }
#composeheaders { #composeheaders {
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
-webkit-box-shadow: 0 2px 3px 0 #999; padding-left: 19px;
-moz-box-shadow: 0 2px 3px 0 #999;
box-shadow: 0 2px 3px 0 #999;
border-bottom: 0;
} }
#composebuttons { #composebuttons {
position: absolute; position: absolute;
top: 8px; top: 6px;
right: 8px; right: 6px;
width: auto; width: auto;
white-space: nowrap; white-space: nowrap;
z-index: 100; z-index: 100;
} }
#composebuttons a.button.extwin {
padding: 2px 3px;
}
.compose-headers { .compose-headers {
width: 99%; width: 99%;
margin: 4px 0; margin-bottom: 2px;
} }
.compose-headers td { .compose-headers td {
padding: 4px 4px 4px 8px; padding: 2px 4px;
} }
.compose-headers td.title { .compose-headers td.title {
width: 11%; width: 11%;
white-space: nowrap; white-space: nowrap;
padding-left: 6px;
} }
.compose-headers td.title label { .compose-headers td.title label {
@ -1235,49 +1242,35 @@ div.message-part blockquote blockquote blockquote {
display: none; 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 { #composeoptions {
display: none; display: none;
padding: 2px 0; padding: 2px 0 0 8px;
white-space: normal; 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 { .composeoption {
color: #666;
padding-right: 22px; padding-right: 22px;
white-space: nowrap; white-space: nowrap;
} }
#composeoptions .composeoption { #composeoptions .composeoption {
display: inline-block; display: inline-block;
padding: 4px 28px 4px 0; padding: 4px 22px 4px 0;
} }
#composeoptions .composeoption:last-child { #composeoptions .composeoption:last-child {
padding-right: 4px; padding-right: 4px;
} }
#composeoptionstoggle { .mozilla .composeoption input {
display: inline-block; vertical-align: -3px;
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 { #composeview-bottom {
@ -1294,6 +1287,10 @@ div.message-part blockquote blockquote blockquote {
bottom: 0; bottom: 0;
} }
#composebodycontainer.buttons {
bottom: 42px;
}
#composebody { #composebody {
position: absolute; position: absolute;
top: 1px; top: 1px;
@ -1303,15 +1300,22 @@ div.message-part blockquote blockquote blockquote {
border: 0; border: 0;
border-radius: 0; border-radius: 0;
padding: 8px 0 8px 8px; padding: 8px 0 8px 8px;
box-shadow: none;
resize: none; resize: none;
font-family: monospace; font-family: monospace;
font-size: 9pt; font-size: 9pt;
outline: none; 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:active,
#composebody:focus { #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 { #compose-attachments {
@ -1351,11 +1355,27 @@ div.message-part blockquote blockquote blockquote {
-o-box-shadow: 0 0 5px 2px rgba(71,135,177, 0.9); -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,
.defaultSkin table.mceLayout tr.mceLast td { .defaultSkin table.mceLayout tr.mceLast td {
border: 0 !important; border: 0 !important;
} }
.defaultSkin td.mceToolbar {
border: 0 !important;
}
.defaultSkin table.mceLayout tr.mceFirst td {
background: #f0f0f0;
}
#composebody_toolbargroup { #composebody_toolbargroup {
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
} }

@ -637,6 +637,10 @@ a.iconlink.upload {
bottom: 20px; bottom: 20px;
} }
.extwin #mainscreen {
top: 40px;
}
#mainscreen.offset { #mainscreen.offset {
top: 130px; top: 130px;
} }
@ -1084,7 +1088,8 @@ body.iframe .boxtitle {
z-index: 100; z-index: 100;
} }
body.iframe .footerleft.floating { body.iframe .footerleft.floating,
#composeview-bottom .formbuttons.floating {
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
@ -1095,7 +1100,8 @@ body.iframe .footerleft.floating {
padding-bottom: 12px; padding-bottom: 12px;
} }
body.iframe .footerleft.floating:before { body.iframe .footerleft.floating:before,
#composeview-bottom .formbuttons.floating:before {
content: " "; content: " ";
position: absolute; position: absolute;
top: -6px; top: -6px;
@ -1476,7 +1482,7 @@ ul.proplist li {
} }
.toolbar a.button.spellcheck.selected { .toolbar a.button.spellcheck.selected {
background-position: left -1580px; background-position: left -1620px;
color: #1978a1; color: #1978a1;
} }
@ -1496,6 +1502,19 @@ ul.proplist li {
background-position: center -1054px; 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 { a.menuselector {
display: inline-block; display: inline-block;
border: 1px solid #ababab; border: 1px solid #ababab;

@ -137,7 +137,7 @@ ul.toolbarmenu li a.active:hover,
background-image: url(svggradient.php?c=ffffff;f0f0f0); background-image: url(svggradient.php?c=ffffff;f0f0f0);
} }
#previewheaderstoggle { .moreheaderstoggle {
background-image: url(svggradient.php?c=fbfbfb;e9e9e9&h=1); background-image: url(svggradient.php?c=fbfbfb;e9e9e9&h=1);
} }

@ -7,13 +7,33 @@
<link rel="stylesheet" type="text/css" href="/googiespell.css" /> <link rel="stylesheet" type="text/css" href="/googiespell.css" />
<roundcube:endif /> <roundcube:endif />
</head> </head>
<body> <roundcube:if condition="env:extwin" /><body class="extwin"><roundcube:else /><body><roundcube:endif />
<div class="minwidth">
<roundcube:include file="/includes/header.html" /> <roundcube:include file="/includes/header.html" />
<div id="mainscreen"> <div id="mainscreen">
<!-- toolbar -->
<div id="messagetoolbar" class="fullwidth">
<div id="mailtoolbar" class="toolbar">
<roundcube:button command="list" type="link" class="button back disabled" classAct="button back" classSel="button back pressed" label="cancel" condition="!env:extwin" />
<roundcube:button command="close" type="link" class="button close disabled" classAct="button close" classSel="button close pressed" label="cancel" condition="env:extwin" />
<span class="spacer"></span>
<roundcube:button command="send" type="link" class="button send" classAct="button send" classSel="button send pressed" label="send" title="sendmessage" />
<roundcube:button command="savedraft" type="link" class="button savedraft" classAct="button savedraft" classSel="button savedraft pressed" label="save" title="savemessage" />
<span class="spacer"></span>
<roundcube:if condition="config:enable_spellcheck" />
<span class="dropbutton">
<roundcube:button command="spellcheck" type="link" class="button spellcheck disabled" classAct="button spellcheck" classSel="button spellcheck pressed" label="spellcheck" title="checkspelling" />
<span class="dropbuttontip" id="spellmenulink" onclick="UI.show_popup('spellmenu');return false"></span>
</span>
<roundcube:endif />
<roundcube:button name="addattachment" type="link" class="button attach" classAct="button attach" classSel="button attach pressed" label="attach" title="addattachment" onclick="UI.show_uploadform();return false" />
<roundcube:button command="insert-sig" type="link" class="button insertsig disabled" classAct="button insertsig" classSel="button insertsig pressed" label="signature" title="insertsignature" />
<roundcube:container name="toolbar" id="compose-toolbar" />
</div>
</div>
<div id="composeview-left"> <div id="composeview-left">
<!-- inline address book --> <!-- inline address book -->
@ -38,25 +58,11 @@
<div id="composeview-right"> <div id="composeview-right">
<!-- toolbar -->
<div id="messagetoolbar" class="fullwidth">
<div id="mailtoolbar" class="toolbar">
<roundcube:if condition="config:enable_spellcheck" />
<span class="dropbutton">
<roundcube:button command="spellcheck" type="link" class="button spellcheck disabled" classAct="button spellcheck" classSel="button spellcheck pressed" label="spellcheck" title="checkspelling" />
<span class="dropbuttontip" id="spellmenulink" onclick="UI.show_popup('spellmenu');return false"></span>
</span>
<roundcube:endif />
<roundcube:button name="addattachment" type="link" class="button attach" classAct="button attach" classSel="button attach pressed" label="attach" title="addattachment" onclick="UI.show_uploadform();return false" />
<roundcube:button command="insert-sig" type="link" class="button insertsig disabled" classAct="button insertsig" classSel="button insertsig pressed" label="signature" title="insertsignature" />
<roundcube:container name="toolbar" id="compose-toolbar" />
</div>
</div>
<form name="form" action="./" method="post" id="compose-content" class="uibox"> <form name="form" action="./" method="post" id="compose-content" class="uibox">
<!-- message headers --> <!-- message headers -->
<div id="composeheaders"> <div id="composeheaders">
<a href="#options" id="composeoptionstoggle" class="moreheaderstoggle"><span class="iconlink" title="<roundcube:label name='options' />"></span></a>
<table class="headers-table compose-headers"> <table class="headers-table compose-headers">
<tbody> <tbody>
@ -108,22 +114,12 @@
</tbody> </tbody>
</table> </table>
<div id="composebuttons" class="formbuttons"> <div id="composebuttons" class="pagenav formbuttons">
<roundcube:button type="input" command="send" class="button mainaction" label="sendmessage" tabindex="11" /> <roundcube:button command="extwin" type="link" class="button extwin" classSel="button extwin pressed" innerClass="inner" title="openinextwin" content="[]" condition="!env:extwin" />
<roundcube:button type="input" command="savedraft" class="button" label="savemessage" tabindex="12" />
<roundcube:button type="input" command="list" class="button" label="cancel" tabindex="13" />
</div>
</div> </div>
<!-- (collapsable) message options --> <!-- (collapsable) message options -->
<div id="composeoptionsbox"> <div id="composeoptions">
<span class="composeoption">
<label><roundcube:label name="options" />
<a href="#options" id="composeoptionstoggle">&nbsp;</a></label>
</span>
<div id="composeoptions">
<roundcube:if condition="!in_array('htmleditor', (array)config:dont_override)" /> <roundcube:if condition="!in_array('htmleditor', (array)config:dont_override)" />
<span class="composeoption"> <span class="composeoption">
<label><roundcube:label name="editortype" /> <label><roundcube:label name="editortype" />
@ -146,7 +142,8 @@
</span> </span>
<roundcube:endif /> <roundcube:endif />
<roundcube:container name="composeoptions" id="composeoptions" /> <roundcube:container name="composeoptions" id="composeoptions" />
</div> </div>
</div> </div>
<!-- message compose body --> <!-- message compose body -->
@ -156,11 +153,18 @@
</div> </div>
<div id="compose-attachments" class="rightcol"> <div id="compose-attachments" class="rightcol">
<div style="text-align:center; margin-bottom:20px"> <div style="text-align:center; margin-bottom:20px">
<roundcube:button name="addattachment" type="input" class="button" classSel="button pressed" label="addattachment" onclick="UI.show_uploadform();return false" tabindex="10" /> <roundcube:button name="addattachment" type="input" class="button" classSel="button pressed" label="addattachment" onclick="UI.show_uploadform();return false" />
</div> </div>
<roundcube:object name="composeAttachmentList" id="attachment-list" class="attachmentslist" /> <roundcube:object name="composeAttachmentList" id="attachment-list" class="attachmentslist" />
<roundcube:object name="fileDropArea" id="compose-attachments" /> <roundcube:object name="fileDropArea" id="compose-attachments" />
</div> </div>
<!--
<div id="composeformbuttons" class="footerleft formbuttons floating">
<roundcube:button type="input" command="send" class="button mainaction" label="sendmessage" tabindex="11" />
<roundcube:button type="input" command="savedraft" class="button" label="savemessage" tabindex="12" />
<roundcube:button type="input" command="list" class="button" label="cancel" tabindex="13" />
</div>
-->
</div> </div>
</form> </form>
@ -173,8 +177,6 @@
</div><!-- end mainscreen --> </div><!-- end mainscreen -->
</div><!-- end minwidth -->
<div id="upload-dialog" class="propform popupdialog" title="<roundcube:label name='addattachment' />"> <div id="upload-dialog" class="propform popupdialog" title="<roundcube:label name='addattachment' />">
<roundcube:object name="composeAttachmentForm" id="uploadform" attachmentFieldSize="40" buttons="no" /> <roundcube:object name="composeAttachmentForm" id="uploadform" attachmentFieldSize="40" buttons="no" />
<div class="formbuttons"> <div class="formbuttons">

@ -4,7 +4,7 @@
<title><roundcube:object name="pagetitle" /></title> <title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" /> <roundcube:include file="/includes/links.html" />
</head> </head>
<body class="noscroll"> <roundcube:if condition="env:extwin" /><body class="noscroll extwin"><roundcube:else /><body class="noscroll"><roundcube:endif />
<roundcube:include file="/includes/header.html" /> <roundcube:include file="/includes/header.html" />
@ -12,14 +12,18 @@
<!-- toolbar --> <!-- toolbar -->
<div id="messagetoolbar" class="toolbar fullwidth"> <div id="messagetoolbar" class="toolbar fullwidth">
<roundcube:if condition="!env:extwin" />
<roundcube:button command="list" type="link" class="button back disabled" classAct="button back" classSel="button back pressed" label="back" /> <roundcube:button command="list" type="link" class="button back disabled" classAct="button back" classSel="button back pressed" label="back" />
<span class="spacer"></span> <span class="spacer"></span>
<roundcube:endif />
<roundcube:include file="/includes/mailtoolbar.html" /> <roundcube:include file="/includes/mailtoolbar.html" />
<div class="toolbarselect"> <div class="toolbarselect">
<roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mailboxlist decorated" folder_filter="mail" /> <roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mailboxlist decorated" folder_filter="mail" />
</div> </div>
</div> </div>
<roundcube:if condition="!env:extwin" />
<div id="mailview-left"> <div id="mailview-left">
<!-- folders list --> <!-- folders list -->
@ -32,9 +36,13 @@
</div> </div>
<div id="mailview-right" class="offset uibox"> <div id="mailview-right" class="offset uibox">
<roundcube:else />
<div id="mailview-right" class="offset fullwidth uibox">
<roundcube:endif />
<div id="messageheader"> <div id="messageheader">
<span id="previewheaderstoggle"></span> <span class="moreheaderstoggle"></span>
<h2 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" /></h2> <h2 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" /></h2>
<roundcube:object name="messageHeaders" class="headers-table" addicon="/images/addcontact.png" exclude="subject" max="20" /> <roundcube:object name="messageHeaders" class="headers-table" addicon="/images/addcontact.png" exclude="subject" max="20" />

@ -9,7 +9,7 @@
<div id="messageheader" class="previewheader"> <div id="messageheader" class="previewheader">
<h3 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" /></h3> <h3 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" /></h3>
<a href="#details" id="previewheaderstoggle"><span class="iconlink" title="<roundcube:label name='togglemoreheaders' />"></span></a> <a href="#details" id="previewheaderstoggle" class="moreheaderstoggle"><span class="iconlink" title="<roundcube:label name='togglemoreheaders' />"></span></a>
<div id="contactphoto"><roundcube:object name="contactphoto" /></div> <div id="contactphoto"><roundcube:object name="contactphoto" /></div>
<table class="headers-table" id="preview-shortheaders"><tbody><tr> <table class="headers-table" id="preview-shortheaders"><tbody><tr>
@ -36,7 +36,7 @@
<roundcube:button command="forward" type="link" class="button forward" classSel="button forward pressed" innerClass="inner" title="forwardmessage" content="-&gt;" /> <roundcube:button command="forward" type="link" class="button forward" classSel="button forward pressed" innerClass="inner" title="forwardmessage" content="-&gt;" />
&nbsp; &nbsp;
<roundcube:endif /> <roundcube:endif />
<roundcube:button command="permaurl" type="link" class="button extwin" classSel="button extwin pressed" innerClass="inner" title="openinextwin" content="[]" target="_blank" /> <roundcube:button command="extwin" type="link" class="button extwin" classSel="button extwin pressed" innerClass="inner" title="openinextwin" content="[]" />
</div> </div>
</div> </div>

@ -21,7 +21,6 @@ function rcube_mail_ui()
dragmessagemenu: { sticky:1 }, dragmessagemenu: { sticky:1 },
groupmenu: { above:1 }, groupmenu: { above:1 },
mailboxmenu: { above:1 }, mailboxmenu: { above:1 },
composeoptionsmenu: { editable:1, overlap:1 },
spellmenu: { callback: spellmenu }, spellmenu: { callback: spellmenu },
// toggle: #1486823, #1486930 // toggle: #1486823, #1486930
'attachment-form': { editable:1, above:1, toggle:!bw.ie&&!bw.linux }, 'attachment-form': { editable:1, above:1, toggle:!bw.ie&&!bw.linux },
@ -90,13 +89,17 @@ function rcube_mail_ui()
show_header_row(fields[f], true); show_header_row(fields[f], true);
} }
$('#composeoptionstoggle').parent().click(function(){ $('#composeoptionstoggle').click(function(){
$('#composeoptionstoggle').toggleClass('enabled'); $('#composeoptionstoggle').toggleClass('remove');
$('#composeoptions').toggle(); $('#composeoptions').toggle();
layout_composeview(); layout_composeview();
return false; return false;
}).css('cursor', 'pointer'); }).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', 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(); orientation:'v', relative:true, start:248, min:170, size:12, render:layout_composeview }).init();
} }
@ -354,9 +357,14 @@ function rcube_mail_ui()
var body = $('#composebody'), var body = $('#composebody'),
form = $('#compose-content'), form = $('#compose-content'),
bottom = $('#composeview-bottom'), 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; w = body.parent().width() - 5;
h = body.parent().height() - 16; h = body.parent().height() - 16;
@ -365,6 +373,8 @@ function rcube_mail_ui()
$('#composebody_tbl').width((w+8)+'px').height('').css('margin-top', '1px'); $('#composebody_tbl').width((w+8)+'px').height('').css('margin-top', '1px');
$('#composebody_ifr').width((w+8)+'px').height((h-40)+'px'); $('#composebody_ifr').width((w+8)+'px').height((h-40)+'px');
$('#googie_edit_layer').height(h+'px'); $('#googie_edit_layer').height(h+'px');
// $('#composebodycontainer')[(btns ? 'addClass' : 'removeClass')]('buttons');
// $('#composeformbuttons')[(btns ? 'show' : 'hide')]();
var abooks = $('#directorylist'); var abooks = $('#directorylist');
$('#compose-contacts .scroller').css('top', abooks.position().top + abooks.outerHeight()); $('#compose-contacts .scroller').css('top', abooks.position().top + abooks.outerHeight());

Loading…
Cancel
Save