Changeset 3419 in subversion
- Timestamp:
- Mar 25, 2010 12:29:02 PM (3 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 11 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/rcube_imap.php (modified) (5 diffs)
-
program/js/app.js (modified) (13 diffs)
-
program/lib/imap.inc (modified) (1 diff)
-
program/localization/en_US/labels.inc (modified) (1 diff)
-
program/localization/pl_PL/labels.inc (modified) (1 diff)
-
program/steps/mail/mark.inc (modified) (2 diffs)
-
program/steps/mail/move_del.inc (modified) (3 diffs)
-
skins/default/images/mail_footer.png (modified) (previous)
-
skins/default/mail.css (modified) (1 diff)
-
skins/default/templates/mail.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r3415 r3419 2 2 =========================== 3 3 4 - Added possibility to select all messages in a folder (#1484756) 4 5 - Added 'imap_force_caps' option for after-login CAPABILITY checking (#1485750) 5 6 - Password: Support dovecotpw encryption -
trunk/roundcubemail/program/include/rcube_imap.php
r3413 r3419 2116 2116 2117 2117 $flag = strtoupper($flag); 2118 list($uids, $all_mode) = $this->_parse_uids($uids );2118 list($uids, $all_mode) = $this->_parse_uids($uids, $mailbox); 2119 2119 2120 2120 if (strpos($flag, 'UN') === 0) … … 2210 2210 $from_mbox = $from_mbox ? $this->mod_mailbox($from_mbox) : $this->mailbox; 2211 2211 2212 list($uids, $all_mode) = $this->_parse_uids($uids );2212 list($uids, $all_mode) = $this->_parse_uids($uids, $from_mbox); 2213 2213 2214 2214 // exit if no message uids are specified … … 2292 2292 $from_mbox = $from_mbox ? $this->mod_mailbox($from_mbox) : $this->mailbox; 2293 2293 2294 list($uids, $all_mode) = $this->_parse_uids($uids );2294 list($uids, $all_mode) = $this->_parse_uids($uids, $from_mbox); 2295 2295 2296 2296 // exit if no message uids are specified … … 2330 2330 $mailbox = $mbox_name ? $this->mod_mailbox($mbox_name) : $this->mailbox; 2331 2331 2332 list($uids, $all_mode) = $this->_parse_uids($uids );2332 list($uids, $all_mode) = $this->_parse_uids($uids, $mailbox); 2333 2333 2334 2334 // exit if no message uids are specified … … 2451 2451 * 2452 2452 * @param mixed UIDs array or comma-separated list or '*' or '1:*' 2453 * @param string Mailbox name 2453 2454 * @return array Two elements array with UIDs converted to list and ALL flag 2454 2455 * @access private 2455 2456 */ 2456 private function _parse_uids($uids )2457 private function _parse_uids($uids, $mailbox) 2457 2458 { 2458 2459 if ($uids === '*' || $uids === '1:*') { 2459 $uids = '1:*'; 2460 $all = true; 2460 if (empty($this->search_set)) { 2461 $uids = '1:*'; 2462 $all = true; 2463 } 2464 // get UIDs from current search set 2465 // @TODO: skip iil_C_FetchUIDs() and work with IDs instead of UIDs (?) 2466 else { 2467 if ($this->search_threads) 2468 $uids = iil_C_FetchUIDs($this->conn, $mailbox, array_keys($this->search_set['depth'])); 2469 else 2470 $uids = iil_C_FetchUIDs($this->conn, $mailbox, $this->search_set); 2471 2472 // save ID-to-UID mapping in local cache 2473 if (is_array($uids)) 2474 foreach ($uids as $id => $uid) 2475 $this->uid_id_map[$mailbox][$uid] = $id; 2476 2477 $uids = join(',', $uids); 2478 } 2461 2479 } 2462 2480 else { -
trunk/roundcubemail/program/js/app.js
r3411 r3419 490 490 case 'menu-open': 491 491 case 'menu-save': 492 this.triggerEvent(command, {props:props});493 return false;492 this.triggerEvent(command, {props:props}); 493 return false; 494 494 break; 495 495 … … 754 754 755 755 case 'select-all': 756 this.select_all_mode = props ? false : true; 756 757 if (props == 'invert') 757 758 this.message_list.invert_selection(); 758 759 else 759 this.message_list.select_all(props );760 this.message_list.select_all(props == 'page' ? '' : props); 760 761 break; 761 762 … … 1834 1835 // unselect selected messages 1835 1836 this.last_selected = 0; 1836 if (this.message_list) 1837 if (this.message_list) { 1837 1838 this.message_list.clear_selection(); 1838 1839 this.select_all_mode = false; 1840 } 1839 1841 this.select_folder(mbox, this.env.mailbox); 1840 1842 this.env.mailbox = mbox; … … 2255 2257 this._with_selected_messages = function(action, lock, add_url) 2256 2258 { 2257 var a_uids = new Array() ;2258 varcount = 0;2259 var a_uids = new Array(), 2260 count = 0; 2259 2261 2260 2262 if (this.env.uid) … … 2288 2290 this.delete_excessive_thread_rows(); 2289 2291 2292 add_url += '&_uid='+this.uids_to_list(a_uids); 2293 2290 2294 // send request to server 2291 this.http_post(action, '_ uid='+a_uids.join(',')+'&_mbox='+urlencode(this.env.mailbox)+add_url, lock);2295 this.http_post(action, '_mbox='+urlencode(this.env.mailbox)+add_url, lock); 2292 2296 }; 2293 2297 … … 2356 2360 this.set_message(a_uids[i], 'unread', (flag=='unread' ? true : false)); 2357 2361 2358 this.http_post('mark', '_uid='+ a_uids.join(',')+'&_flag='+flag);2362 this.http_post('mark', '_uid='+this.uids_to_list(a_uids)+'&_flag='+flag); 2359 2363 2360 2364 for (var i=0; i<a_uids.length; i++) … … 2369 2373 this.set_message(a_uids[i], 'flagged', (flag=='flagged' ? true : false)); 2370 2374 2371 this.http_post('mark', '_uid='+ a_uids.join(',')+'&_flag='+flag);2375 this.http_post('mark', '_uid='+this.uids_to_list(a_uids)+'&_flag='+flag); 2372 2376 }; 2373 2377 … … 2413 2417 this.set_message(a_uids[i], 'deleted', false); 2414 2418 2415 this.http_post('mark', '_uid='+ a_uids.join(',')+'&_flag=undelete');2419 this.http_post('mark', '_uid='+this.uids_to_list(a_uids)+'&_flag=undelete'); 2416 2420 return true; 2417 2421 }; … … 2419 2423 this.flag_as_deleted = function(a_uids) 2420 2424 { 2421 var add_url = ''; 2422 var r_uids = new Array(); 2423 var rows = this.message_list ? this.message_list.rows : new Array(); 2424 var count = 0; 2425 2426 for (var i=0; i<a_uids.length; i++) 2427 { 2425 var add_url = '', 2426 r_uids = new Array(), 2427 rows = this.message_list ? this.message_list.rows : new Array(), 2428 count = 0; 2429 2430 for (var i=0; i<a_uids.length; i++) { 2428 2431 uid = a_uids[i]; 2429 if (rows[uid]) 2430 { 2432 if (rows[uid]) { 2431 2433 if (rows[uid].unread) 2432 2434 r_uids[r_uids.length] = uid; 2433 2435 2434 if (this.env.skip_deleted) {2435 count += this.update_thread(uid);2436 if (this.env.skip_deleted) { 2437 count += this.update_thread(uid); 2436 2438 this.message_list.remove_row(uid, (this.env.display_next && i == this.message_list.selection.length-1)); 2437 }2438 else2439 this.set_message(uid, 'deleted', true);2440 }2441 }2439 } 2440 else 2441 this.set_message(uid, 'deleted', true); 2442 } 2443 } 2442 2444 2443 2445 // make sure there are no selected rows 2444 2446 if (this.env.skip_deleted && this.message_list) { 2445 2447 if(!this.env.display_next) 2446 this.message_list.clear_selection();2448 this.message_list.clear_selection(); 2447 2449 if (count < 0) 2448 2450 add_url += '&_count='+(count*-1); … … 2450 2452 // remove threads from the end of the list 2451 2453 this.delete_excessive_thread_rows(); 2452 }2454 } 2453 2455 2454 2456 add_url = '&_from='+(this.env.action ? this.env.action : ''); 2455 2457 2458 // ?? 2456 2459 if (r_uids.length) 2457 add_url += '&_ruid='+ r_uids.join(',');2460 add_url += '&_ruid='+this.uids_to_list(r_uids); 2458 2461 2459 2462 if (this.env.skip_deleted) { … … 2465 2468 } 2466 2469 2467 this.http_post('mark', '_uid='+ a_uids.join(',')+'&_flag=delete'+add_url);2470 this.http_post('mark', '_uid='+this.uids_to_list(a_uids)+'&_flag=delete'+add_url); 2468 2471 return true; 2469 2472 }; … … 2473 2476 this.flag_deleted_as_read = function(uids) 2474 2477 { 2475 var icn_src; 2476 var rows = this.message_list ? this.message_list.rows : new Array(); 2477 var str = String(uids); 2478 var a_uids = new Array(); 2479 2480 a_uids = str.split(','); 2481 2482 for (var uid, i=0; i<a_uids.length; i++) 2483 { 2478 var icn_src, uid, 2479 rows = this.message_list ? this.message_list.rows : new Array(), 2480 str = String(uids), 2481 a_uids = str.split(','); 2482 2483 for (var i=0; i<a_uids.length; i++) { 2484 2484 uid = a_uids[i]; 2485 2485 if (rows[uid]) … … 2488 2488 }; 2489 2489 2490 // Converts array of message UIDs to comma-separated list for use in URL 2491 // with select_all mode checking 2492 this.uids_to_list = function(uids) 2493 { 2494 return this.select_all_mode ? '*' : uids.join(','); 2495 }; 2496 2490 2497 2491 2498 /*********************************************************/ -
trunk/roundcubemail/program/lib/imap.inc
r3416 r3419 1067 1067 } 1068 1068 1069 function iil_C_FetchUIDs(&$conn, $mailbox) {1069 function iil_C_FetchUIDs(&$conn, $mailbox, $message_set=null) { 1070 1070 global $clock; 1071 1072 $num = iil_C_CountMessages($conn, $mailbox); 1073 if ($num == 0) { 1074 return array(); 1075 } 1076 $message_set = '1' . ($num>1?':' . $num:''); 1077 1078 return iil_C_FetchHeaderIndex($conn, $mailbox, $message_set, 'UID'); 1071 1072 if (is_array($message_set)) 1073 $message_set = join(',', $message_set); 1074 else if (empty($message_set)) 1075 $message_set = '1:*'; 1076 1077 return iil_C_FetchHeaderIndex($conn, $mailbox, $message_set, 'UID', false); 1079 1078 } 1080 1079 -
trunk/roundcubemail/program/localization/en_US/labels.inc
r3385 r3419 147 147 $labels['all'] = 'All'; 148 148 $labels['none'] = 'None'; 149 $labels['currpage'] = 'Current page'; 149 150 $labels['unread'] = 'Unread'; 150 151 $labels['flagged'] = 'Flagged'; -
trunk/roundcubemail/program/localization/pl_PL/labels.inc
r3385 r3419 143 143 $labels['select'] = 'Zaznacz'; 144 144 $labels['all'] = 'Wszystkie'; 145 $labels['currpage'] = 'BieÅŒÄ 146 ca strona'; 145 147 $labels['none'] = 'Brak'; 146 148 $labels['unread'] = 'Nieprzeczytane'; -
trunk/roundcubemail/program/steps/mail/mark.inc
r3367 r3419 53 53 } 54 54 55 if ($flag == 'DELETED' && $CONFIG['read_when_deleted'] && !empty($_POST['_ruid'])) {56 $ uids = get_input_value('_ruid', RCUBE_INPUT_POST);57 $read = $IMAP->set_flag($ uids, 'SEEN');55 if ($flag == 'DELETED' && $CONFIG['read_when_deleted'] && !empty($_POST['_ruid'])) { 56 $ruids = get_input_value('_ruid', RCUBE_INPUT_POST); 57 $read = $IMAP->set_flag($ruids, 'SEEN'); 58 58 59 59 if ($read != -1 && !$CONFIG['skip_deleted']) 60 $OUTPUT->command('flag_deleted_as_read', $ uids);60 $OUTPUT->command('flag_deleted_as_read', $ruids); 61 61 } 62 62 63 63 if ($flag == 'SEEN' || $flag == 'UNSEEN' || ($flag == 'DELETED' && !$CONFIG['skip_deleted'])) { 64 64 rcmail_send_unread_count($IMAP->get_mailbox_name()); … … 100 100 if ($old_unseen != $unseen_count) { 101 101 $OUTPUT->command('set_unread_count', $mbox, $unseen_count, ($mbox == 'INBOX')); 102 $_SESSION['unseen_count'][$mbox] = $unseen_count;102 $_SESSION['unseen_count'][$mbox] = $unseen_count; 103 103 } 104 104 $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($msg_count)); 105 105 106 106 if ($IMAP->threading) 107 $count = get_input_value('_count', RCUBE_INPUT_POST);107 $count = get_input_value('_count', RCUBE_INPUT_POST); 108 108 109 109 // add new rows from next page (if any) 110 if ($count && ($jump_back || $nextpage_count > 0)) {110 if ($count && $uids != '*' && ($jump_back || $nextpage_count > 0)) { 111 111 $sort_col = isset($_SESSION['sort_col']) ? $_SESSION['sort_col'] : $CONFIG['message_sort_col']; 112 112 $sort_order = isset($_SESSION['sort_order']) ? $_SESSION['sort_order'] : $CONFIG['message_sort_order']; 113 113 114 114 $a_headers = $IMAP->list_headers($mbox, NULL, $sort_col, $sort_order, 115 $jump_back ? NULL : $count);115 $jump_back ? NULL : $count); 116 116 117 117 rcmail_js_message_list($a_headers, false, false); -
trunk/roundcubemail/program/steps/mail/move_del.inc
r3367 r3419 35 35 36 36 $moved = $IMAP->move_message($uids, $target, $mbox); 37 37 38 38 if (!$moved) { 39 39 // send error message 40 if ($_POST['_from'] != 'show')41 $OUTPUT->command('list_mailbox');40 if ($_POST['_from'] != 'show') 41 $OUTPUT->command('list_mailbox'); 42 42 $OUTPUT->show_message('errormoving', 'error'); 43 43 $OUTPUT->send(); … … 56 56 if (!$del) { 57 57 // send error message 58 if ($_POST['_from'] != 'show')59 $OUTPUT->command('list_mailbox');58 if ($_POST['_from'] != 'show') 59 $OUTPUT->command('list_mailbox'); 60 60 $OUTPUT->show_message('errordeleting', 'error'); 61 61 $OUTPUT->send(); … … 122 122 123 123 // add new rows from next page (if any) 124 if ($addrows && $count && ($jump_back || $nextpage_count > 0)) {124 if ($addrows && $count && $uids != '*' && ($jump_back || $nextpage_count > 0)) { 125 125 $sort_col = isset($_SESSION['sort_col']) ? $_SESSION['sort_col'] : $CONFIG['message_sort_col']; 126 126 $sort_order = isset($_SESSION['sort_order']) ? $_SESSION['sort_order'] : $CONFIG['message_sort_order']; -
trunk/roundcubemail/skins/default/mail.css
r3405 r3419 580 580 } 581 581 582 #listcontrols a.page { 583 background-position: -135px 0; 584 } 585 586 #listcontrols a.pagesel { 587 background-position: -135px -15px; 588 } 589 582 590 #listcontrols a.unread { 583 591 background-position: -45px 0; -
trunk/roundcubemail/skins/default/templates/mail.html
r3392 r3419 82 82 <span><roundcube:label name="select" />: </span> 83 83 <roundcube:button command="select-all" type="link" title="all" class="buttonPas all" classAct="button all" classSel="button allsel" content=" " /> 84 <roundcube:button command="select-all" type="link" prop="page" title="currpage" class="buttonPas page" classAct="button page" classSel="button pagesel" content=" " /> 84 85 <roundcube:button command="select-all" type="link" prop="unread" title="unread" class="buttonPas unread" classAct="button unread" classSel="button unreadsel" content=" " /> 85 86 <roundcube:button command="select-all" type="link" prop="invert" title="invert" class="buttonPas invert" classAct="button invert" classSel="button invertsel" content=" " />
Note: See TracChangeset
for help on using the changeset viewer.
