Changeset 2576 in subversion
- Timestamp:
- May 30, 2009 11:10:35 AM (4 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 3 edited
-
CHANGELOG (modified) (1 diff)
-
program/js/app.js (modified) (6 diffs)
-
program/steps/mail/move_del.inc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r2563 r2576 2 2 =========================== 3 3 4 - After move/delete from 'show' action display next message instead of messages list (#1485887) 4 5 - Fixed problem with double quote at the end of folder name (#1485884) 5 6 - Speedup UI by using CSS sprites and etags/expires/deflate in Apache config (#1484858,#1485800) -
trunk/roundcubemail/program/js/app.js
r2550 r2576 1798 1798 1799 1799 // Hide message command buttons until a message is selected 1800 this.enable_command('reply', 'reply-all', 'forward', 'delete', 'mark', 'print', false);1800 this.enable_command('reply', 'reply-all', 'forward', 'delete', 'mark', 'print', 'open', 'viewsource', 'download', false); 1801 1801 1802 1802 this._with_selected_messages('moveto', lock, add_url, (this.env.flag_for_deletion ? false : true)); … … 1810 1810 // exit if no mailbox specified or if selection is empty 1811 1811 if (!this.env.uid && !selection.length) 1812 return;1812 return; 1813 1813 1814 1814 // if there is a trash mailbox defined and we're not currently in it: … … 1831 1831 { 1832 1832 this.mark_message('delete'); 1833 if (this.env.action=="show")1834 this.command('nextmessage', '',this);1833 if (this.env.action == 'show') 1834 this.command('nextmessage', '', this); 1835 1835 else if (selection.length == 1) 1836 1836 this.message_list.select_next(); … … 1885 1885 if (this.env.search_request) 1886 1886 add_url += '&_search='+this.env.search_request; 1887 1888 if (this.env.next_uid) 1889 add_url += '&_next_uid='+this.env.next_uid; 1887 1890 1888 1891 // send request to server … … 3930 3933 3931 3934 case 'moveto': 3932 if (this.env.action == 'show') 3933 this.command('list'); 3934 else if (this.message_list) 3935 if (this.env.action == 'show') { 3936 // re-enable commands on move/delete error 3937 this.enable_command('reply', 'reply-all', 'forward', 'delete', 'mark', 'print', 'open', 'viewsource', 'download', true); 3938 } else if (this.message_list) 3935 3939 this.message_list.init(); 3936 3940 break; … … 3943 3947 this.show_contentframe(false); 3944 3948 // disable commands useless when mailbox is empty 3945 this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'delete', 'mark', 'viewsource', 3946 'print', 'load-attachment', 'purge', 'expunge', 'select-all', 'select-none', 'sort', false); 3949 this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'delete', 3950 'mark', 'viewsource', 'open', 'download', 'print', 'load-attachment', 3951 'purge', 'expunge', 'select-all', 'select-none', 'sort', false); 3947 3952 } 3948 3953 break; -
trunk/roundcubemail/program/steps/mail/move_del.inc
r2414 r2576 38 38 if (!$moved) { 39 39 // send error message 40 $OUTPUT->command('list_mailbox'); 40 if ($_POST['_from'] != 'show') 41 $OUTPUT->command('list_mailbox'); 41 42 $OUTPUT->show_message('errormoving', 'error'); 42 43 $OUTPUT->send(); … … 55 56 if (!$del) { 56 57 // send error message 57 $OUTPUT->command('list_mailbox'); 58 if ($_POST['_from'] != 'show') 59 $OUTPUT->command('list_mailbox'); 58 60 $OUTPUT->show_message('errordeleting', 'error'); 59 61 $OUTPUT->send(); … … 67 69 exit; 68 70 } 71 69 72 // refresh saved search set after moving some messages 70 73 if (($search_request = get_input_value('_search', RCUBE_INPUT_GPC)) && $IMAP->search_set) { … … 72 75 } 73 76 74 $msg_count = $IMAP->messagecount(); 75 $pages = ceil($msg_count / $IMAP->page_size); 76 $nextpage_count = $old_count - $IMAP->page_size * $IMAP->list_page; 77 $remaining = $msg_count - $IMAP->page_size * ($IMAP->list_page - 1); 77 if ($_POST['_from'] == 'show') 78 { 79 if ($next = get_input_value('_next_uid', RCUBE_INPUT_GPC)) 80 $OUTPUT->command('show_message', $next); 81 else 82 $OUTPUT->command('command', 'list'); 83 } 84 else 85 { 86 $msg_count = $IMAP->messagecount(); 87 $pages = ceil($msg_count / $IMAP->page_size); 88 $nextpage_count = $old_count - $IMAP->page_size * $IMAP->list_page; 89 $remaining = $msg_count - $IMAP->page_size * ($IMAP->list_page - 1); 78 90 79 // jump back one page (user removed the whole last page)80 if ($IMAP->list_page > 1 && $nextpage_count <= 0 && $remaining == 0) {91 // jump back one page (user removed the whole last page) 92 if ($IMAP->list_page > 1 && $nextpage_count <= 0 && $remaining == 0) { 81 93 $IMAP->set_page($IMAP->list_page-1); 82 94 $_SESSION['page'] = $IMAP->list_page; 83 95 $jump_back = true; 84 }96 } 85 97 86 // update message count display 87 $OUTPUT->set_env('pagecount', $pages); 88 $OUTPUT->set_env('messagecount', $msg_count); 89 $OUTPUT->set_env('current_page', $IMAP->list_page); 90 $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count)); 98 // update message count display 99 $OUTPUT->set_env('messagecount', $msg_count); 100 $OUTPUT->set_env('current_page', $IMAP->list_page); 101 $OUTPUT->set_env('pagecount', $pages); 91 102 92 // update mailboxlist93 $mbox = $IMAP->get_mailbox_name();94 $OUTPUT->command('set_unread_count', $mbox, $IMAP->messagecount($mbox, 'UNSEEN'), ($mbox == 'INBOX'));103 // update mailboxlist 104 $mbox = $IMAP->get_mailbox_name(); 105 $OUTPUT->command('set_unread_count', $mbox, $IMAP->messagecount($mbox, 'UNSEEN'), ($mbox == 'INBOX')); 95 106 96 if ($RCMAIL->action=='moveto' && $target) {107 if ($RCMAIL->action=='moveto' && $target) { 97 108 $OUTPUT->command('set_unread_count', $target, $IMAP->messagecount($target, 'UNSEEN')); 98 }109 } 99 110 100 $OUTPUT->command('set_quota', rcmail_quota_content($IMAP->get_quota())); 111 $OUTPUT->command('set_quota', rcmail_quota_content($IMAP->get_quota())); 112 $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count)); 101 113 102 // add new rows from next page (if any)103 if ($addrows && $_POST['_from']!='show'&& ($jump_back || $nextpage_count > 0)) {114 // add new rows from next page (if any) 115 if ($addrows && ($jump_back || $nextpage_count > 0)) { 104 116 $sort_col = isset($_SESSION['sort_col']) ? $_SESSION['sort_col'] : $CONFIG['message_sort_col']; 105 117 $sort_order = isset($_SESSION['sort_order']) ? $_SESSION['sort_order'] : $CONFIG['message_sort_order']; … … 110 122 } 111 123 rcmail_js_message_list($a_headers, false, false); 124 } 112 125 } 113 126 114 127 // send response 115 128 $OUTPUT->send(); 129 130 ?>
Note: See TracChangeset
for help on using the changeset viewer.
