Thomas Bruederli
2013-01-11 7cc1d3ae170b63c5f477db4eda09b94ab42d1bb5
program/js/app.js
@@ -361,7 +361,7 @@
        if (this.gui_objects.editform) {
          this.enable_command('save', true);
          if (this.env.action == 'add' || this.env.action == 'edit')
          if (this.env.action == 'add' || this.env.action == 'edit' || this.env.action == 'search')
              this.init_contact_form();
        }
@@ -441,10 +441,11 @@
        this.enable_command('login', true);
        break;
    }
      default:
        break;
      }
    // unset contentframe variable if preview_pane is enabled
    if (this.env.contentframe && !$('#' + this.env.contentframe).is(':visible'))
      this.env.contentframe = null;
    // prevent from form submit with Enter key in file input fields
    if (bw.ie)
@@ -3036,7 +3037,7 @@
      ac_props;
    // close compose step in opener
    if (window.opener && opener.rcmail && opener.rcmail.env.action == 'compose') {
    if (window.opener && !window.opener.closed && opener.rcmail && opener.rcmail.env.action == 'compose') {
      setTimeout(function(){ opener.history.back(); }, 100);
      this.env.opened_extwin = true;
    }
@@ -3706,9 +3707,10 @@
  {
    this.display_message(msg, type);
    if (this.env.extwin && window.opener && opener.rcmail) {
    if (this.env.extwin) {
      this.lock_form(this.gui_objects.messageform);
      opener.rcmail.display_message(msg, type);
      if (window.opener && !window.opener.closed && opener.rcmail)
        opener.rcmail.display_message(msg, type);
      setTimeout(function(){ window.close() }, 1000);
    }
    else {
@@ -4395,10 +4397,11 @@
  {
    var ref = this, col;
    this.set_photo_actions($('#ff_photo').val());
    for (col in this.env.coltypes)
      this.init_edit_field(col, null);
    if (this.env.coltypes) {
      this.set_photo_actions($('#ff_photo').val());
      for (col in this.env.coltypes)
        this.init_edit_field(col, null);
    }
    $('.contactfieldgroup .row a.deletebutton').click(function() {
      ref.delete_edit_field(this);