Changeset 345 for trunk/expressoMail1_2/js
- Timestamp:
- 07/04/08 17:14:41 (16 years ago)
- Location:
- trunk/expressoMail1_2/js
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/TreeShow.js
r320 r345 29 29 tree_folders.getNodeById(get_current_folder())._select(); 30 30 } 31 cExecute ("$this.imap_functions.get_folders_list ", handler_update_folders);31 cExecute ("$this.imap_functions.get_folders_list&folder="+current_folder, handler_update_folders); 32 32 } 33 33 -
trunk/expressoMail1_2/js/draw_api.js
r325 r345 10 10 if (Element('dftree_tree_folders')){ 11 11 var update_tree_folders = function(data){ 12 build_quota(data); 12 13 for (var i=0; i<data.length; i++){ 13 14 var folder_unseen = Element('dftree_'+data[i].folder_id+'_unseen'); … … 34 35 // } 35 36 Element('new_m').innerHTML = data[i].folder_unseen ? '<font color="RED">'+data[i].folder_unseen+'</font>' : 0; 36 draw_paging(Element('tot_m').innerHTML); 37 draw_paging(Element('tot_m').innerHTML); 37 38 } 38 39 } 39 40 } 40 cExecute ("$this.imap_functions.get_folders_list ", update_tree_folders);41 cExecute ("$this.imap_functions.get_folders_list&folder="+current_folder, update_tree_folders); 41 42 return; 42 43 } … … 114 115 draw_tree_folders(data); 115 116 if(data) { 116 update_quota('INBOX');117 build_quota(data); 117 118 var f_unseen = Element('dftree_'+get_current_folder()+'_unseen'); 118 119 if(f_unseen && f_unseen.innerHTML) … … 148 149 Element("tot_m").innerHTML = data.num_msgs; 149 150 update_menu(); 150 update_quota(folder);151 151 return true; 152 152 } … … 157 157 158 158 function open_folder(folder, folder_name){ 159 if (get_current_folder() 159 if (get_current_folder()!= folder) { 160 160 current_folder = folder; 161 161 var handler_draw_box = function(data){ 162 if (!verify_session(data)) 163 return; 164 Element("border_id_0").innerHTML = " " + lang_folder(folder_name) + ' <font face="Verdana" size="1" color="#505050">[<span id="new_m"> </span> / <span id="tot_m"></span>]</font>'; 165 draw_box(data, current_folder); 166 draw_paging(data.num_msgs); 167 Element("tot_m").innerHTML = data.num_msgs; 168 update_menu(); 169 update_quota(folder); 170 alternate_border(0); 171 } 172 cExecute("$this.imap_functions.get_range_msgs2&folder=" + current_folder + "&msg_range_begin=1&msg_range_end=" + preferences.max_email_per_page + "&sort_box_type=" + sort_box_type + "&search_box_type=" + search_box_type + "&sort_box_reverse=" + sort_box_reverse + "", handler_draw_box); 162 if(!verify_session(data)) 163 return false; 164 numBox++; 165 create_border(folder_name,numBox.toString()); 166 draw_box(data, current_folder, false); 167 alternate_border(numBox); 168 return true; 169 } 170 cExecute ("$this.imap_functions.get_range_msgs2&folder="+current_folder+"&msg_range_begin=1&msg_range_end="+preferences.max_email_per_page+"&sort_box_type="+sort_box_type+ "&search_box_type="+ search_box_type +"&sort_box_reverse="+sort_box_reverse+"", handler_draw_box); 173 171 } 174 172 else 175 alternate_border(0); 173 alternate_border(numBox); 174 return true; 176 175 } 177 176 … … 1845 1844 } 1846 1845 else{ 1847 div.innerHTML = null; 1846 if(div) 1847 div.innerHTML = null; 1848 1848 value = data['quota_percent']; 1849 1849 q_used = data['quota_used']; … … 1914 1914 } 1915 1915 1916 function update_quota(folder_id){ 1916 function update_quota(folder_id){ 1917 1917 cExecute ("$this.imap_functions.get_quota&folder_id="+folder_id,build_quota); 1918 1918 } -
trunk/expressoMail1_2/js/main.js
r336 r345 160 160 if(data.new_msgs > 0){ 161 161 Element('tot_m').innerHTML = parseInt(Element('tot_m').innerHTML) + parseInt(data.new_msgs); //refresh tab title 162 update_quota( );162 update_quota(get_current_folder()); 163 163 } 164 164 } … … 250 250 var main_list = Element("tbody_resultsearch_"+border_id.substr(18)).childNodes; 251 251 for (j = 0; j < main_list.length; j++) { 252 var check_box = Element("check_box_message_"+main_list[j].id);252 var check_box = main_list[j].firstChild.firstChild; 253 253 if(check_box && check_box.checked) { 254 254 selected_messages += main_list[j].id + ','; … … 321 321 return false; 322 322 } 323 324 323 325 324 Element('chk_box_select_all_messages').checked = false; 326 mail_msg = Element("tbody_box"); 327 //mail_msg = document.getElementById("divScrollMain_"+numBox).firstChild.firstChild; 325 326 mail_msg = ( Element("divScrollMain_"+numBox) ) ? Element("divScrollMain_"+numBox).firstChild.firstChild : Element("divScrollMain_0").firstChild.firstChild; 327 if (! mail_msg) 328 mail_msg = Element("tbody_box"); 328 329 data.msgs_number = data.msgs_number.split(","); 329 330 330 var msg_to_delete; 331 all_search_msg = msgs_number.split(','); 331 var msg_to_delete; 332 if( typeof(msgs_number) == 'string' ) 333 all_search_msg = msgs_number.split(','); 334 else if( typeof(msgs_number) == 'number') 335 all_search_msg = msgs_number; 332 336 for (var i=0; i <= all_search_msg.length; i++) 333 337 { … … 390 394 391 395 function get_selected_messages(){ 392 main = Element("tbody_box"); 393 // main = document.getElementById("divScrollMain_"+numBox).firstChild.firstChild; 396 main = document.getElementById("divScrollMain_"+numBox).firstChild.firstChild; 397 if (! main) 398 main = Element("tbody_box"); 394 399 395 400 // Get all TR (messages) in tBody. … … 516 521 } 517 522 else{ 518 523 body.contentWindow.document.write("<html><body bgcolor='#FFFFFF'></body></html>"); 519 524 } 520 525 body.contentWindow.document.close(); … … 545 550 } 546 551 else { 547 body.contentWindow.document.write("<html><body bgcolor='#FFFFFF'>" + block_quoted_body +"</body></html>");552 body.contentWindow.document.write("<html><body bgcolor='#FFFFFF'>"+block_quoted_body+"</body></html>"); 548 553 } 549 554 body.contentWindow.document.close(); … … 590 595 } 591 596 else { 592 597 body.contentWindow.document.write("<html><body bgcolor='#FFFFFF'></body></html>"); 593 598 } 594 599 body.contentWindow.document.close(); … … 635 640 } 636 641 else { 637 body.contentWindow.document.write("<html><body bgcolor='#FFFFFF'>" + block_quoted_body +"</body></html>");642 body.contentWindow.document.write("<html><body bgcolor='#FFFFFF'>"+block_quoted_body+"</body></html>"); 638 643 } 639 644 body.contentWindow.document.close(); … … 683 688 } 684 689 else { 685 body.contentWindow.document.write("<html><body bgcolor='#FFFFFF'>" + make_forward_body(data.body, data.to, data.date, data.subject, data.to_all, data.cc) +"</body></html>");690 body.contentWindow.document.write("<html><body bgcolor='#FFFFFF'>"+make_forward_body(data.body, data.to, data.date, data.subject, data.to_all, data.cc)+"</body></html>"); 686 691 } 687 692 body.contentWindow.document.close(); … … 716 721 } 717 722 else { 718 723 body.contentWindow.document.write("<html><body bgcolor='#FFFFFF'></body></html>"); 719 724 } 720 725 body.contentWindow.document.close();
Note: See TracChangeset
for help on using the changeset viewer.