Aleksander Machniak
2013-07-08 39d14ee22b128967ac0223a71099b7ce87b1e81e
Fix bug where signature wasn't changed on identity selection when editing a draft (#1489229)

Conflicts:

program/js/app.js
3 files modified
15 ■■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/js/app.js 11 ●●●●● patch | view | raw | blame | history
program/steps/mail/compose.inc 3 ●●●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix bug where signature wasn't changed on identity selection when editing a draft (#1489229)
- Fix IMAP SETMETADATA parameters quoting (#1489231)
- Fix "could not load message" error on valid empty message body (#1489228)
- Fix handling of message/rfc822 attachments on message forward and edit (#1489214)
program/js/app.js
@@ -3069,7 +3069,7 @@
      this.set_caret_pos(input_message, this.env.top_posting ? 0 : $(input_message).val().length);
      // add signature according to selected identity
      // if we have HTML editor, signature is added in callback
      if (input_from.prop('type') == 'select-one' && !this.env.opened_extwin) {
      if (input_from.prop('type') == 'select-one') {
        this.change_identity(input_from[0]);
      }
    }
@@ -3400,6 +3400,15 @@
    if (!show_sig)
      show_sig = this.env.show_sig;
    // first function execution
    if (!this.env.identities_initialized) {
      this.env.identities_initialized = true;
      if (this.env.show_sig_later)
        this.env.show_sig = true;
      if (this.env.opened_extwin)
        return;
    }
    var cursor_pos, p = -1,
      id = obj.options[obj.selectedIndex].value,
      input_message = $("[name='_message']"),
program/steps/mail/compose.inc
@@ -170,6 +170,9 @@
$config_show_sig = $RCMAIL->config->get('show_sig', 1);
if ($compose_mode == RCUBE_COMPOSE_EDIT || $compose_mode == RCUBE_COMPOSE_DRAFT) {
  // don't add signature in draft/edit mode, we'll also not remove the old-one
  // but only on page display, later we should be able to change identity/sig (#1489229)
  if ($config_show_sig == 1 || $config_show_sig == 2)
    $OUTPUT->set_env('show_sig_later', true);
}
else if ($config_show_sig == 1)
  $OUTPUT->set_env('show_sig', true);