From e99d21ba051fb2b67147ab1da9c531d7acf8d99b Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Sat, 15 May 2010 08:15:58 -0400
Subject: [PATCH] - remove offline message list generation on IE, this doesn't realy improve performance now

---
 program/steps/mail/list.inc         |    2 +-
 program/steps/mail/check_recent.inc |    2 +-
 program/steps/mail/func.inc         |    8 +-------
 program/steps/mail/mark.inc         |    2 +-
 program/js/app.js                   |    7 -------
 program/steps/mail/move_del.inc     |    2 +-
 6 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 235fc08..d70c132 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1690,13 +1690,6 @@
     }
   };
 
-  // messages list handling in background (for performance)
-  this.offline_message_list = function(flag)
-  {
-    if (this.message_list)
-   	  this.message_list.set_background_mode(flag);
-  };
-
   this.set_list_sorting = function(sort_col, sort_order)
   {
     // set table header class
diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc
index 76546ac..3031bf7 100644
--- a/program/steps/mail/check_recent.inc
+++ b/program/steps/mail/check_recent.inc
@@ -72,7 +72,7 @@
         if ($all_count) {
             $a_headers = $IMAP->list_headers($mbox_name, null, $_SESSION['sort_col'], $_SESSION['sort_order']);
             // add message rows
-            rcmail_js_message_list($a_headers, false, false);
+            rcmail_js_message_list($a_headers, false);
             // remove messages that don't exists from list selection array
             $OUTPUT->command('update_selection');
         }
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 09ef4c5..01b7c1f 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -221,7 +221,7 @@
  * return javascript commands to add rows to the message list
  * or to replace the whole list (IE only)
  */
-function rcmail_js_message_list($a_headers, $insert_top=FALSE, $replace=TRUE, $head_replace=FALSE)
+function rcmail_js_message_list($a_headers, $insert_top=FALSE, $head_replace=FALSE)
 {
   global $CONFIG, $IMAP, $OUTPUT;
 
@@ -250,9 +250,6 @@
     unset($a_show_cols[$key]);
   if(($key = array_search('flag', $a_show_cols)) !== FALSE)
     unset($a_show_cols[$key]);
-
-  if ($OUTPUT->browser->ie && $replace)
-    $OUTPUT->command('offline_message_list', true);
 
   // loop through message headers
   foreach ($a_headers as $n => $header)
@@ -314,9 +311,6 @@
       $a_msg_flags,
       $insert_top);
     }
-
-  if ($browser->ie && $replace)
-    $OUTPUT->command('offline_message_list', false);
 }
 
 
diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc
index dcca80b..85e71a1 100644
--- a/program/steps/mail/list.inc
+++ b/program/steps/mail/list.inc
@@ -83,7 +83,7 @@
 $OUTPUT->command('set_mailboxname', rcmail_get_mailbox_name_text());
 
 // add message rows
-rcmail_js_message_list($a_headers, FALSE, TRUE, (bool) $cols);
+rcmail_js_message_list($a_headers, FALSE, (bool) $cols);
 if (isset($a_headers) && count($a_headers))
 {
   if ($search_request)
diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc
index ae8f0e3..973ce68 100644
--- a/program/steps/mail/mark.inc
+++ b/program/steps/mail/mark.inc
@@ -114,7 +114,7 @@
         $a_headers = $IMAP->list_headers($mbox, NULL, $sort_col, $sort_order,
 	    $jump_back ? NULL : $count);
 
-        rcmail_js_message_list($a_headers, false, false);
+        rcmail_js_message_list($a_headers, false);
       }
     }
   }
diff --git a/program/steps/mail/move_del.inc b/program/steps/mail/move_del.inc
index f6d8d98..11eb242 100644
--- a/program/steps/mail/move_del.inc
+++ b/program/steps/mail/move_del.inc
@@ -128,7 +128,7 @@
     $a_headers = $IMAP->list_headers($mbox, NULL, $sort_col, $sort_order,
       $jump_back ? NULL : $count);
 
-    rcmail_js_message_list($a_headers, false, false);
+    rcmail_js_message_list($a_headers, false);
   }
 }
 

--
Gitblit v1.9.1