Changeset 4826
- Timestamp:
- 07/19/11 16:07:03 (13 years ago)
- Location:
- trunk/expressoMail1_2/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/draw_api.js
r4821 r4826 345 345 * Pastas locais 346 346 */ 347 if(preferences.use_local_messages==1 || expresso_offline) {348 var local_folders = expresso_local_messages.list_local_folders();349 var has_changes = false;350 for (var i in local_folders) { //Coloca as pastas locais.351 352 var new_caption = local_folders[i][0];353 if(local_folders[i][0].indexOf("/")!="-1") {354 final_pos = local_folders[i][0].lastIndexOf("/");355 new_caption = local_folders[i][0].substr(final_pos+1);356 }357 358 var folder_unseen = Element('dftree_local_'+local_folders[i][0]+'_unseen');359 360 if ((folder_unseen) && (local_folders[i][1] > 0))361 {362 folder_unseen.innerHTML = local_folders[i][1];363 has_changes = true;364 }365 else if (local_folders[i][1] > 0)366 {367 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>'});368 tree_folders.getNodeById("local_"+local_folders[i][0])._refresh();369 has_changes = true;370 }371 else if (local_folders[i][1] <= 0)372 {373 tree_folders.getNodeById("local_"+local_folders[i][0]).alter({caption:lang_folder(new_caption)});374 tree_folders.getNodeById("local_"+local_folders[i][0])._refresh();375 has_changes = true;376 }347 if(preferences.use_local_messages==1 || expresso_offline) { 348 var local_folders = expresso_local_messages.list_local_folders(); 349 var has_changes = false; 350 for (var i in local_folders) { //Coloca as pastas locais. 351 352 var new_caption = local_folders[i][0]; 353 if(local_folders[i][0].indexOf("/")!="-1") { 354 final_pos = local_folders[i][0].lastIndexOf("/"); 355 new_caption = local_folders[i][0].substr(final_pos+1); 356 } 357 358 var folder_unseen = Element('dftree_local_'+local_folders[i][0]+'_unseen'); 359 360 if ((folder_unseen) && (local_folders[i][1] > 0)) 361 { 362 folder_unseen.innerHTML = local_folders[i][1]; 363 has_changes = true; 364 } 365 else if (local_folders[i][1] > 0) 366 { 367 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>'}); 368 tree_folders.getNodeById("local_"+local_folders[i][0])._refresh(); 369 has_changes = true; 370 } 371 else if (local_folders[i][1] <= 0) 372 { 373 tree_folders.getNodeById("local_"+local_folders[i][0]).alter({caption:lang_folder(new_caption)}); 374 tree_folders.getNodeById("local_"+local_folders[i][0])._refresh(); 375 has_changes = true; 376 } 377 377 378 378 if("local_"+local_folders[i][0] == get_current_folder()){ 379 var old_new_m = isNaN(parseInt(Element('new_m').innerHTML)) ? parseInt(Element('new_m').firstChild.innerHTML) : parseInt(Element('new_m').innerHTML); 380 if(!isNaN(old_new_m) && old_new_m < local_folders[i][1]){ 381 Element('tot_m').innerHTML = parseInt(Element('tot_m').innerHTML) + (parseInt(local_folders[i][1])-old_new_m); 382 } 383 Element('new_m').innerHTML = local_folders[i][1] ? '<font color="RED">'+local_folders[i][1]+'</font>' : 0; 384 draw_paging(Element('tot_m').innerHTML); 385 has_changes = true; 386 } 387 } 388 if(has_changes) 389 tree_folders.getNodeById("local_root").open(); 390 391 } 379 var old_new_m = isNaN(parseInt(Element('new_m').innerHTML)) ? parseInt(Element('new_m').firstChild.innerHTML) : parseInt(Element('new_m').innerHTML); 380 if(!isNaN(old_new_m) && old_new_m < local_folders[i][1]){ 381 Element('tot_m').innerHTML = parseInt(Element('tot_m').innerHTML) + (parseInt(local_folders[i][1])-old_new_m); 382 } 383 Element('new_m').innerHTML = local_folders[i][1] ? '<font color="RED">'+local_folders[i][1]+'</font>' : 0; 384 draw_paging(Element('tot_m').innerHTML); 385 has_changes = true; 386 } 387 } 388 if(has_changes) 389 tree_folders.getNodeById("local_root").open(); 390 } 391 } 392 393 394 function update_local_box(){ 395 msg_range_end = (current_page*preferences.max_email_per_page); 396 msg_range_begin = (msg_range_end-(preferences.max_email_per_page)+1); 397 folder=get_current_folder(); 398 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); 399 alternate_border(0); 400 draw_box(msgs, folder, true); 401 draw_paging(msgs.num_msgs); 402 Element("tot_m").innerHTML = msgs.num_msgs; 403 update_menu(); 392 404 } 393 405 … … 1389 1401 var spanSender = document.createElement("SPAN"); 1390 1402 spanSender.onmouseover = function (event) {this.style.textDecoration = "underline";try {InfoContact.begin(this,headers_msgs.from.email)} catch(e){};}; 1391 spanSender.onmouseout = function (){ try {this.style.textDecoration = "none";clearTimeout(InfoContact.timeout);} catch(e){}};1403 spanSender.onmouseout = function (){try {this.style.textDecoration = "none";clearTimeout(InfoContact.timeout);} catch(e){}}; 1392 1404 spanSender.innerHTML = headers_msgs.from.name != null ? headers_msgs.from.name : headers_msgs.from.email; 1393 1405 if (spanSender.innerHTML.indexOf(" ") == '-1' && spanSender.innerHTML.length > 25){ … … 1726 1738 var option_hide_more = document.createElement("SPAN"); 1727 1739 option_hide_more.className = 'message_options'; 1728 option_hide_more.onmouseover=function () { this.className='message_options_active';};1729 option_hide_more.onmouseout=function () { this.className='message_options'};1740 option_hide_more.onmouseover=function () {this.className='message_options_active';}; 1741 option_hide_more.onmouseout=function () {this.className='message_options'}; 1730 1742 options.align = 'right'; 1731 1743 option_hide_more.value = 'more_options'; … … 1750 1762 var option_mark_as_unseen = document.createElement("SPAN"); 1751 1763 option_mark_as_unseen.className = "message_options"; 1752 option_mark_as_unseen.onclick = function () { 1764 option_mark_as_unseen.onclick = function () {changeLinkState(this,'seen'); 1753 1765 proxy_mensagens.proxy_set_message_flag(folder_id,'unseen'); 1754 1766 write_msg(get_lang('Message marked as ')+get_lang("Unseen")); 1755 1767 }; 1756 option_mark_as_unseen.onmouseover=function () { this.className='message_options_active';};1757 option_mark_as_unseen.onmouseout=function () { this.className='message_options'};1768 option_mark_as_unseen.onmouseover=function () {this.className='message_options_active';}; 1769 option_mark_as_unseen.onmouseout=function () {this.className='message_options'}; 1758 1770 option_mark_as_unseen.innerHTML = get_lang("Unseen"); 1759 1771 … … 1761 1773 option_mark_important.className = 'message_options'; 1762 1774 option_mark_important.style.paddingLeft = "10px"; 1763 option_mark_important.onmouseover=function () { this.className='message_options_active';};1764 option_mark_important.onmouseout=function () { this.className='message_options'};1775 option_mark_important.onmouseover=function () {this.className='message_options_active';}; 1776 option_mark_important.onmouseout=function () {this.className='message_options'}; 1765 1777 1766 1778 if (info_msg.Flagged == "F"){ … … 1778 1790 } 1779 1791 else{ 1780 option_mark_important.onclick = function() { 1792 option_mark_important.onclick = function() {changeLinkState(this,'normal'); 1781 1793 proxy_mensagens.proxy_set_message_flag(folder_id,'flagged'); 1782 1794 write_msg(get_lang('Message marked as ')+get_lang("Important")); … … 1801 1813 option_forward.className = 'message_options'; 1802 1814 option_forward.onclick = function(){new_message('forward', ID);}; 1803 option_forward.onmouseover=function () { this.className='message_options_active';};1804 option_forward.onmouseout=function () { this.className='message_options'};1815 option_forward.onmouseover=function () {this.className='message_options_active';}; 1816 option_forward.onmouseout=function () {this.className='message_options'}; 1805 1817 option_forward.innerHTML = get_lang('Forward'); 1806 1818 options.appendChild(space1); … … 1811 1823 option_reply.onclick = function(){new_message('reply_with_history', ID);}; 1812 1824 option_reply.innerHTML = get_lang('Reply'); 1813 option_reply.onmouseover=function () { this.className='message_options_active';};1814 option_reply.onmouseout=function () { this.className='message_options'};1825 option_reply.onmouseover=function () {this.className='message_options_active';}; 1826 option_reply.onmouseout=function () {this.className='message_options'}; 1815 1827 1816 1828 options.appendChild(space2); … … 2565 2577 case 'important': 2566 2578 { 2567 el.onclick = function(){changeLinkState(el,'normal');proxy_mensagens.proxy_set_message_flag(currentTab.substr(0,currentTab.indexOf("_r")),'flagged'); 2579 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"))} 2568 2580 break; 2569 2581 } … … 2583 2595 case 'unseen': 2584 2596 { 2585 el.onclick = function(){ 2597 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"))} 2586 2598 break; 2587 2599 … … 2589 2601 case 'seen': 2590 2602 { 2591 el.onclick = function(){ 2603 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"))} 2592 2604 break; 2593 2605 … … 2720 2732 input_replyto.style.width = "100%"; 2721 2733 input_replyto.setAttribute("wrap","soft"); 2722 input_replyto.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); 2734 input_replyto.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus', this.id);}; 2723 2735 input_replyto.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 2724 2736 … … 2803 2815 input_to.style.width = "100%"; 2804 2816 input_to.setAttribute("wrap","soft"); 2805 input_to.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); 2817 input_to.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus', this.id);}; 2806 2818 input_to.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 2807 2819 if (!is_ie) … … 2899 2911 input_cc.setAttribute("tabIndex","1"); 2900 2912 input_cc.style.width = "100%"; 2901 input_cc.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); 2913 input_cc.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus',this.id);}; 2902 2914 input_cc.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 2903 2915 if (!is_ie) … … 2981 2993 input_cco.setAttribute("tabIndex","1"); 2982 2994 input_cco.style.width = "100%"; 2983 input_cco.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); 2995 input_cco.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus',this.id);}; 2984 2996 input_cco.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);}; 2985 2997 … … 3057 3069 a_cc_link.setAttribute("href","javascript:void(0)"); 3058 3070 a_cc_link.setAttribute("tabIndex","-1"); 3059 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(); 3071 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;} 3060 3072 td2_link.appendChild(a_cc_link); 3061 3073 var space = document.createElement("span"); … … 3068 3080 a_cco_link.setAttribute("href","javascript:void(0)"); 3069 3081 a_cco_link.setAttribute("tabIndex","-1"); 3070 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(); 3082 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;} 3071 3083 td2_link.appendChild(a_cco_link); 3072 3084 var space = document.createElement("span"); … … 3079 3091 a_replyto_link.setAttribute("href","javascript:void(0)"); 3080 3092 a_replyto_link.setAttribute("tabIndex","-1"); 3081 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(); 3093 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;} 3082 3094 td2_link.appendChild(a_replyto_link); 3083 3095 tr_link.appendChild(td1_link); -
trunk/expressoMail1_2/js/messages_controller.js
r4790 r4826 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 } … … 228 229 this.aux_interface_remove_mails(msgs_number, new_folder_name, border_ID); 229 230 draw_tree_local_folders(); 231 update_local_box(); 230 232 } 231 233 else
Note: See TracChangeset
for help on using the changeset viewer.