summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-05-01 19:27:36 +0000
committeralecpl <alec@alec.pl>2009-05-01 19:27:36 +0000
commit309d2f40a037a158db596068b7fb6799f94018c2 (patch)
tree98a1221b50cca406e84166c196bd60cc6439c63f /program/steps/mail
parent169249982db0d93e1a0a26ca4c91fc8bf3018f58 (diff)
- jQuery'fied GoogieSpell 4.0 + some changes in compose
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/compose.inc24
1 files changed, 14 insertions, 10 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 9328cc5ac..8ddb2f590 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -433,6 +433,7 @@ function rcmail_compose_body($attrib)
"googie.lang_no_error_found = \"%s\";\n".
"googie.setLanguages(%s);\n".
"googie.setCurrentLanguage('%s');\n".
+ "googie.setSpellContainer('spellcheck-control');\n".
"googie.decorateTextarea('%s');\n".
"%s.set_env('spellcheck', googie);",
$RCMAIL->comm_path,
@@ -834,23 +835,26 @@ function rcmail_editor_selector($attrib)
{
global $CONFIG, $MESSAGE, $compose_mode;
- $choices = array(
- 'html' => 'htmltoggle',
- 'plain' => 'plaintoggle'
- );
-
// determine whether HTML or plain text should be checked
$useHtml = $CONFIG['htmleditor'] ? true : false;
if ($compose_mode)
$useHtml = ($useHtml && $MESSAGE->has_html_part());
- $editorid = empty($attrib['editorid']) ? 'rcmComposeMessage' : $attrib['editorid'];
+ if (empty($attrib['editorid']))
+ $attrib['editorid'] = 'rcmComposeMessage';
+
+ if (empty($attrib['name']))
+ $attrib['name'] = 'editorSelect';
+
+ $attrib['onchange'] = "return rcmail_toggle_editor(this.value=='html', '".$attrib['editorid']."', '_is_html')";
+
+ $select = new html_select($attrib);
+
+ $select->add(Q(rcube_label('htmltoggle')), 'html');
+ $select->add(Q(rcube_label('plaintoggle')), 'plain');
- $selector = '';
- $chosenvalue = $useHtml ? 'html' : 'plain';
- $radio = new html_radiobutton(array('name' => '_editorSelect',
- 'onclick' => "return rcmail_toggle_editor(this.value=='html', '$editorid', '_is_html')"));
+ return $select->show($useHtml ? 'html' : 'plain');
foreach ($choices as $value => $text)
{