From 7dff4437c06369da69841e3a4fee2b931bac0ccc Mon Sep 17 00:00:00 2001 From: Dennis1993 Date: Mon, 2 Sep 2013 12:48:53 +0200 Subject: Update defaults.inc.php --- config/defaults.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/defaults.inc.php b/config/defaults.inc.php index 2a51b0805..29cc06900 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -973,5 +973,9 @@ $config['autocomplete_single'] = false; // Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana $config['default_font'] = 'Verdana'; +// Default font size for composed HTML message. +// Supported sizes: 8pt, 10pt, 12pt, 14pt, 18pt, 24pt, 36pt +$rcmail_config['default_font_size'] = '10pt'; + // Enables display of email address with name instead of a name (and address in title) $config['message_show_email'] = false; -- cgit v1.2.3 From 965dea3e8e243a289502bc1ad96c2ef424fd6df4 Mon Sep 17 00:00:00 2001 From: Dennis1993 Date: Mon, 2 Sep 2013 12:51:28 +0200 Subject: Update compose.inc --- program/steps/mail/compose.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index f3ff19d72..b56f5b5b4 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -148,6 +148,9 @@ if ($font && !is_array($font)) { $OUTPUT->set_env('default_font', $font); } +// default font size for HTML editor +$OUTPUT->set_env('default_font_size', $RCMAIL->config->get('default_font_size')); + // get reference message and set compose mode if ($msg_uid = $COMPOSE['param']['draft_uid']) { $compose_mode = RCUBE_COMPOSE_DRAFT; -- cgit v1.2.3 From 901a0809fa6f836a4297ccc0a54a626dc1deeebf Mon Sep 17 00:00:00 2001 From: Dennis1993 Date: Mon, 2 Sep 2013 12:51:58 +0200 Subject: Update sendmail.inc --- program/steps/mail/sendmail.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 1a92844c0..436b4eea7 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -473,8 +473,10 @@ $isHtml = (bool) get_input_value('_is_html', RCUBE_INPUT_POST); $message_body = get_input_value('_message', RCUBE_INPUT_POST, TRUE, $message_charset); if ($isHtml) { - $font = rcube_fontdefs($RCMAIL->config->get('default_font')); - $bstyle = $font && is_string($font) ? " style='font-family: $font'" : ''; + $font = rcube_fontdefs($RCMAIL->config->get('default_font')); + $font = $font && is_string($font) ? ' '.$font : NULL; + $font_size = $RCMAIL->config->get('default_font_size'); + $bstyle = " style='font: ".$font_size.$font.";'"; // append doctype and html/body wrappers $message_body = '' . -- cgit v1.2.3 From c3fe3fc3169fcfd3f188516ae4cd6229615528b2 Mon Sep 17 00:00:00 2001 From: Dennis1993 Date: Mon, 2 Sep 2013 12:52:21 +0200 Subject: Update save_prefs.inc --- program/steps/settings/save_prefs.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc index 3e8b1d17e..717c7ad8c 100644 --- a/program/steps/settings/save_prefs.inc +++ b/program/steps/settings/save_prefs.inc @@ -89,6 +89,7 @@ switch ($CURR_SECTION) 'reply_mode' => isset($_POST['_reply_mode']) ? intval($_POST['_reply_mode']) : 0, 'strip_existing_sig' => isset($_POST['_strip_existing_sig']), 'default_font' => get_input_value('_default_font', RCUBE_INPUT_POST), + 'default_font_size' => get_input_value('_default_font_size', RCUBE_INPUT_POST), 'forward_attachment' => !empty($_POST['_forward_attachment']), ); -- cgit v1.2.3 From 888f9118354054c24bb22546618f311765f9554b Mon Sep 17 00:00:00 2001 From: Dennis1993 Date: Mon, 2 Sep 2013 12:55:28 +0200 Subject: Update func.inc --- program/steps/settings/func.inc | 45 +++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index fdc07be9e..8feeda17f 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -838,28 +838,29 @@ function rcmail_user_prefs($current = null) } if (!isset($no_override['default_font'])) { - if (!$current) { - continue 2; - } - - $field_id = 'rcmfd_default_font'; - $fonts = rcube_fontdefs(); - $selected = $config['default_font']; - - $select = ''; - - $blocks['main']['options']['default_font'] = array( - 'title' => html::label($field_id, Q(rcube_label('defaultfont'))), - 'content' => $select - ); + // Default font size + $field_id = 'rcmfd_default_font_size'; + $select_default_font_size = new html_select(array('name' => '_default_font_size', 'id' => $field_id)); + + $fontsizes = array('8pt', '10pt', '12pt', '14pt', '18pt', '24pt', '36pt'); + foreach ($fontsizes as $size) { + $select_default_font_size->add($size, $size); + } + + // Default font + $field_id = 'rcmfd_default_font'; + $select_default_font = new html_select(array('name' => '_default_font', 'id' => $field_id)); + + $fonts = rcube_fontdefs(); + foreach ($fonts as $fname => $font) { + $select_default_font->add($fname, $fname); + } + + $blocks['main']['options']['default_font'] = array( + 'title' => html::label($field_id, Q(rcube_label('defaultfont'))), + 'content' => $select_default_font_size->show($RCMAIL->config->get('default_font_size', 1)). + $select_default_font->show($RCMAIL->config->get('default_font', 1)) + ); } break; -- cgit v1.2.3 From edc49ebfc2b6d8ebedecfb72318c9bc72fba9211 Mon Sep 17 00:00:00 2001 From: Dennis1993 Date: Mon, 2 Sep 2013 12:55:55 +0200 Subject: Update editor.js --- program/js/editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/program/js/editor.js b/program/js/editor.js index e403d1f63..e1ef36835 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -80,6 +80,9 @@ function rcmail_editor_callback() if (rcmail.env.default_font) $(tinyMCE.get(rcmail.env.composebody).getBody()).css('font-family', rcmail.env.default_font); + if (rcmail.env.default_font_size) + $(tinyMCE.get(rcmail.env.composebody).getBody()).css('font-size', rcmail.env.default_font_size); + if (elem && elem.type == 'select-one') { rcmail.change_identity(elem); // Focus previously focused element -- cgit v1.2.3 From d8d5692cff411dc769d8fc1c7dd5ea8acbb15837 Mon Sep 17 00:00:00 2001 From: Dennis1993 Date: Mon, 2 Sep 2013 12:57:15 +0200 Subject: Update func.inc --- program/steps/settings/func.inc | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 8feeda17f..64fc8b05c 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -838,29 +838,29 @@ function rcmail_user_prefs($current = null) } if (!isset($no_override['default_font'])) { - // Default font size - $field_id = 'rcmfd_default_font_size'; - $select_default_font_size = new html_select(array('name' => '_default_font_size', 'id' => $field_id)); - - $fontsizes = array('8pt', '10pt', '12pt', '14pt', '18pt', '24pt', '36pt'); - foreach ($fontsizes as $size) { - $select_default_font_size->add($size, $size); - } - - // Default font - $field_id = 'rcmfd_default_font'; - $select_default_font = new html_select(array('name' => '_default_font', 'id' => $field_id)); - - $fonts = rcube_fontdefs(); - foreach ($fonts as $fname => $font) { - $select_default_font->add($fname, $fname); - } - - $blocks['main']['options']['default_font'] = array( - 'title' => html::label($field_id, Q(rcube_label('defaultfont'))), - 'content' => $select_default_font_size->show($RCMAIL->config->get('default_font_size', 1)). - $select_default_font->show($RCMAIL->config->get('default_font', 1)) - ); + // Default font size + $field_id = 'rcmfd_default_font_size'; + $select_default_font_size = new html_select(array('name' => '_default_font_size', 'id' => $field_id)); + + $fontsizes = array('8pt', '10pt', '12pt', '14pt', '18pt', '24pt', '36pt'); + foreach ($fontsizes as $size) { + $select_default_font_size->add($size, $size); + } + + // Default font + $field_id = 'rcmfd_default_font'; + $select_default_font = new html_select(array('name' => '_default_font', 'id' => $field_id)); + + $fonts = rcube_fontdefs(); + foreach ($fonts as $fname => $font) { + $select_default_font->add($fname, $fname); + } + + $blocks['main']['options']['default_font'] = array( + 'title' => html::label($field_id, Q(rcube_label('defaultfont'))), + 'content' => $select_default_font_size->show($RCMAIL->config->get('default_font_size', 1)). + $select_default_font->show($RCMAIL->config->get('default_font', 1)) + ); } break; -- cgit v1.2.3 From 18995876e65330083ff690a3ad1981f1f2491072 Mon Sep 17 00:00:00 2001 From: Dennis1993 Date: Mon, 2 Sep 2013 13:05:59 +0200 Subject: Update defaults.inc.php --- config/defaults.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/defaults.inc.php b/config/defaults.inc.php index 29cc06900..268bf009a 100644 --- a/config/defaults.inc.php +++ b/config/defaults.inc.php @@ -975,7 +975,7 @@ $config['default_font'] = 'Verdana'; // Default font size for composed HTML message. // Supported sizes: 8pt, 10pt, 12pt, 14pt, 18pt, 24pt, 36pt -$rcmail_config['default_font_size'] = '10pt'; +$config['default_font_size'] = '10pt'; // Enables display of email address with name instead of a name (and address in title) $config['message_show_email'] = false; -- cgit v1.2.3 From 153e455f6566cb7a4349b7f2197e842d6ec9bf90 Mon Sep 17 00:00:00 2001 From: Dennis1993 Date: Mon, 2 Sep 2013 13:16:04 +0200 Subject: Update func.inc --- program/steps/settings/func.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index 64fc8b05c..57c52a01e 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -838,6 +838,10 @@ function rcmail_user_prefs($current = null) } if (!isset($no_override['default_font'])) { + if (!$current) { + continue 2; + } + // Default font size $field_id = 'rcmfd_default_font_size'; $select_default_font_size = new html_select(array('name' => '_default_font_size', 'id' => $field_id)); -- cgit v1.2.3