Changeset 4698
- Timestamp:
- 07/12/11 09:47:31 (13 years ago)
- Location:
- branches/2.2.0.1/expressoMail1_2/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/expressoMail1_2/js/draw_api.js
r4686 r4698 346 346 * Pastas locais 347 347 */ 348 if(preferences.use_local_messages==1 || expresso_offline) {349 var local_folders = expresso_local_messages.list_local_folders();350 var has_changes = false;351 for (var i in local_folders) { //Coloca as pastas locais.352 353 var new_caption = local_folders[i][0];354 if(local_folders[i][0].indexOf("/")!="-1") {355 final_pos = local_folders[i][0].lastIndexOf("/");356 new_caption = local_folders[i][0].substr(final_pos+1);357 }358 359 var folder_unseen = Element('dftree_local_'+local_folders[i][0]+'_unseen');360 361 if ((folder_unseen) && (local_folders[i][1] > 0))362 {363 folder_unseen.innerHTML = local_folders[i][1];364 has_changes = true;365 }366 else if (local_folders[i][1] > 0)367 {368 tree_folders.getNodeById("local_"+local_folders[i][0]).alter({caption:lang_folder(new_caption) + '<font style=color:red> (</font><span id="dftree_local_'+local_folders[i][0]+'_unseen" style=color:red>'+local_folders[i][1]+'</span><font style=color:red>)</font>'});369 tree_folders.getNodeById("local_"+local_folders[i][0])._refresh();370 has_changes = true;371 }372 else if (local_folders[i][1] <= 0)373 {374 tree_folders.getNodeById("local_"+local_folders[i][0]).alter({caption:lang_folder(new_caption)});375 tree_folders.getNodeById("local_"+local_folders[i][0])._refresh();376 has_changes = true;377 }348 if(preferences.use_local_messages==1 || expresso_offline) { 349 var local_folders = expresso_local_messages.list_local_folders(); 350 var has_changes = false; 351 for (var i in local_folders) { //Coloca as pastas locais. 352 353 var new_caption = local_folders[i][0]; 354 if(local_folders[i][0].indexOf("/")!="-1") { 355 final_pos = local_folders[i][0].lastIndexOf("/"); 356 new_caption = local_folders[i][0].substr(final_pos+1); 357 } 358 359 var folder_unseen = Element('dftree_local_'+local_folders[i][0]+'_unseen'); 360 361 if ((folder_unseen) && (local_folders[i][1] > 0)) 362 { 363 folder_unseen.innerHTML = local_folders[i][1]; 364 has_changes = true; 365 } 366 else if (local_folders[i][1] > 0) 367 { 368 tree_folders.getNodeById("local_"+local_folders[i][0]).alter({caption:lang_folder(new_caption) + '<font style=color:red> (</font><span id="dftree_local_'+local_folders[i][0]+'_unseen" style=color:red>'+local_folders[i][1]+'</span><font style=color:red>)</font>'}); 369 tree_folders.getNodeById("local_"+local_folders[i][0])._refresh(); 370 has_changes = true; 371 } 372 else if (local_folders[i][1] <= 0) 373 { 374 tree_folders.getNodeById("local_"+local_folders[i][0]).alter({caption:lang_folder(new_caption)}); 375 tree_folders.getNodeById("local_"+local_folders[i][0])._refresh(); 376 has_changes = true; 377 } 378 378 379 379 if("local_"+local_folders[i][0] == get_current_folder()){ 380 var old_new_m = isNaN(parseInt(Element('new_m').innerHTML)) ? parseInt(Element('new_m').firstChild.innerHTML) : parseInt(Element('new_m').innerHTML); 381 if(!isNaN(old_new_m) && old_new_m < local_folders[i][1]){ 382 Element('tot_m').innerHTML = parseInt(Element('tot_m').innerHTML) + (parseInt(local_folders[i][1])-old_new_m); 383 } 384 Element('new_m').innerHTML = local_folders[i][1] ? '<font color="RED">'+local_folders[i][1]+'</font>' : 0; 385 draw_paging(Element('tot_m').innerHTML); 386 has_changes = true; 387 } 388 } 389 if(has_changes) 390 tree_folders.getNodeById("local_root").open(); 391 392 } 380 var old_new_m = isNaN(parseInt(Element('new_m').innerHTML)) ? parseInt(Element('new_m').firstChild.innerHTML) : parseInt(Element('new_m').innerHTML); 381 if(!isNaN(old_new_m) && old_new_m < local_folders[i][1]){ 382 Element('tot_m').innerHTML = parseInt(Element('tot_m').innerHTML) + (parseInt(local_folders[i][1])-old_new_m); 383 } 384 Element('new_m').innerHTML = local_folders[i][1] ? '<font color="RED">'+local_folders[i][1]+'</font>' : 0; 385 draw_paging(Element('tot_m').innerHTML); 386 has_changes = true; 387 } 388 } 389 if(has_changes) 390 tree_folders.getNodeById("local_root").open(); 391 } 392 } 393 394 395 function update_local_box(){ 396 msg_range_end = (current_page*preferences.max_email_per_page); 397 msg_range_begin = (msg_range_end-(preferences.max_email_per_page)+1); 398 folder=get_current_folder(); 399 var msgs = expresso_local_messages.get_local_range_msgs(folder.substr(6),msg_range_begin,preferences.max_email_per_page,sort_box_type,sort_box_reverse,search_box_type,preferences.preview_msg_subject,preferences.preview_msg_tip); 400 alternate_border(0); 401 draw_box(msgs, folder, true); 402 draw_paging(msgs.num_msgs); 403 Element("tot_m").innerHTML = msgs.num_msgs; 404 update_menu(); 393 405 } 394 406 … … 1390 1402 var spanSender = document.createElement("SPAN"); 1391 1403 spanSender.onmouseover = function (event) {this.style.textDecoration = "underline";try {InfoContact.begin(this,headers_msgs.from.email)} catch(e){};}; 1392 spanSender.onmouseout = function (){ try {this.style.textDecoration = "none";clearTimeout(InfoContact.timeout);} catch(e){}};1404 spanSender.onmouseout = function (){try {this.style.textDecoration = "none";clearTimeout(InfoContact.timeout);} catch(e){}}; 1393 1405 spanSender.innerHTML = headers_msgs.from.name != null ? headers_msgs.from.name : headers_msgs.from.email; 1394 1406 if (spanSender.innerHTML.indexOf(" ") == '-1' && spanSender.innerHTML.length > 25){ … … 1719 1731 var option_hide_more = document.createElement("SPAN"); 1720 1732 option_hide_more.className = 'message_options'; 1721 option_hide_more.onmouseover=function () { this.className='message_options_active';};1722 option_hide_more.onmouseout=function () { this.className='message_options'};1733 option_hide_more.onmouseover=function () {this.className='message_options_active';}; 1734 option_hide_more.onmouseout=function () {this.className='message_options'}; 1723 1735 options.align = 'right'; 1724 1736 option_hide_more.value = 'more_options'; … … 1743 1755 var option_mark_as_unseen = document.createElement("SPAN"); 1744 1756 option_mark_as_unseen.className = "message_options"; 1745 option_mark_as_unseen.onclick = function () { 1757 option_mark_as_unseen.onclick = function () {changeLinkState(this,'seen'); 1746 1758 proxy_mensagens.proxy_set_message_flag(folder_id,'unseen'); 1747 1759 write_msg(get_lang('Message marked as ')+get_lang("Unseen")); 1748 1760 }; 1749 option_mark_as_unseen.onmouseover=function () { this.className='message_options_active';};1750 option_mark_as_unseen.onmouseout=function () { this.className='message_options'};1761 option_mark_as_unseen.onmouseover=function () {this.className='message_options_active';}; 1762 option_mark_as_unseen.onmouseout=function () {this.className='message_options'}; 1751 1763 option_mark_as_unseen.innerHTML = get_lang("Unseen"); 1752 1764 … … 1754 1766 option_mark_important.className = 'message_options'; 1755 1767 option_mark_important.style.paddingLeft = "10px"; 1756 option_mark_important.onmouseover=function () { this.className='message_options_active';};1757 option_mark_important.onmouseout=function () { this.className='message_options'};1768 option_mark_important.onmouseover=function () {this.className='message_options_active';}; 1769 option_mark_important.onmouseout=function () {this.className='message_options'}; 1758 1770 1759 1771 if (info_msg.Flagged == "F"){ … … 1771 1783 } 1772 1784 else{ 1773 option_mark_important.onclick = function() { 1785 option_mark_important.onclick = function() {changeLinkState(this,'normal'); 1774 1786 proxy_mensagens.proxy_set_message_flag(folder_id,'flagged'); 1775 1787 write_msg(get_lang('Message marked as ')+get_lang("Important")); … … 1794 1806 option_forward.className = 'message_options'; 1795 1807 option_forward.onclick = function(){new_message('forward', ID);}; 1796 option_forward.onmouseover=function () { this.className='message_options_active';};1797 option_forward.onmouseout=function () { this.className='message_options'};1808 option_forward.onmouseover=function () {this.className='message_options_active';}; 1809 option_forward.onmouseout=function () {this.className='message_options'}; 1798 1810 option_forward.innerHTML = get_lang('Forward'); 1799 1811 options.appendChild(space1); … … 1804 1816 option_reply.onclick = function(){new_message('reply_with_history', ID);}; 1805 1817 option_reply.innerHTML = get_lang('Reply'); 1806 option_reply.onmouseover=function () { this.className='message_options_active';};1807 option_reply.onmouseout=function () { this.className='message_options'};1818 option_reply.onmouseover=function () {this.className='message_options_active';}; 1819 option_reply.onmouseout=function () {this.className='message_options'}; 1808 1820 1809 1821 options.appendChild(space2); … … 2496 2508 case 'important': 2497 2509 { 2498 el.onclick = function(){changeLinkState(el,'normal');proxy_mensagens.proxy_set_message_flag(currentTab.substr(0,currentTab.indexOf("_r")),'flagged'); 2510 el.onclick = function(){changeLinkState(el,'normal');proxy_mensagens.proxy_set_message_flag(currentTab.substr(0,currentTab.indexOf("_r")),'flagged');write_msg(get_lang('Message marked as ')+get_lang("Important"))} 2499 2511 break; 2500 2512 } … … 2514 2526 case 'unseen': 2515 2527 { 2516 el.onclick = function(){ 2528 el.onclick = function(){changeLinkState(el,'seen');proxy_mensagens.proxy_set_message_flag(currentTab.substr(0,currentTab.indexOf("_r")),'unseen');write_msg(get_lang('Message marked as ')+get_lang("unseen"))} 2517 2529 break; 2518 2530 … … 2520 2532 case 'seen': 2521 2533 { 2522 el.onclick = function(){ 2534 el.onclick = function(){changeLinkState(el,'unseen');proxy_mensagens.proxy_set_message_flag(currentTab.substr(0,currentTab.indexOf("_r")),'seen');write_msg(get_lang('Message marked as ')+get_lang("seen"))} 2523 2535 break; 2524 2536 … … 2650 2662 input_replyto.style.width = "100%"; 2651 2663 input_replyto.setAttribute("wrap","soft"); 2652 input_replyto.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); 2664 input_replyto.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus', this.id);}; 2653 2665 input_replyto.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 2654 2666 … … 2733 2745 input_to.style.width = "100%"; 2734 2746 input_to.setAttribute("wrap","soft"); 2735 input_to.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); 2747 input_to.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus', this.id);}; 2736 2748 input_to.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 2737 2749 if (!is_ie) … … 2829 2841 input_cc.setAttribute("tabIndex","1"); 2830 2842 input_cc.style.width = "100%"; 2831 input_cc.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); 2843 input_cc.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus',this.id);}; 2832 2844 input_cc.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 2833 2845 if (!is_ie) … … 2911 2923 input_cco.setAttribute("tabIndex","1"); 2912 2924 input_cco.style.width = "100%"; 2913 input_cco.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); 2925 input_cco.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus',this.id);}; 2914 2926 input_cco.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 2915 2927 … … 2987 2999 a_cc_link.setAttribute("href","javascript:void(0)"); 2988 3000 a_cc_link.setAttribute("tabIndex","-1"); 2989 a_cc_link.onclick = function () {this.style.display='none';document.getElementById('tr_cc_'+ID).style.display='';document.getElementById('space_link_'+ID).style.display='none';input_cc.focus(); 3001 a_cc_link.onclick = function () {this.style.display='none';document.getElementById('tr_cc_'+ID).style.display='';document.getElementById('space_link_'+ID).style.display='none';input_cc.focus();return false;} 2990 3002 td2_link.appendChild(a_cc_link); 2991 3003 var space = document.createElement("span"); … … 2998 3010 a_cco_link.setAttribute("href","javascript:void(0)"); 2999 3011 a_cco_link.setAttribute("tabIndex","-1"); 3000 a_cco_link.onclick = function () {this.style.display='none';document.getElementById('tr_cco_'+ID).style.display='';document.getElementById('space_link_'+ID).style.display='none';input_cco.focus(); 3012 a_cco_link.onclick = function () {this.style.display='none';document.getElementById('tr_cco_'+ID).style.display='';document.getElementById('space_link_'+ID).style.display='none';input_cco.focus();return false;} 3001 3013 td2_link.appendChild(a_cco_link); 3002 3014 var space = document.createElement("span"); … … 3009 3021 a_replyto_link.setAttribute("href","javascript:void(0)"); 3010 3022 a_replyto_link.setAttribute("tabIndex","-1"); 3011 a_replyto_link.onclick = function () {this.style.display='none';document.getElementById('tr_replyto_'+ID).style.display='';document.getElementById('space_link_2_'+ID).style.display='none';input_replyto.focus(); 3023 a_replyto_link.onclick = function () {this.style.display='none';document.getElementById('tr_replyto_'+ID).style.display='';document.getElementById('space_link_2_'+ID).style.display='none';input_replyto.focus();return false;} 3012 3024 td2_link.appendChild(a_replyto_link); 3013 3025 tr_link.appendChild(td1_link); -
branches/2.2.0.1/expressoMail1_2/js/messages_controller.js
r4642 r4698 44 44 expresso_local_messages.delete_msgs(msgs_number, border_ID); 45 45 draw_tree_local_folders(); 46 update_local_box(); 46 47 } 47 48 } … … 227 228 this.aux_interface_remove_mails(msgs_number, new_folder_name, border_ID); 228 229 draw_tree_local_folders(); 230 update_local_box(); 229 231 } 230 232 else
Note: See TracChangeset
for help on using the changeset viewer.