diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-03-26 19:06:11 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-03-26 19:06:11 +0100 |
commit | 3ca58cd22cae4cbc07479792f4ff4258aad785af (patch) | |
tree | f2e842d9a5dc2b48d41b7ef3f34e79e5c3f44517 /program | |
parent | 39062647473c7ff105fff7e5295ee9c0ca931e32 (diff) |
Better fix for "saving draft just after entering compose window (#1489012)"
Diffstat (limited to 'program')
-rw-r--r-- | program/js/app.js | 4 | ||||
-rw-r--r-- | program/steps/mail/compose.inc | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/program/js/app.js b/program/js/app.js index 9e05233f1..b2a6a0409 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -986,7 +986,7 @@ function rcube_webmail() 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; } @@ -3302,7 +3302,7 @@ function rcube_webmail() this.set_draft_id = function(id) { - this.draft_saved = id; + this.env.draft_id = id; $("input[name='_draft_saveid']").val(id); }; diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index c166eb74e..129d43701 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -152,6 +152,7 @@ if ($font && !is_array($font)) { // 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']) { |