alecpl
2011-04-08 d1d9fd84b7329db9956c616ed6e4a6d2a0e485c9
- Prevent javascript error if TinyMCE is not initialized (#1487862)


1 files modified
21 ■■■■ changed files
program/js/app.js 21 ●●●● patch | view | raw | blame | history
program/js/app.js
@@ -3021,11 +3021,11 @@
  this.compose_field_hash = function(save)
  {
    // check input fields
    var value_to = $("[name='_to']").val();
    var value_cc = $("[name='_cc']").val();
    var value_bcc = $("[name='_bcc']").val();
    var value_subject = $("[name='_subject']").val();
    var str = '';
    var ed, str = '',
      value_to = $("[name='_to']").val(),
      value_cc = $("[name='_cc']").val(),
      value_bcc = $("[name='_bcc']").val(),
      value_subject = $("[name='_subject']").val();
    if (value_to)
      str += value_to+':';
@@ -3036,9 +3036,8 @@
    if (value_subject)
      str += value_subject+':';
    var editor = tinyMCE.get(this.env.composebody);
    if (editor)
      str += editor.getContent();
    if (window.tinyMCE && (ed = tinyMCE.get(this.env.composebody)))
      str += ed.getContent();
    else
      str += $("[name='_message']").val();
@@ -3984,11 +3983,11 @@
      this.env.contactfolders[newkey] = this.env.contactfolders[key];
      this.env.contactfolders[newkey].id = prop.newid;
      this.env.group = prop.newid;
      var newprop = $.extend({}, prop);
      newprop.id = prop.newid;
      newprop.type = 'group';
      link = $('<a>').attr('href', '#')
        .attr('rel', prop.source+':'+prop.newid)
        .bind('click', function() { return rcmail.command('listgroup', newprop, this);})
@@ -4008,7 +4007,7 @@
  {
    if (!elem)
      elem = $('.ff_' + col);
    elem.focus(function(){ ref.focus_textfield(this); })
      .blur(function(){ ref.blur_textfield(this); })
      .each(function(){ this._placeholder = this.title = ref.env.coltypes[col].label; ref.blur_textfield(this); });