thomascube
2006-12-06 1a98a6a5db16edcf2fdebcb1fd0919c6582ba513
Preview pane and marking as read (#1484132)

5 files modified
36 ■■■■ changed files
CHANGELOG 7 ●●●●● patch | view | raw | blame | history
index.php 5 ●●●●● patch | view | raw | blame | history
program/include/rcube_shared.inc 8 ●●●● patch | view | raw | blame | history
program/js/app.js 12 ●●●● patch | view | raw | blame | history
program/steps/mail/show.inc 4 ●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,13 @@
CHANGELOG RoundCube Webmail
---------------------------
2006/12/06 (thomasb)
----------
- Improve memory usage when sending mail (closes #1484098)
- Mark messages as read once the preview is loaded (closes #1484132)
- Include smtp final response in log (closes #1484081)
2006/12/04 (thomasb)
----------
- Corrected date string in sent message header (closes #1484125)
index.php
@@ -2,7 +2,7 @@
/*
 +-----------------------------------------------------------------------+
 | RoundCube Webmail IMAP Client                                         |
 | Version 0.1-20061201                                                  |
 | Version 0.1-20061206                                                  |
 |                                                                       |
 | Copyright (C) 2005-2006, RoundCube Dev. - Switzerland                 |
 | Licensed under the GNU GPL                                            |
@@ -40,7 +40,7 @@
*/
define('RCMAIL_VERSION', '0.1-20061201');
define('RCMAIL_VERSION', '0.1-20061206');
// define global vars
$CHARSET = 'UTF-8';
@@ -154,7 +154,6 @@
  $converter = new html2text($htmlText);
  // TODO possibly replace with rcube_remote_response()
  send_nocacheing_headers();
  header('Content-Type: text/plain');
  $plaintext = $converter->get_text();
  print $plaintext;
program/include/rcube_shared.inc
@@ -1218,8 +1218,12 @@
// send header with expire date 30 days in future
function send_future_expire_header()
  {
  if (!headers_sent())
    header("Expires: ".gmdate("D, d M Y H:i:s", mktime()+2600000)." GMT");
  if (headers_sent())
    return;
  header("Expires: ".gmdate("D, d M Y H:i:s", mktime()+2600000)." GMT");
  header("Cache-Control: ");
  header("Pragma: ");
  }
program/js/app.js
@@ -157,6 +157,7 @@
          {
          this.enable_command('compose', 'add-contact', false);
          parent.rcmail.show_messageframe(true);
          parent.rcmail.mark_message('read', this.uid);
          }
        if ((this.env.action=='show' || this.env.action=='preview') && this.env.blockedobjects)
@@ -298,9 +299,9 @@
  // start interval for keep-alive/recent_check signal
  this.start_keepalive = function()
    {
    if (this.env.keep_alive && this.task=='mail' && this.gui_objects.messagelist)
    if (this.env.keep_alive && !this.env.framed && this.task=='mail' && this.gui_objects.messagelist)
      this._int = setInterval(this.ref+'.check_for_recent()', this.env.keep_alive * 1000);
    else if (this.env.keep_alive && this.task!='login')
    else if (this.env.keep_alive && !this.env.framed && this.task!='login')
      this._int = setInterval(this.ref+'.send_keep_alive()', this.env.keep_alive * 1000);    
    }
@@ -1434,9 +1435,14 @@
      for (var n=0; n<selection.length; n++)
        {
        id = selection[n];
        a_uids[a_uids.length] = id;
        if ((flag=='read' && this.message_list.rows[id].unread) || (flag=='unread' && !this.message_list.rows[id].unread))
          a_uids[a_uids.length] = id;
        }
      }
    // nothing to do
    if (!a_uids.length)
      return;
      
    switch (flag)
      {
program/steps/mail/show.inc
@@ -23,6 +23,8 @@
$PRINT_MODE = $_action=='print' ? TRUE : FALSE;
// allow this request to be cached
send_future_expire_header();
// similar code as in program/steps/mail/get.inc
if ($_GET['_uid'])
@@ -58,7 +60,7 @@
  // mark message as read
  if (!$MESSAGE['headers']->seen)
  if (!$MESSAGE['headers']->seen && $_action != 'preview')
    $IMAP->set_flag($_GET['_uid'], 'SEEN');
  // give message uid to the client