diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-05-30 08:32:06 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-05-30 08:32:06 +0200 |
commit | 646b64107a578d228a23d5b82923fb794fdb9c55 (patch) | |
tree | 792811ff7ad9201ecac322e93726b77c5bc26e74 /program/steps | |
parent | 3dbfb53f2b2f3e5c3befcf74f6580d2e2d307622 (diff) |
Implemented Text Editor widget that integrates all operations on
textareas including HTML editor and spellchecking
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/compose.inc | 8 | ||||
-rw-r--r-- | program/steps/mail/sendmail.inc | 2 | ||||
-rw-r--r-- | program/steps/settings/edit_identity.inc | 2 |
3 files changed, 5 insertions, 7 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index c44ba434a..6baf6e79a 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -951,8 +951,7 @@ function rcmail_compose_body($attrib) "googie.setLanguages(%s);\n". "googie.setCurrentLanguage('%s');\n". "googie.setDecoration(false);\n". - "googie.decorateTextarea('%s');\n". - "%s.set_env('spellcheck', googie);", + "googie.decorateTextarea('%s');\n", $RCMAIL->output->get_skin_path(), $RCMAIL->url(array('_task' => 'utils', '_action' => 'spell', '_remote' => 1)), !empty($dictionary) ? 'true' : 'false', @@ -964,8 +963,7 @@ function rcmail_compose_body($attrib) rcube::JQ(rcube::Q($RCMAIL->gettext('addtodict'))), rcube_output::json_serialize($spellcheck_langs), $lang, - $attrib['id'], - rcmail_output::JS_OBJECT_NAME), 'foot'); + $attrib['id']), 'foot'); $OUTPUT->add_label('checking'); $OUTPUT->set_env('spellcheck_langs', join(',', $editor_lang_set)); @@ -1704,7 +1702,7 @@ function rcmail_editor_selector($attrib) if (empty($attrib['name'])) $attrib['name'] = 'editorSelect'; - $attrib['onchange'] = "return rcmail_toggle_editor(this, '".$attrib['editorid']."')"; + $attrib['onchange'] = "return rcmail.command('toggle-editor', {id: '".$attrib['editorid']."', html: this.value == 'html'}, '', event)"; $select = new html_select($attrib); diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index 7ae03e522..4737ce368 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -320,7 +320,7 @@ if (!$savedraft) { } $OUTPUT->show_message('mispellingsfound', 'error'); - $OUTPUT->command('spellcheck_resume', $isHtml, $result); + $OUTPUT->command('spellcheck_resume', $result); $OUTPUT->send('iframe'); } } diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc index 3f7b6a58a..e43a7bb60 100644 --- a/program/steps/settings/edit_identity.inc +++ b/program/steps/settings/edit_identity.inc @@ -96,7 +96,7 @@ function rcube_identity_form($attrib) 'spellcheck' => true), 'html_signature' => array('type' => 'checkbox', 'label' => $RCMAIL->gettext('htmlsignature'), - 'onclick' => 'return rcmail_toggle_editor(this, \'rcmfd_signature\');'), + 'onclick' => 'return rcmail.command(\'toggle-editor\', {id: \'rcmfd_signature\', html: this.checked}, \'\', event)'), )) ); |