Changeset bf2f39e in github
- Timestamp:
- Sep 29, 2008 9:02:02 AM (5 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 526d170
- Parents:
- f7028b2
- Files:
-
- 3 edited
-
CHANGELOG (modified) (1 diff)
-
program/js/app.js (modified) (99 diffs)
-
program/steps/mail/show.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
rffae15e5 rbf2f39e 8 8 in MS Outlook/OE (#1485320) 9 9 - Added "advanced options" feature in User Preferences 10 - Fix unread counter when displaying cached massage in preview panel (#1485290) 10 11 11 12 2008/09/25 (alec) -
program/js/app.js
r07d3670 rbf2f39e 65 65 }; 66 66 67 68 67 // add a localized label to the client environment 69 68 this.add_label = function(key, value) … … 71 70 this.labels[key] = value; 72 71 }; 73 74 72 75 73 // add a button to the button list … … 340 338 } 341 339 342 343 340 // enable basic commands 344 341 this.enable_command('logout', true); … … 353 350 // start keep-alive interval 354 351 this.start_keepalive(); 355 356 352 357 353 // execute all foreign onload scripts … … 364 360 } 365 361 }; 366 367 362 368 363 // start interval for keep-alive/recent_check signal … … 375 370 } 376 371 377 378 372 this.init_message_row = function(row) 379 373 { … … 415 409 } 416 410 }; 417 418 411 419 412 // init message compose form: set focus and eventhandlers … … 478 471 479 472 480 481 473 /*********************************************************/ 482 474 /********* client command interface *********/ 483 475 /*********************************************************/ 484 476 485 486 477 // execute a specific command on the web client 487 478 this.command = function(command, props, obj) … … 502 493 return false; 503 494 } 504 505 495 506 496 // check input before leaving compose step … … 1073 1063 }; 1074 1064 1075 1076 1065 // set command enabled or disabled 1077 1066 this.enable_command = function() … … 1091 1080 return true; 1092 1081 }; 1093 1094 1082 1095 1083 // lock/unlock interface … … 1122 1110 }; 1123 1111 1124 1125 1112 // return a localized string 1126 1113 this.get_label = function(name) … … 1132 1119 }; 1133 1120 1134 1135 1121 // switch to another application task 1136 1122 this.switch_task = function(task) … … 1146 1132 }; 1147 1133 1148 1149 1134 this.get_task_url = function(task, url) 1150 1135 { … … 1155 1140 }; 1156 1141 1157 1158 1142 // called when a request timed out 1159 1143 this.request_timed_out = function() … … 1167 1151 /********* event handling methods *********/ 1168 1152 /*********************************************************/ 1169 1170 1153 1171 1154 this.doc_mouse_up = function(e) … … 1265 1248 }; 1266 1249 1267 1268 1250 this.msglist_select = function(list) 1269 1251 { … … 1293 1275 }; 1294 1276 1295 1296 1277 this.msglist_dbl_click = function(list) 1297 1278 { … … 1305 1286 this.show_message(uid, false, false); 1306 1287 }; 1307 1308 1288 1309 1289 this.msglist_keypress = function(list) … … 1319 1299 }; 1320 1300 1321 1322 1301 this.msglist_get_preview = function() 1323 1302 { … … 1328 1307 this.show_contentframe(false); 1329 1308 }; 1330 1331 1309 1332 1310 this.check_droptarget = function(id) … … 1348 1326 this.show_message = function(id, safe, preview) 1349 1327 { 1328 if (!id) return; 1329 1350 1330 var add_url = ''; 1351 1331 var action = preview ? 'preview': 'show'; 1352 1332 var target = window; 1333 1353 1334 if (preview && this.env.contentframe && window.frames && window.frames[this.env.contentframe]) 1354 1335 { … … 1363 1344 if (this.env.search_request) 1364 1345 add_url += '&_search='+this.env.search_request; 1365 1366 if (id) 1367 { 1368 var url = '&_action='+action+'&_uid='+id+'&_mbox='+urlencode(this.env.mailbox)+add_url; 1369 if (action == 'preview' && String(target.location.href).indexOf(url) >= 0) 1370 this.show_contentframe(true); 1371 else 1372 { 1373 this.set_busy(true, 'loading'); 1374 target.location.href = this.env.comm_path+url; 1375 } 1376 } 1377 }; 1378 1346 var url = '&_action='+action+'&_uid='+id+'&_mbox='+urlencode(this.env.mailbox)+add_url; 1347 if (action == 'preview' && String(target.location.href).indexOf(url) >= 0) 1348 this.show_contentframe(true); 1349 else 1350 { 1351 this.set_busy(true, 'loading'); 1352 target.location.href = this.env.comm_path+url; 1353 // mark as read and change mbox unread counter 1354 if (action == 'preview' && this.message_list && this.message_list.rows[id] && this.message_list.rows[id].unread) 1355 { 1356 this.set_message(id, 'unread', false); 1357 if (this.env.unread_counts[this.env.mailbox]) 1358 { 1359 this.env.unread_counts[this.env.mailbox] -= 1; 1360 this.set_unread_count(this.env.mailbox, this.env.unread_counts[this.env.mailbox], this.env.mailbox == 'INBOX'); 1361 } 1362 } 1363 } 1364 }; 1379 1365 1380 1366 this.show_contentframe = function(show) … … 1395 1381 this.set_busy(false); 1396 1382 }; 1397 1398 1383 1399 1384 // list a specific page … … 1420 1405 }; 1421 1406 1422 1423 1407 // list messages of a specific mailbox 1424 1408 this.list_mailbox = function(mbox, page, sort) … … 1476 1460 }; 1477 1461 1478 1479 1462 // send remote request to load message list 1480 1463 this.list_mailbox_remote = function(mbox, page, add_url) … … 1488 1471 this.http_request('list', url+add_url, true); 1489 1472 }; 1490 1491 1473 1492 1474 this.expunge_mailbox = function(mbox) … … 1507 1489 this.http_post('expunge', url+add_url, lock); 1508 1490 }; 1509 1510 1491 1511 1492 this.purge_mailbox = function(mbox) … … 1695 1676 }; 1696 1677 1697 1698 1678 // delete the selected messages permanently 1699 1679 this.permanently_remove_messages = function() … … 1744 1724 this.http_post(action, '_uid='+a_uids.join(',')+'&_mbox='+urlencode(this.env.mailbox)+add_url, lock); 1745 1725 }; 1746 1747 1726 1748 1727 // set a specific flag to one or more messages … … 1859 1838 }; 1860 1839 1861 1862 1840 this.flag_as_undeleted = function(a_uids) 1863 1841 { … … 1869 1847 }; 1870 1848 1871 1872 1849 this.flag_as_deleted = function(a_uids) 1873 1850 { … … 1893 1870 return true; 1894 1871 }; 1895 1896 1872 1897 1873 // flag as read without mark request (called from backend) … … 1942 1918 /*********************************************************/ 1943 1919 1944 1945 1920 // checks the input fields before sending a message 1946 1921 this.check_compose_input = function() … … 2008 1983 }; 2009 1984 2010 2011 1985 this.set_draft_id = function(id) 2012 1986 { … … 2024 1998 this.busy = false; 2025 1999 }; 2026 2027 2000 2028 2001 this.compose_field_hash = function(save) … … 2059 2032 }; 2060 2033 2061 2062 2034 this.change_identity = function(obj) 2063 2035 { … … 2143 2115 }; 2144 2116 2145 2146 2117 this.show_attachment_form = function(a) 2147 2118 { … … 2175 2146 }; 2176 2147 2177 2178 2148 // upload attachment file 2179 2149 this.upload_file = function(form) … … 2225 2195 return true; 2226 2196 }; 2227 2228 2197 2229 2198 // add file name to attachment list … … 2298 2267 return true; 2299 2268 }; 2300 2301 2269 2302 2270 this.sent_successfully = function(type, msg) … … 2380 2348 }; 2381 2349 2382 2383 2350 this.insert_recipient = function(id) 2384 2351 { … … 2402 2369 this.ksearch_input.setSelectionRange(cpos, cpos); 2403 2370 }; 2404 2405 2371 2406 2372 // address search processor … … 2504 2470 }; 2505 2471 2506 2507 2472 this.ksearch_blur = function(e, obj) 2508 2473 { … … 2524 2489 this.ksearch_pane.show(0); 2525 2490 }; 2526 2527 2491 2528 2492 … … 2536 2500 this.command('delete'); 2537 2501 }; 2538 2539 2502 2540 2503 this.contactlist_select = function(list) … … 2556 2519 }; 2557 2520 2558 2559 2521 this.list_contacts = function(src, page) 2560 2522 { … … 2599 2561 }; 2600 2562 2601 2602 2563 // send remote request to load contacts list 2603 2564 this.list_contacts_remote = function(src, page) … … 2620 2581 }; 2621 2582 2622 2623 2583 // load contact record 2624 2584 this.load_contact = function(cid, action, framed) … … 2645 2605 // copy a contact to the specified target (group or directory) 2646 2606 this.copy_contact = function(cid, to) 2647 {2607 { 2648 2608 if (!cid) 2649 2609 cid = this.contact_list.get_selection().join(','); … … 2651 2611 if (to != this.env.source && cid && this.env.address_sources[to] && !this.env.address_sources[to].readonly) 2652 2612 this.http_post('copy', '_cid='+urlencode(cid)+'&_source='+urlencode(this.env.source)+'&_to='+urlencode(to)); 2653 };2613 }; 2654 2614 2655 2615 … … 2690 2650 }; 2691 2651 2692 2693 2652 // update a contact record in the list 2694 2653 this.update_contact_row = function(cid, cols_arr) … … 2762 2721 }; 2763 2722 2764 2765 2723 this.delete_identity = function(id) 2766 2724 { … … 2777 2735 return true; 2778 2736 }; 2779 2780 2737 2781 2738 this.focus_subscription = function(id) … … 2804 2761 } 2805 2762 2806 2807 2763 this.unfocus_subscription = function(id) 2808 2764 { … … 2815 2771 this.set_classname(this.subscription_list.frame, 'droptarget', false); 2816 2772 } 2817 2818 2773 2819 2774 this.subscription_select = function(list) … … 2831 2786 }; 2832 2787 2833 2834 2788 this.subscription_move_folder = function(list) 2835 2789 { … … 2847 2801 }; 2848 2802 2849 2850 2803 // tell server to create and subscribe a new mailbox 2851 2804 this.create_folder = function(name) … … 2874 2827 form.elements['_folder_name'].focus(); 2875 2828 }; 2876 2877 2829 2878 2830 // start renaming the mailbox name. … … 2910 2862 }; 2911 2863 2912 2913 2864 // remove the input field and write the current mailbox name to the table cell 2914 2865 this.reset_folder_rename = function() … … 2921 2872 this.edit_folder = null; 2922 2873 }; 2923 2924 2874 2925 2875 // handler for keyboard events on the input field … … 2952 2902 }; 2953 2903 2954 2955 2904 // delete a specific mailbox with all its messages 2956 2905 this.delete_folder = function(id) … … 2971 2920 } 2972 2921 }; 2973 2974 2922 2975 2923 // add a new folder to the subscription list by cloning a folder row … … 3048 2996 }; 3049 2997 3050 3051 2998 // replace an existing table row with a new folder line 3052 2999 this.replace_folder_row = function(oldfolder, newfolder, display_name, before) … … 3076 3023 }; 3077 3024 3078 3079 3025 // remove the table row of a specific mailbox from the table 3080 3026 // (the row will not be removed, just hidden) … … 3104 3050 }; 3105 3051 3106 3107 3052 this.subscribe_folder = function(folder) 3108 3053 { … … 3111 3056 }; 3112 3057 3113 3114 3058 this.unsubscribe_folder = function(folder) 3115 3059 { … … 3118 3062 }; 3119 3063 3120 3121 3064 // helper method to find a specific mailbox row ID 3122 3065 this.get_folder_row_id = function(folder) … … 3156 3099 /*********************************************************/ 3157 3100 3158 3159 3101 // eable/disable buttons for page shifting 3160 3102 this.set_page_buttons = function() … … 3165 3107 this.enable_command('firstpage', (this.env.current_page > 1)); 3166 3108 } 3167 3168 3109 3169 3110 // set button to a specific state … … 3299 3240 }; 3300 3241 3301 3302 3242 // set/unset a specific class name 3303 3243 this.set_classname = function(obj, classname, set) … … 3309 3249 obj.className += ' '+classname; 3310 3250 }; 3311 3312 3251 3313 3252 // write to the document/window title … … 3318 3257 } 3319 3258 3320 3321 3259 // display a system message 3322 3260 this.display_message = function(msg, type, hold) … … 3353 3291 }; 3354 3292 3355 3356 3293 // make a message row disapear 3357 3294 this.hide_message = function() … … 3363 3300 } 3364 3301 }; 3365 3366 3302 3367 3303 // mark a mailbox as selected and set environment variable … … 3397 3333 return null; 3398 3334 }; 3399 3400 3335 3401 3336 // for reordering column array, Konqueror workaround … … 3512 3447 }; 3513 3448 3514 3515 3449 // replace content of row count display 3516 3450 this.set_rowcount = function(text) … … 3523 3457 }; 3524 3458 3525 3526 3459 // replace content of mailboxname display 3527 3460 this.set_mailboxname = function(content) … … 3537 3470 this.gui_objects.quotadisplay.innerHTML = content; 3538 3471 }; 3539 3540 3472 3541 3473 // update the mailboxlist … … 3548 3480 this.set_unread_count_display(mbox, set_title); 3549 3481 } 3550 3551 3482 3552 3483 // update the mailbox count display … … 3635 3566 }; 3636 3567 3637 3638 3568 this.toggle_editor = function(checkbox, textAreaId) 3639 3569 { … … 3657 3587 }; 3658 3588 3659 3660 3589 this.toggle_prefer_html = function(checkbox) 3661 3590 { … … 3665 3594 } 3666 3595 3667 3668 3596 // display fetched raw headers 3669 3597 this.set_headers = function(content) … … 3682 3610 }; 3683 3611 3684 3685 3612 // display all-headers row and fetch raw message headers 3686 3613 this.load_headers = function(elem) … … 3701 3628 } 3702 3629 } 3703 3704 3630 3705 3631 // hide all-headers row … … 3763 3689 }; 3764 3690 3765 3766 3691 this.http_sockets = new Array(); 3767 3692 … … 3782 3707 }; 3783 3708 3784 3785 3709 // send a http request to the server 3786 3710 this.http_request = function(action, querystring, lock) … … 3840 3764 { 3841 3765 var ctype = request_obj.get_header('Content-Type'); 3842 if (ctype){ 3766 if (ctype) 3767 { 3843 3768 ctype = String(ctype).toLowerCase(); 3844 3769 var ctype_array=ctype.split(";"); 3845 3770 ctype = ctype_array[0]; 3846 }3771 } 3847 3772 3848 3773 if (request_obj.__lock) … … 3896 3821 this.enable_command('export', (this.contact_list && this.contact_list.rowcount > 0)); 3897 3822 break; 3898 }3823 } 3899 3824 3900 3825 request_obj.reset(); 3901 3826 }; 3902 3903 3827 3904 3828 // handle HTTP request errors … … 3906 3830 { 3907 3831 //alert('Error sending request: '+request_obj.url+' => HTTP '+request_obj.xmlhttp.status); 3908 3909 3832 if (request_obj.__lock) 3910 3833 this.set_busy(false); … … 3915 3838 }; 3916 3839 3917 3918 3840 // use an image to send a keep-alive siganl to the server 3919 3841 this.send_keep_alive = function() … … 3923 3845 }; 3924 3846 3925 3926 3847 // send periodic request to check for recent messages 3927 3848 this.check_for_recent = function() … … 3980 3901 }; 3981 3902 3982 3983 3903 this.set_caret2start = function(obj) 3984 3904 { … … 3994 3914 obj.focus(); 3995 3915 }; 3996 3997 3916 3998 3917 // set all fields of a form disabled … … 4014 3933 4015 3934 } // end object rcube_webmail 4016 4017 3935 4018 3936 … … 4027 3945 this.xmlhttp = null; 4028 3946 4029 4030 3947 // reset object properties 4031 3948 this.reset = function() … … 4044 3961 } 4045 3962 4046 4047 3963 // create HTMLHTTP object 4048 3964 this.build = function() … … 4081 3997 this.xmlhttp.send(null); 4082 3998 }; 4083 4084 3999 4085 4000 this.POST = function(url, body, contentType) … … 4115 4030 this.xmlhttp.send(req_body); 4116 4031 }; 4117 4118 4032 4119 4033 // handle onreadystatechange event -
program/steps/mail/show.inc
r25c35c8 rbf2f39e 68 68 // mark message as read 69 69 if (!$MESSAGE->headers->seen) 70 { 71 $marked = $IMAP->set_flag($MESSAGE->uid, 'SEEN'); 72 if($RCMAIL->action == 'preview' && $marked != -1) 73 { 74 $OUTPUT->command('parent.set_unread_count', $mbox_name, $IMAP->messagecount($mbox_name, 'UNSEEN'), ($mbox_name == 'INBOX')); 75 $OUTPUT->command('parent.set_message', $MESSAGE->uid, 'unread', false); 76 } 77 } 70 $IMAP->set_flag($MESSAGE->uid, 'SEEN'); 78 71 79 72 // give message uid to the client
Note: See TracChangeset
for help on using the changeset viewer.
