svncommit
2008-04-15 8e5defd55f02cfd5f438cfdee823221bb3e8ed45
added language support to HTML editing (#1484862)

1 files deleted
3 files modified
113 ■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/js/editor.js 7 ●●●●● patch | view | raw | blame | history
program/steps/mail/compose.inc 8 ●●●● patch | view | raw | blame | history
skins/default/editor_ui.css 97 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -5,6 +5,7 @@
----------
- HTML editing is now working with PHP5 updates and TinyMCE v3.0.6
- fix signature loading on Windows (#1484545)
- add language support to HTML editing (#1484862)
2008/04/15 (alec)
----------
program/js/editor.js
@@ -15,15 +15,16 @@
// Initialize the message editor
function rcmail_editor_init(skin_path)
function rcmail_editor_init(skin_path, editor_lang)
  {
  tinyMCE.init({ mode : "textareas",
                 editor_selector : "mce_editor",
                 accessibility_focus : false,
                 apply_source_formatting : true,
                 theme : "advanced",
                 plugins : "emotions,media,nonbreaking,table,searchreplace,spellchecker,visualchars",
                 theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,link,unlink,emotions,charmap,code,forecolor,backcolor,fontselect,fontsizeselect, separator,undo,redo,image,media,spellchecker",
                 language : editor_lang,
                 plugins : "emotions,media,nonbreaking,table,searchreplace,visualchars,directionality",
                 theme_advanced_buttons1 : "bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,outdent,indent,separator,link,unlink,emotions,charmap,code,forecolor,backcolor,fontselect,fontsizeselect, separator,undo,redo,image,media,ltr,rtl",
                 theme_advanced_buttons2 : "",
                 theme_advanced_buttons3 : "",
                 theme_advanced_toolbar_location : "top",
program/steps/mail/compose.inc
@@ -410,9 +410,15 @@
    $body = rcmail_create_draft_body($body, $isHtml);
    }
  $tinylang = substr($_SESSION['user_lang'], 0, 2);
  if (!file_exists('program/js/tiny_mce/langs/'.$tinylang.'.js'))
    {
    $tinylang = 'en';
    }
  $OUTPUT->include_script('tiny_mce/tiny_mce.js');
  $OUTPUT->include_script("editor.js");
  $OUTPUT->add_script('rcmail_editor_init("$__skin_path");');
  $OUTPUT->add_script('rcmail_editor_init("$__skin_path", "'.$tinylang.'");');
  $out = $form_start ? "$form_start\n" : '';
skins/default/editor_ui.css
File was deleted