Changeset c50d887 in github
- Timestamp:
- Nov 3, 2010 10:19:48 AM (3 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 8738e94
- Parents:
- 8f558fc
- Files:
-
- 11 edited
-
CHANGELOG (modified) (1 diff)
-
program/js/app.js (modified) (14 diffs)
-
program/localization/en_US/messages.inc (modified) (2 diffs)
-
program/localization/pl_PL/messages.inc (modified) (2 diffs)
-
program/steps/addressbook/delete.inc (modified) (1 diff)
-
program/steps/addressbook/groups.inc (modified) (7 diffs)
-
program/steps/mail/copy.inc (modified) (2 diffs)
-
program/steps/mail/func.inc (modified) (1 diff)
-
program/steps/mail/mark.inc (modified) (1 diff)
-
program/steps/mail/move_del.inc (modified) (3 diffs)
-
program/steps/mail/show.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
reeb85f4 rc50d887 61 61 - Support contact's email addresses up to 255 characters long (#1487095) 62 62 - Add option to place replies in the folder of the message being replied to (#1485945) 63 - Add missing confirmation/error messages on contact/group/message actions (#1486845) 64 - Add 'loading' message on message move/copy/delete/mark actions 63 65 64 66 RELEASE 0.4.2 -
program/js/app.js
rd808ba6 rc50d887 2363 2363 2364 2364 var a_uids = [], 2365 lock = this.display_message(this.get_label('copyingmessage'), 'loading'), 2365 2366 add_url = '&_target_mbox='+urlencode(mbox)+'&_from='+(this.env.action ? this.env.action : ''); 2366 2367 … … 2375 2376 2376 2377 // send request to server 2377 this.http_post('copy', '_uid='+a_uids.join(',')+'&_mbox='+urlencode(this.env.mailbox)+add_url, false);2378 this.http_post('copy', '_uid='+a_uids.join(',')+'&_mbox='+urlencode(this.env.mailbox)+add_url, lock); 2378 2379 }; 2379 2380 … … 2426 2427 } 2427 2428 // if there isn't a defined trash mailbox or we are in it 2428 else if (!this.env.trash_mailbox || this.env.mailbox == this.env.trash_mailbox) 2429 else if (!this.env.trash_mailbox || this.env.mailbox == this.env.trash_mailbox) 2429 2430 this.permanently_remove_messages(); 2430 2431 // if there is a trash mailbox defined and we're not currently in it … … 2457 2458 this._with_selected_messages = function(action, lock, add_url) 2458 2459 { 2459 var a_uids = [], count = 0 ;2460 var a_uids = [], count = 0, msg; 2460 2461 2461 2462 if (this.env.uid) … … 2487 2488 } 2488 2489 2489 // also send search request to get the right messages 2490 // also send search request to get the right messages 2490 2491 if (this.env.search_request) 2491 2492 add_url += '&_search='+this.env.search_request; … … 2501 2502 2502 2503 add_url += '&_uid='+this.uids_to_list(a_uids); 2504 2505 if (!lock) { 2506 msg = action == 'moveto' ? 'movingmessage' : 'deletingmessage'; 2507 lock = this.display_message(this.get_label(msg), 'loading'); 2508 } 2503 2509 2504 2510 // send request to server … … 2565 2571 this.set_message(a_uids[i], 'unread', (flag=='unread' ? true : false)); 2566 2572 2567 var url = '_uid='+this.uids_to_list(a_uids)+'&_flag='+flag; 2573 var url = '_uid='+this.uids_to_list(a_uids)+'&_flag='+flag, 2574 lock = this.display_message(this.get_label('markingmessage'), 'loading'); 2568 2575 2569 2576 // also send search request to get the right messages … … 2571 2578 url += '&_search='+this.env.search_request; 2572 2579 2573 this.http_post('mark', url );2580 this.http_post('mark', url, lock); 2574 2581 2575 2582 for (var i=0; i<a_uids.length; i++) … … 2584 2591 this.set_message(a_uids[i], 'flagged', (flag=='flagged' ? true : false)); 2585 2592 2586 var url = '_uid='+this.uids_to_list(a_uids)+'&_flag='+flag; 2593 var url = '_uid='+this.uids_to_list(a_uids)+'&_flag='+flag, 2594 lock = this.display_message(this.get_label('markingmessage'), 'loading'); 2587 2595 2588 2596 // also send search request to get the right messages … … 2590 2598 url += '&_search='+this.env.search_request; 2591 2599 2592 this.http_post('mark', url );2600 this.http_post('mark', url, lock); 2593 2601 }; 2594 2602 … … 2629 2637 this.set_message(a_uids[i], 'deleted', false); 2630 2638 2631 var url = '_uid='+this.uids_to_list(a_uids)+'&_flag=undelete'; 2639 var url = '_uid='+this.uids_to_list(a_uids)+'&_flag=undelete', 2640 lock = this.display_message(this.get_label('markingmessage'), 'loading'); 2632 2641 2633 2642 // also send search request to get the right messages … … 2635 2644 url += '&_search='+this.env.search_request; 2636 2645 2637 this.http_post('mark', url );2646 this.http_post('mark', url, lock); 2638 2647 return true; 2639 2648 }; … … 2672 2681 } 2673 2682 2674 add_url = '&_from='+(this.env.action ? this.env.action : ''); 2683 add_url = '&_from='+(this.env.action ? this.env.action : ''), 2684 lock = this.display_message(this.get_label('markingmessage'), 'loading'); 2675 2685 2676 2686 // ?? … … 2687 2697 add_url += '&_search='+this.env.search_request; 2688 2698 2689 this.http_post('mark', '_uid='+this.uids_to_list(a_uids)+'&_flag=delete'+add_url );2690 return true; 2699 this.http_post('mark', '_uid='+this.uids_to_list(a_uids)+'&_flag=delete'+add_url, lock); 2700 return true; 2691 2701 }; 2692 2702 -
program/localization/en_US/messages.inc
r2d1d68b rc50d887 88 88 $messages['sourceisreadonly'] = 'This address source is read only'; 89 89 $messages['errorsavingcontact'] = 'Could not save the contact address'; 90 $messages['movingmessage'] = 'Moving message...'; 91 $messages['copyingmessage'] = 'Copying message...'; 90 $messages['movingmessage'] = 'Moving message(s)...'; 91 $messages['copyingmessage'] = 'Copying message(s)...'; 92 $messages['deletingmessage'] = 'Deleting message(s)...'; 93 $messages['markingmessage'] = 'Marking message(s)...'; 92 94 $messages['receiptsent'] = 'Successfully sent a read receipt'; 93 95 $messages['errorsendingreceipt'] = 'Could not send the receipt'; … … 117 119 $messages['maxgroupmembersreached'] = 'The number of group members exceeds the maximum of $max'; 118 120 $messages['internalerror'] = 'An internal error occured. Please try again'; 121 $messages['contactdelerror'] = 'Could not delete contact(s)'; 122 $messages['contactdeleted'] = 'Contact(s) deleted successfully'; 123 $messages['groupdeleted'] = 'Group deleted successfully'; 124 $messages['grouprenamed'] = 'Group renamed successfully'; 125 $messages['groupcreated'] = 'Group created successfully'; 126 $messages['messagedeleted'] = 'Message(s) deleted successfully'; 127 $messages['messagemoved'] = 'Message(s) moved successfully'; 128 $messages['messagecopied'] = 'Message(s) copied successfully'; 129 $messages['messagemarked'] = 'Message(s) marked successfully'; 119 130 120 131 ?> -
program/localization/pl_PL/messages.inc
r2d1d68b rc50d887 122 122 $messages['movingmessage'] = 'Przenoszenie wiadomoÅci...'; 123 123 $messages['copyingmessage'] = 'Kopiowanie wiadomoÅci...'; 124 $messages['deletingmessage'] = 'Usuwanie wiadomoÅci...'; 125 $messages['markingmessage'] = 'Oznaczanie wiadomoÅci...'; 124 126 $messages['receiptsent'] = 'PomyÅlnie wysÅano potwierdzenie dostarczenia'; 125 127 $messages['errorsendingreceipt'] = 'Nie moÅŒna wysÅaÄ potwierdzenia'; … … 166 168 $messages['internalerror'] = 'WystÄ 167 169 piÅ wewnÄtrzny bÅÄ 168 d systemu. Spróbuj jeszcze raz' 170 d systemu. Spróbuj jeszcze raz'; 171 $messages['contactdelerror'] = 'Usuwanie kontaktów nie powiodÅo siÄ'; 172 $messages['contactdeleted'] = 'Kontakt(y) zostaÅ(y) usuniÄte'; 173 $messages['groupdeleted'] = 'Grupa zostaÅa usuniÄta'; 174 $messages['grouprenamed'] = 'Nazwa grupy zostaÅa zmieniona'; 175 $messages['groupcreated'] = 'Grupa zostaÅa utworzona'; 176 $messages['messagedeleted'] = 'WiadomoÅci zostaÅy usuniÄte'; 177 $messages['messagemoved'] = 'WiadomoÅci zostaÅy przeniesione'; 178 $messages['messagecopied'] = 'WiadomoÅci zostaÅy skopiowane'; 179 $messages['messagemarked'] = 'WiadomoÅci zostaÅy oznaczone'; 169 180 170 181 ?> -
program/steps/addressbook/delete.inc
rce92ba7 rc50d887 24 24 preg_match('/^[a-zA-Z0-9\+\/=_-]+(,[a-zA-Z0-9\+\/=_-]+)*$/', $cid) 25 25 ) { 26 $plugin = $RCMAIL->plugins->exec_hook('contact_delete', array(27 'id' => $cid, 'source' => get_input_value('_source', RCUBE_INPUT_GPC)));26 $plugin = $RCMAIL->plugins->exec_hook('contact_delete', array( 27 'id' => $cid, 'source' => get_input_value('_source', RCUBE_INPUT_GPC))); 28 28 29 $deleted = !$plugin['abort'] ? $CONTACTS->delete($cid) : $plugin['result'];29 $deleted = !$plugin['abort'] ? $CONTACTS->delete($cid) : $plugin['result']; 30 30 31 if (!$deleted) { 32 // send error message 33 exit; 34 } 31 if (!$deleted) { 32 $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'contactdelerror', 'error'); 33 $OUTPUT->command('list_contacts'); 34 } 35 else { 36 $OUTPUT->show_message('contactdeleted', 'confirmation'); 35 37 36 // count contacts for this user37 $result = $CONTACTS->count();38 // count contacts for this user 39 $result = $CONTACTS->count(); 38 40 39 // update message count display40 $OUTPUT->set_env('pagecount', ceil($result->count / $CONTACTS->page_size));41 $OUTPUT->command('set_rowcount', rcmail_get_rowcount_text($result->count));41 // update message count display 42 $OUTPUT->set_env('pagecount', ceil($result->count / $CONTACTS->page_size)); 43 $OUTPUT->command('set_rowcount', rcmail_get_rowcount_text($result->count)); 42 44 43 // add new rows from next page (if any) 44 $pages = ceil(($result->count + $deleted) / $CONTACTS->page_size); 45 if ($_GET['_from'] != 'show' && $pages > 1 && $CONTACTS->list_page < $pages) 46 rcmail_js_contacts_list($CONTACTS->list_records(null, -$deleted)); 45 // add new rows from next page (if any) 46 $pages = ceil(($result->count + $deleted) / $CONTACTS->page_size); 47 if ($_GET['_from'] != 'show' && $pages > 1 && $CONTACTS->list_page < $pages) 48 rcmail_js_contacts_list($CONTACTS->list_records(null, -$deleted)); 49 } 47 50 48 // send response49 $OUTPUT->send();51 // send response 52 $OUTPUT->send(); 50 53 } 51 54 -
program/steps/addressbook/groups.inc
rce92ba7 rc50d887 30 30 if (($gid = get_input_value('_gid', RCUBE_INPUT_POST)) && ($ids = get_input_value('_cid', RCUBE_INPUT_POST))) { 31 31 $plugin = $RCMAIL->plugins->exec_hook('group_addmembers', array('group_id' => $gid, 'ids' => $ids, 'source' => $source)); 32 32 33 33 $CONTACTS->set_group($gid); 34 34 $num2add = count(explode(',', $plugin['ids'])); 35 35 36 36 if (!$plugin['abort']) { 37 37 if (($maxnum = $RCMAIL->config->get('max_group_members', 0)) && ($CONTACTS->count()->count + $num2add > $maxnum)) { … … 45 45 } 46 46 47 if ($result) 47 if ($result) 48 48 $OUTPUT->show_message('contactaddedtogroup'); 49 else if ($plugin['message'])50 $OUTPUT->show_message($plugin['message'] , 'warning');49 else 50 $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); 51 51 } 52 52 } … … 55 55 if (($gid = get_input_value('_gid', RCUBE_INPUT_POST)) && ($ids = get_input_value('_cid', RCUBE_INPUT_POST))) { 56 56 $plugin = $RCMAIL->plugins->exec_hook('group_delmembers', array('group_id' => $gid, 'ids' => $ids, 'source' => $source)); 57 57 58 58 if (!$plugin['abort']) 59 59 $result = $CONTACTS->remove_from_group($gid, $plugin['ids']); … … 61 61 $result = $plugin['result']; 62 62 63 if ($result) 63 if ($result) 64 64 $OUTPUT->show_message('contactremovedfromgroup'); 65 else if ($plugin['message'])66 $OUTPUT->show_message($plugin['message'] , 'warning');65 else 66 $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); 67 67 } 68 68 } … … 77 77 $created = $plugin['result']; 78 78 } 79 79 80 80 if ($created && $OUTPUT->ajax_call) { 81 $ created['source'] = $source;82 $OUTPUT->command('insert_contact_group', $created);81 $OUTPUT->show_message('groupcreated', 'confirmation'); 82 $OUTPUT->command('insert_contact_group', array('source' => $created)); 83 83 } 84 84 else if (!$created) { … … 97 97 } 98 98 99 if ($newname && $OUTPUT->ajax_call) 99 if ($newname && $OUTPUT->ajax_call) { 100 $OUTPUT->show_message('grouprenamed', 'confirmation'); 100 101 $OUTPUT->command('update_contact_group', array('source' => $source, 'id' => $gid, 'name' => $newname)); 102 } 101 103 else if (!$newname) 102 104 $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); … … 113 115 } 114 116 115 if ($deleted) 117 if ($deleted) { 118 $OUTPUT->show_message('groupdeleted', 'confirmation'); 116 119 $OUTPUT->command('remove_group_item', array('source' => $source, 'id' => $gid)); 120 } 117 121 else 118 122 $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'errorsaving', 'error'); -
program/steps/mail/copy.inc
re019f2d rc50d887 35 35 36 36 $copied = $IMAP->copy_message($uids, $target, $mbox); 37 37 38 38 if (!$copied) { 39 39 // send error message … … 41 41 $OUTPUT->send(); 42 42 exit; 43 } 44 else { 45 $OUTPUT->show_message('messagecopied', 'confirmation'); 43 46 } 44 47 -
program/steps/mail/func.inc
re0bd705 rc50d887 132 132 if (!$OUTPUT->ajax_call) 133 133 $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 134 'movingmessage', 'copyingmessage', 'copy', 'move', 'quota'); 134 'movingmessage', 'copyingmessage', 'deletingmessage', 'markingmessage', 135 'copy', 'move', 'quota'); 135 136 136 137 $OUTPUT->set_pagetitle(rcmail_localize_foldername($mbox_name)); -
program/steps/mail/mark.inc
rc309cd8 rc50d887 51 51 $OUTPUT->send(); 52 52 exit; 53 } 54 else { 55 $OUTPUT->show_message('messagemarked', 'confirmation'); 53 56 } 54 57 -
program/steps/mail/move_del.inc
rf6aac38 rc50d887 44 44 exit; 45 45 } 46 else { 47 $OUTPUT->show_message('messagemoved', 'confirmation'); 48 } 46 49 47 50 $addrows = true; … … 53 56 54 57 $del = $IMAP->delete_message($uids, $mbox); 55 58 56 59 if (!$del) { 57 60 // send error message … … 62 65 exit; 63 66 } 64 67 else { 68 $OUTPUT->show_message('messagedeleted', 'confirmation'); 69 } 70 65 71 $addrows = true; 66 72 } -
program/steps/mail/show.inc
r80bc55e rc50d887 67 67 68 68 if (!$OUTPUT->ajax_call) 69 $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage'); 69 $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 70 'movingmessage', 'deletingmessage'); 70 71 71 72 // check for unset disposition notification
Note: See TracChangeset
for help on using the changeset viewer.
