Changeset 5200 for trunk


Ignore:
Timestamp:
11/23/11 14:52:28 (12 years ago)
Author:
douglasz
Message:

Ticket #2340 - Pesquisa rapida - Inconsistencia ao abrir resultados no arquivamento local

Location:
trunk/expressoMail1_2/js
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/abas.js

    r5172 r5200  
    4747        if (footer_menu != null) { 
    4848                footer_menu.style.display = (openTab.type[ID] != 4 ? '' : 'none'); 
    49                 if((aba.id.indexOf("_r") < 0) && (aba.id.indexOf("_0") < 0) && (aba.id.indexOf("id_search_") < 0)){ 
     49                var alternate_menu = document.getElementById('localOption'); 
     50                if(alternate_menu != null && alternate_menu != 'undefined'){ //Quando Carregado o expresso mail 
     51                        if(openTab.imapBox[ID]!= null && openTab.imapBox[ID]!= 'undefined' ){ //Quando abrir uma Nova Mensagem 
     52                                if((openTab.imapBox[ID].indexOf("local_") >= 0)){                                                
     53                                                alternate_menu.title = get_lang("Unarchive"); 
     54                                                alternate_menu.removeAttribute("onclick"); 
     55                                                alternate_menu.setAttribute("onclick",  'expresso_local_messages.unarchive_msgs(\''+openTab.imapBox[ID]+'\', null)'); 
     56                                                alternate_menu.innerHTML = get_lang("Unarchive"); 
     57                                                 
     58                                        }else{ 
     59                                                alternate_menu.title = get_lang("Archive"); 
     60                                                alternate_menu.removeAttribute("onclick"); 
     61                                                alternate_menu.setAttribute("onclick", 'archive_msgs(\''+openTab.imapBox[ID]+'\', null)');                               
     62                                                alternate_menu.innerHTML = get_lang("Archive"); 
     63                                        } 
     64                        } 
     65                } 
     66                if((aba.id.indexOf("_r") < 0) && (aba.id.indexOf("_0") < 0) && (aba.id.indexOf("id_search_") < 0) && (aba.id.indexOf("_s") < 0)){ 
    5067                        spanD.style.display = 'none'; 
    5168                        footer_menu.style.display = 'none';                      
     
    167184                 
    168185                var ID = id_value; 
    169                 openTab.imapBox[ID] = current_folder; 
     186                if((currentTab != 0) && (currentTab.indexOf("search") >= 0) && (ID.indexOf("msg") < 0)) { 
     187                        var id_border = currentTab.replace(/[a-zA-Z_]+/, ""); 
     188                        ID_TR = ID.toString().substr(0,ID.toString().indexOf("_r")); 
     189                        var tr = Element(ID_TR); 
     190                        openTab.imapBox[ID] = (tr.getAttribute('name') == null?get_current_folder():tr.getAttribute('name')); 
     191                }else if(ID.indexOf("search_local") >= 0){ 
     192                        if(current_folder.indexOf("local") >= 0) 
     193                                openTab.imapBox[ID] = current_folder; 
     194                        else 
     195                                openTab.imapBox[ID] = 'local_search'; 
     196                }else if(ID.indexOf("search_") >= 0){ 
     197                        if(current_folder.indexOf("local") < 0) 
     198                                openTab.imapBox[ID] = current_folder; 
     199                        else 
     200                                openTab.imapBox[ID] = 'search'; 
     201                }else 
     202                        openTab.imapBox[ID] = current_folder; 
    170203        } 
    171204        td = document.createElement("TD"); 
  • trunk/expressoMail1_2/js/draw_api.js

    r5158 r5200  
    41194119        if(preferences.use_local_messages==1 && !expresso_offline) 
    41204120                if(proxy_mensagens.is_local_folder(current_folder)) 
    4121                         span_options.innerHTML += '&nbsp; <span title="'+get_lang("Unarchive")+'" class="message_options" onclick="expresso_local_messages.unarchive_msgs(\''+folder+'\',null)">'+get_lang("Unarchive")+'</span>'; 
     4121                        span_options.innerHTML += '&nbsp; <span id="localOption" title="'+get_lang("Unarchive")+'" class="message_options" onclick="expresso_local_messages.unarchive_msgs(\''+folder+'\',null)">'+get_lang("Unarchive")+'</span>'; 
    41224122                else 
    4123                         span_options.innerHTML += '&nbsp; <span title="'+get_lang("Archive")+'" class="message_options" onclick="archive_msgs(\''+folder+'\',null)">'+get_lang("Archive")+'</span>'; 
     4123                        span_options.innerHTML += '&nbsp; <span id="localOption" title="'+get_lang("Archive")+'" class="message_options" onclick="archive_msgs(\''+folder+'\',null)">'+get_lang("Archive")+'</span>'; 
    41244124        if (use_spam_filter) { 
    41254125                if ( current_folder == 'INBOX'+cyrus_delimiter+'Spam' ) { 
  • trunk/expressoMail1_2/js/local_messages.js

    r5184 r5200  
    16341634        // se a aba estiver aberta e selecionada, apenas a msg da aba é movida 
    16351635        if(currentTab.toString().indexOf("_r") != -1) 
    1636             msgs_number = currentTab.toString().substr(0,currentTab.toString().indexOf("_r")); 
    1637          
    1638         if( msgs_number =='selected' || !msgs_number ){ 
     1636        msgs_number = currentTab.toString().substr(0,currentTab.toString().indexOf("_r")); 
     1637                 
     1638        if(currentTab.toString().indexOf("_s") != -1) 
     1639                msgs_number = currentTab.toString().substr(0,currentTab.toString().indexOf("_s")); 
     1640         
     1641    if( msgs_number =='selected' || !msgs_number ){ 
    16391642                if (currentTab != 0 && currentTab.indexOf("search_")  >= 0) 
    16401643                        msgs_number = get_selected_messages_search(); 
    16411644                else 
    1642             msgs_number = get_selected_messages(); 
    1643                 } 
     1645                        msgs_number = get_selected_messages(); 
     1646        } 
     1647                 
    16441648        if( !msgs_number ) 
    16451649            return write_msg(get_lang('No selected message.')); 
  • trunk/expressoMail1_2/js/main.js

    r5194 r5200  
    10311031        } 
    10321032 
    1033         if(currentTab.toString().indexOf("_r") != -1){ 
    1034             id_msgs = currentTab.toString().substr(0,currentTab.toString().indexOf("_r")); 
    1035         } 
     1033        if(currentTab.toString().indexOf("_r") != -1) 
     1034        id_msgs = currentTab.toString().substr(0,currentTab.toString().indexOf("_r")); 
     1035                 
     1036    if(currentTab.toString().indexOf("_s") != -1) 
     1037                id_msgs = currentTab.toString().substr(0,currentTab.toString().indexOf("_s")); 
    10361038 
    10371039        if(!id_msgs){ 
     
    10401042                        return; 
    10411043                }else 
    1042                 id_msgs = get_selected_messages(); 
     1044                        id_msgs = get_selected_messages(); 
    10431045        }        
    10441046 
Note: See TracChangeset for help on using the changeset viewer.