Changeset 7184


Ignore:
Timestamp:
09/10/12 12:05:54 (12 years ago)
Author:
marcosw
Message:

Ticket #3088 - Implementação parcial arquivar por drag/drop (mover)

Location:
sandbox/2.5.0-expresso1/expressoMail1_2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.5.0-expresso1/expressoMail1_2/inc/class.imap_functions.inc.php

    r7157 r7184  
    54445444        return($this->functions->CalculateDateOffset()); 
    54455445    } 
    5446      
     5446 
    54475447    //MailArchiver -> get message flags only, invoked at archive operation 
     5448    //Marcosw início - modificação da estrutura da função, removendo estr. de repetição desnecessária 
    54485449    function get_msg_flags($args){        
    54495450                $msg_folder = $args['folder']; 
    54505451        $msg_n = $args['msg_number']; 
    54515452         
    5452         $arr_msg = explode(",", $msg_n); 
    5453         
    5454         for($i=0; $i<count($arr_msg); $i++){ 
    5455                          
    5456             if(!$this->mbox || !is_resource($this->mbox)) 
    5457                 $this->mbox = $this->open_mbox($msg_folder); 
    5458          
    5459             if(!is_resource($this->mbox)) 
    5460                 return(false); 
    5461                         
    5462             $header = @imap_headerinfo($this->mbox, imap_msgno($this->mbox, $arr_msg[$i]), 80, 255); 
    5463                  
    5464             if (!is_object($header)) 
    5465                 return false; 
    5466  
    5467             $taglist[$i]["msgid"] = $msg_n; 
    5468             $taglist[$i]["unseen"] = $header->Unseen; 
    5469             $taglist[$i]["recent"] = $header->Recent; 
    5470             $taglist[$i]["flagged"] = $header->Flagged; 
    5471             $taglist[$i]["draft"] = $header->Draft; 
    5472             $taglist[$i]["answered"] = $header->Answered; 
    5473             $taglist[$i]["deleted"] = $header->Deleted; 
    5474          
    5475             if($header->Answered =='A' && $header->Draft == 'X') 
    5476                 $taglist[$i]['forwarded'] = 'F'; 
    5477             else 
    5478                 $taglist[$i]['forwarded'] = ' '; 
    5479          
    5480             if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']) { 
    5481                 $flag = preg_match('/importance *: *(.*)\r/i',imap_fetchheader($this->mbox, imap_msgno($this->mbox, $arr_msg[$i])),$importance); 
    5482                 $taglist[$i]["importance"] = $flag==0?"Normal":$importance[1]; 
    5483             } 
     5453        if(!$this->mbox || !is_resource($this->mbox)) 
     5454            $this->mbox = $this->open_mbox($msg_folder); 
     5455     
     5456        if(!is_resource($this->mbox)) 
     5457            return(false); 
     5458           
     5459        $a = imap_msgno($this->mbox, $msg_n);           
     5460        $header = @imap_headerinfo($this->mbox, $a, 80, 255); 
     5461                 
     5462        if (!is_object($header)) 
     5463            return false; 
     5464 
     5465        $taglist["msgid"] = $msg_n; 
     5466        $taglist["unseen"] = $header->Unseen; 
     5467        $taglist["recent"] = $header->Recent; 
     5468        $taglist["flagged"] = $header->Flagged; 
     5469        $taglist["draft"] = $header->Draft; 
     5470        $taglist["answered"] = $header->Answered; 
     5471        $taglist["deleted"] = $header->Deleted; 
     5472     
     5473        if($header->Answered =='A' && $header->Draft == 'X') 
     5474            $taglist['forwarded'] = 'F'; 
     5475        else 
     5476            $taglist['forwarded'] = ' '; 
     5477     
     5478        if($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['use_important_flag']) { 
     5479            $flag = preg_match('/importance *: *(.*)\r/i',imap_fetchheader($this->mbox, imap_msgno($this->mbox, $msg_n)),$importance); 
     5480            $taglist["importance"] = $flag==0?"Normal":$importance[1]; 
    54845481        } 
     5482 
    54855483                return $taglist;         
    54865484    }     
     5485    // Marcosw fim 
    54875486        /* Airton 
    54885487         * Fim dos métodos  
  • sandbox/2.5.0-expresso1/expressoMail1_2/js/mail_archiver.js

    r7183 r7184  
    527527    } 
    528528    else{ 
    529         document.getElementById('main_title').innerHTML = get_lang("All done. End of archive messages operation"); 
     529        //document.getElementById('main_title').innerHTML = get_lang("All done. End of archive messages operation"); 
     530        //Marcosw inicio - Melhoria na exibição de mensagem 
     531        write_msg(get_lang("All done. End of archive messages operation")); 
     532        //Marcosw fim 
    530533        expresso_mail_archive.resetObject(); 
    531534        expresso_mail_archive.archivefolder = null; 
  • sandbox/2.5.0-expresso1/expressoMail1_2/js/main.js

    r7183 r7184  
    15951595 
    15961596/* function archive_msgs(folder,folder_dest,id_msgs) { 
     1597    write_msg(get_lang('Starting to archive messages')); 
     1598 
     1599    if(currentTab.toString().indexOf("_r") != -1){ 
     1600        id_msgs = currentTab.toString().substr(0,currentTab.toString().indexOf("_r")); 
     1601    } 
     1602 
     1603    if(!id_msgs) 
     1604        id_msgs = get_selected_messages(); 
     1605 
     1606    if(folder_dest=='local_root' || folder_dest==null)//Default archive destiny = local_inbox folder 
     1607        folder_dest = 'local_inbox'; 
     1608     
     1609    if (parseInt(id_msgs) > 0 || id_msgs.length > 0){        
     1610        expresso_mail_archive.Archive(folder,folder_dest,id_msgs); 
     1611    } 
     1612    else 
     1613        write_msg(get_lang('No selected message.')); 
     1614 
     1615 
     1616 
     1617        /* 
    15971618        if(proxy_mensagens.is_local_folder(folder)) { 
    15981619                write_msg(get_lang("You cant archive local mails")); 
     
    16311652        var handler_arquivar_mensagens = function(data) { 
    16321653           
    1633             var msgs_info = []; 
     1654            //var msgs_info = []; 
    16341655           
    1635             for( var i = 0; i < data.length; i++ ) 
    1636                 msgs_info[i] = connector.unserialize( data[i] ); 
     1656            //for( var i = 0; i < data.length; i++ ) 
     1657                //msgs_info[i] = connector.unserialize( data[i] ); 
    16371658 
    16381659            //vejo se já tinha mensagens locais 
    1639             var h = expresso_local_messages.has_local_mails(); 
     1660            //var h = expresso_local_messages.has_local_mails(); 
    16401661             
    1641             expresso_local_messages.insert_mails( msgs_info, folder_dest, function( s, f ){complete_archiving( s, f, h )} ); 
    1642  
     1662            //expresso_local_messages.insert_mails( msgs_info, folder_dest, function( s, f ){complete_archiving( s, f, h )} ); 
     1663 
     1664            expresso_mail_archive.Archive(folder,folder_dest,id_msgs); 
    16431665            document.getElementById("overlay").style.visibility = "hidden"; 
    16441666        } 
Note: See TracChangeset for help on using the changeset viewer.