Aleksander Machniak
2013-03-26 aa30cf8f3c05ab4fd69f7ab2dea39e56d8bf1976
Better fix for "saving draft just after entering compose window (#1489012)"
2 files modified
5 ■■■■■ changed files
program/js/app.js 4 ●●●● patch | view | raw | blame | history
program/steps/mail/compose.inc 1 ●●●● patch | view | raw | blame | history
program/js/app.js
@@ -950,7 +950,7 @@
        clearTimeout(this.save_timer);
        // compose form did not change (and draft wasn't saved already)
        if (this.draft_saved && this.cmp_hash == this.compose_field_hash()) {
        if (this.env.draft_id && this.cmp_hash == this.compose_field_hash()) {
          this.auto_save_start();
          break;
        }
@@ -3345,7 +3345,7 @@
  this.set_draft_id = function(id)
  {
    this.draft_saved = id;
    this.env.draft_id = id;
    $("input[name='_draft_saveid']").val(id);
  };
program/steps/mail/compose.inc
@@ -152,6 +152,7 @@
// get reference message and set compose mode
if ($msg_uid = $COMPOSE['param']['draft_uid']) {
  $compose_mode = RCUBE_COMPOSE_DRAFT;
  $OUTPUT->set_env('draft_id', $msg_uid);
  $RCMAIL->storage->set_folder($CONFIG['drafts_mbox']);
}
else if ($msg_uid = $COMPOSE['param']['reply_uid']) {