summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/compose.inc21
-rw-r--r--program/steps/settings/edit_identity.inc12
2 files changed, 17 insertions, 16 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 878cf8634..0ee55f8a9 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -426,8 +426,7 @@ function rcmail_compose_body($attrib)
$out .= $msgtype->show();
// If desired, set this text area to be editable by TinyMCE
- if ($isHtml)
- $attrib['mce_editable'] = "true";
+ if ($isHtml) $attrib['class'] = "mce_editor";
$textarea = new html_textarea($attrib);
$out .= $textarea->show($body);
$out .= $form_end ? "\n$form_end" : '';
@@ -799,9 +798,13 @@ function rcmail_editor_selector($attrib)
// determine whether HTML or plain text should be checked
if ($CONFIG['htmleditor'])
+ {
$useHtml = true;
+ }
else
+ {
$useHtml = false;
+ }
if ($compose_mode == RCUBE_COMPOSE_REPLY ||
$compose_mode == RCUBE_COMPOSE_FORWARD ||
@@ -811,23 +814,19 @@ function rcmail_editor_selector($attrib)
$useHtml = ($hasHtml && $CONFIG['htmleditor']);
}
+ $chosenvalue = $useHtml ? 'html' : 'plain';
+
$selector = '';
$attrib['name'] = '_editorSelect';
$attrib['onchange'] = 'return rcmail_toggle_editor(this)';
foreach ($choices as $value => $text)
{
- $checked = '';
- if ((($value == 'html') && $useHtml) ||
- (($value != 'html') && !$useHtml))
- $attrib['checked'] = 'true';
- else
- unset($attrib['checked']);
-
$attrib['id'] = '_' . $value;
+ $attrib['value'] = $value;
$rb = new html_radiobutton($attrib);
$selector .= sprintf("%s<label for=\"%s\">%s</label>",
- $rb->show($value),
+ $rb->show($chosenvalue),
$attrib['id'],
rcube_label($text));
}
@@ -923,4 +922,4 @@ if ($a_contacts)
$OUTPUT->set_env('contacts', $a_contacts);
}
$OUTPUT->send('compose');
-?> \ No newline at end of file
+?>
diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc
index 7309d4b02..d8802ca8c 100644
--- a/program/steps/settings/edit_identity.inc
+++ b/program/steps/settings/edit_identity.inc
@@ -40,10 +40,10 @@ function rcube_identity_form($attrib)
global $IDENTITY_RECORD, $OUTPUT;
$OUTPUT->include_script('tiny_mce/tiny_mce_src.js');
- $OUTPUT->add_script("tinyMCE.init({ mode : 'specific_textareas'," .
+ $OUTPUT->add_script("tinyMCE.init({ mode : 'textareas'," .
+ "editor_selector : 'mce_editor'," .
"apply_source_formatting : true," .
"content_css : '\$__skin_path' + '/editor_content.css'," .
- "editor_css : '\$__skin_path' + '/editor_ui.css'," .
"theme : 'advanced'," .
"theme_advanced_toolbar_location : 'top'," .
"theme_advanced_toolbar_align : 'left'," .
@@ -69,7 +69,7 @@ function rcube_identity_form($attrib)
'reply-to' => array('type' => 'text', 'label' => 'replyto'),
'bcc' => array('type' => 'text'),
'signature' => array('type' => 'textarea', 'size' => "40", 'rows' => "6"),
- 'html_signature'=>array('type' => 'checkbox', 'label' => 'htmlsignature', 'onclick' => 'return rcmail.toggle_editor(this, \'_signature\');'),
+ 'html_signature'=>array('type' => 'checkbox', 'label' => 'htmlsignature', 'onclick' => 'return rcmail.toggle_editor(this, \'rcmfd_signature\');'),
'standard' => array('type' => 'checkbox', 'label' => 'setdefault'));
@@ -104,13 +104,15 @@ function rcube_identity_form($attrib)
{
$attrib['size'] = $colprop['size'];
$attrib['rows'] = $colprop['rows'];
- $attrib['mce_editable'] = $IDENTITY_RECORD['html_signature'] ? "true" : "false";
+ if ($IDENTITY_RECORD['html_signature'])
+ {
+ $attrib['class'] = "mce_editor";
+ }
}
else
{
unset($attrib['size']);
unset($attrib['rows']);
- unset($attrib['mce_editable']);
}
$label = strlen($colprop['label']) ? $colprop['label'] : $col;