summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-11-03 14:26:23 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-11-03 14:26:23 +0000
commitbb911f19c2732a32709f5dbcf76e65892164fd88 (patch)
tree7c6bc203fd27cdba0080e079a19223cb947e2e32 /roundcubemail/program/steps/mail
parent36d7b96623d85566c4b146fae4886f0eb7f4bcce (diff)
- Add warning when switching editor mode from html to plain (#1485488)
- Unified editor switching functions git-svn-id: https://svn.roundcube.net/trunk@2035 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail')
-rw-r--r--roundcubemail/program/steps/mail/compose.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc
index df6f1ffae..758069acd 100644
--- a/roundcubemail/program/steps/mail/compose.inc
+++ b/roundcubemail/program/steps/mail/compose.inc
@@ -81,7 +81,9 @@ if (!is_array($_SESSION['compose']) || $_SESSION['compose']['id'] != get_input_v
}
// add some labels to client
-$OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning', 'nobodywarning', 'notsentwarning', 'savingmessage', 'sendingmessage', 'messagesaved', 'converting');
+$OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning',
+ 'nobodywarning', 'notsentwarning', 'savingmessage', 'sendingmessage', 'messagesaved',
+ 'converting', 'editorwarning');
// add config parameters to client script
if (!empty($CONFIG['drafts_mbox'])) {
@@ -848,9 +850,13 @@ function rcmail_editor_selector($attrib)
if ($compose_mode)
$useHtml = ($useHtml && $MESSAGE->has_html_part());
+ $editorid = empty($attrib['editorid']) ? 'rcmComposeMessage' : $attrib['editorid'];
+
$selector = '';
$chosenvalue = $useHtml ? 'html' : 'plain';
- $radio = new html_radiobutton(array('name' => '_editorSelect', 'onclick' => 'return rcmail_toggle_editor(this)'));
+ $radio = new html_radiobutton(array('name' => '_editorSelect',
+ 'onclick' => "return rcmail.toggle_editor(this.value=='html', '$editorid', '_is_html')"));
+
foreach ($choices as $value => $text)
{
$attrib['id'] = '_' . $value;