From 6b1fc027cb8a7b7581747e939f2cfbb387c09aba Mon Sep 17 00:00:00 2001 From: svncommit Date: Wed, 27 Sep 2006 05:18:55 +0000 Subject: Fixed editor selector labels, added TinyMCE spellchecker to editor configuration --- CHANGELOG | 6 ++++++ program/js/editor.js | 2 +- program/steps/mail/compose.inc | 25 +++++++++++++++++-------- skins/default/templates/compose.html | 4 ++-- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 4144b5a6d..ae8dffa12 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,12 @@ CHANGELOG RoundCube Webmail --------------------------- +2006/09/26 (estadtherr) +---------- +- Added spellchecker plugin to TinyMCE configuration +- Fixed HTML/Plain toggle labels + + 2006/09/24 (thomasb) ---------- - Partial client re-write with a common list class diff --git a/program/js/editor.js b/program/js/editor.js index 333559c2e..0af5968e9 100644 --- a/program/js/editor.js +++ b/program/js/editor.js @@ -21,7 +21,7 @@ function rcmail_editor_init(skin_path) accessibility_focus : false, apply_source_formatting : true, theme : 'advanced', - plugins : 'emotions,table,searchreplace', + plugins : 'emotions,table,searchreplace,spellchecker', theme_advanced_buttons1 : 'bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,forecolor,backcolor,formatselect,fontselect,fontsizeselect', theme_advanced_buttons2 : 'undo,redo,image,hr,link,unlink,emotions,charmap,code,separator,search,replace,spellchecker,separator,tablecontrols', theme_advanced_buttons3 : '', 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("%s\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("%s", + $rb->show($value), + $attrib['id'], + rcube_label($text)); } return $selector; diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html index 2c11e0015..f2bfc1dc4 100644 --- a/skins/default/templates/compose.html +++ b/skins/default/templates/compose.html @@ -107,8 +107,8 @@ function rcmail_toggle_display(id) - - + :  + -- cgit v1.2.3