diff options
author | svncommit <devs@roundcube.net> | 2006-09-27 05:18:55 +0000 |
---|---|---|
committer | svncommit <devs@roundcube.net> | 2006-09-27 05:18:55 +0000 |
commit | 6b1fc027cb8a7b7581747e939f2cfbb387c09aba (patch) | |
tree | e7b89db909478fabcfd6166beb246000e3a5da00 /program/steps/mail/compose.inc | |
parent | 6b47de3f49e880f08fa4a9226e70d18129095306 (diff) |
Fixed editor selector labels, added TinyMCE spellchecker to editor configuration
Diffstat (limited to 'program/steps/mail/compose.inc')
-rw-r--r-- | program/steps/mail/compose.inc | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index 5077d5c16..51ae6193e 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -787,8 +787,8 @@ function rcmail_editor_selector($attrib) global $CONFIG, $MESSAGE, $compose_mode; $choices = array( - 'html' => 'HTML', - 'plain' => 'Plain text' + 'html' => 'htmltoggle', + 'plain' => 'plaintoggle' ); // determine whether HTML or plain text should be checked @@ -806,15 +806,24 @@ function rcmail_editor_selector($attrib) } $selector = ''; + + $attrib['name'] = '_editorSelect'; + $attrib['onclick'] = 'return rcmail_toggle_editor(this)'; foreach ($choices as $value => $text) { $checked = ''; - if ((($text == 'HTML') && $useHtml) || - (($text != 'HTML') && !$useHtml)) - $checked = 'checked'; - - $selector .= sprintf("<input type='radio' name='_editorSelect' value='%s' %s onclick='return rcmail_toggle_editor(this)'>%s</input>\n", - $value, $checked, $text); + if ((($value == 'html') && $useHtml) || + (($value != 'html') && !$useHtml)) + $attrib['checked'] = 'true'; + else + unset($attrib['checked']); + + $attrib['id'] = '_' . $value; + $rb = new radiobutton($attrib); + $selector .= sprintf("<td>%s</td><td class=\"title\"><label for=\"%s\">%s</label></td>", + $rb->show($value), + $attrib['id'], + rcube_label($text)); } return $selector; |