- remove offline message list generation on IE, this doesn't realy improve performance now
| | |
| | | } |
| | | }; |
| | | |
| | | // 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 |
| | |
| | | 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'); |
| | | } |
| | |
| | | * 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; |
| | | |
| | |
| | | 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) |
| | |
| | | $a_msg_flags, |
| | | $insert_top); |
| | | } |
| | | |
| | | if ($browser->ie && $replace) |
| | | $OUTPUT->command('offline_message_list', false); |
| | | } |
| | | |
| | | |
| | |
| | | $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) |
| | |
| | | $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); |
| | | } |
| | | } |
| | | } |
| | |
| | | $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); |
| | | } |
| | | } |
| | | |