summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-05-25 18:25:04 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2006-05-25 18:25:04 +0000
commit95ad92d90c934131307b28e48195aff380bca763 (patch)
tree782b6b09672c9f1b0f38c137adb4f89fd3039127 /roundcubemail/program/steps
parentbc5599a1608e645ec29f7b67ce5692debbda6593 (diff)
Finalized GoogieSpell integration
git-svn-id: https://svn.roundcube.net/trunk@249 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
-rw-r--r--roundcubemail/program/steps/mail/compose.inc30
1 files changed, 23 insertions, 7 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc
index 1f9618d5b..139af6556 100644
--- a/roundcubemail/program/steps/mail/compose.inc
+++ b/roundcubemail/program/steps/mail/compose.inc
@@ -297,7 +297,7 @@ function rcmail_compose_header_from($attrib)
function rcmail_compose_body($attrib)
{
- global $CONFIG, $OUTPUT, $REPLY_MESSAGE, $FORWARD_MESSAGE;
+ global $CONFIG, $OUTPUT, $REPLY_MESSAGE, $FORWARD_MESSAGE, $JS_OBJECT_NAME;
list($form_start, $form_end) = get_form_tags($attrib);
unset($attrib['form']);
@@ -335,12 +335,28 @@ function rcmail_compose_body($attrib)
$out .= $form_end ? "\n$form_end" : '';
// include GoogieSpell
- $OUTPUT->include_script('googiespell.js');
-
- $OUTPUT->add_script(sprintf("var googie1 = new GoogieSpell('\$__skin_path/images/googiespell/','%s&_action=spell&lang=');\n".
- "googie1.decorateTextarea('%s');",
- $GLOBALS['COMM_PATH'],
- $attrib['id']), 'foot');
+ if (!empty($CONFIG['enable_spellcheck']))
+ {
+ $OUTPUT->include_script('googiespell.js');
+ $OUTPUT->add_script(sprintf("var googie = new GoogieSpell('\$__skin_path/images/googiespell/','%s&_action=spell&lang=');\n".
+ "googie.lang_chck_spell = \"%s\";\n".
+ "googie.lang_rsm_edt = \"%s\";\n".
+ "googie.lang_close = \"%s\";\n".
+ "googie.lang_revert = \"%s\";\n".
+ "googie.lang_no_error_found = \"%s\";\n".
+ "googie.decorateTextarea('%s');\n".
+ "%s.set_env('spellcheck', googie);",
+ $GLOBALS['COMM_PATH'],
+ rep_specialchars_output(rcube_label('checkspelling')),
+ rep_specialchars_output(rcube_label('resumeediting')),
+ rep_specialchars_output(rcube_label('close')),
+ rep_specialchars_output(rcube_label('revertto')),
+ rep_specialchars_output(rcube_label('nospellerrors')),
+ $attrib['id'],
+ $JS_OBJECT_NAME), 'foot');
+
+ rcube_add_label('checking');
+ }
return $out;
}