Changeset 13 for trunk/expressoMail1_2


Ignore:
Timestamp:
04/10/07 10:21:10 (17 years ago)
Author:
niltonneto
Message:

* empty log message *

Location:
trunk/expressoMail1_2
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/docs/change_log.txt

    r12 r13  
    6161em outro parametro não padrão. 
    6262- Adicionada funcionalidade que compatibiliza mensagens encapsuladas, e com formato 7bit, serem visualizadas no ExpressoMail. 
     63 
     6409/04/2007 - [1.2030] 
     65- Implementado mesma funcionalidade do expandir Campo "Para" para o campo "CC", abrir uma mensagem. O objetivo é evitar travamento 
     66do navegador quando existem muito destinatários a serem expandidos com o plugin do Contact Center. 
     67- Corrigido problema de mensagens que têm nome de arquivos nos atributos "parameters" e "dparameters" de sua estrutura. 
     68 
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r12 r13  
    588588                */ 
    589589                // HTML Filter 
    590                 //$body = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=# onclick=\"javascript:new_message('new_by_message', '\\2@\\3')\">\\2@\\3</a>", $body);       
    591          
     590                //$body = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=# onclick=\"javascript:new_message('new_by_message', '\\2@\\3')\">\\2@\\3</a>", $body); 
    592591        $body = str_replace("\r\n", "\n", $body); 
    593592                if ($encoding == 'quoted-printable') 
    594593            { 
     594                         
    595595                        for($i=0;$i<256;$i++) { 
    596596                                $c1=dechex($i); 
     
    611611                $body = base64_decode($body); 
    612612        } 
    613         else if ($encoding == '7bit')  
     613        /*else if ($encoding == '7bit')  
    614614        { 
    615                 $body = quoted_printable_decode($body); 
    616         } 
     615                $body = quoted_printable_decode($body);                                          
     616        }*/ 
    617617                // All other encodings are returned raw. 
    618618                if (strtolower($charset) == "utf-8") 
     
    692692                // It no has exception,then open the link in new window. 
    693693                if(!count($matches)){ 
    694                         $body = @eregi_replace("<a href=", "<a target='_blank' href=", $body); 
     694                        $body = @eregi_replace("<a (.*) href=", "<a \\1 target='_blank' href=", $body); 
     695                        $body = @str_replace("<a href=", "<a target='_blank' href=", $body); 
    695696                        $body = @eregi_replace("target=\"\"", "target='_blank'", $body); 
    696697                        $body = @eregi_replace("target=''", "target='_blank'", $body); 
     
    15011502                $str = ereg_replace('"', '&quot;', $str); 
    15021503                $str = ereg_replace('\'', '&#039;', $str); 
     1504                 
    15031505                $str = ereg_replace('<', '&lt;', $str); 
    15041506                $str = ereg_replace('>', '&gt;', $str); 
  • trunk/expressoMail1_2/inc/class.message_components.inc.php

    r10 r13  
    127127                                                $this->charset[$mid][$n]   = $charset; 
    128128                        $this->fsize[$mid][$n]     = (!isset($parts[$p]->bytes) || empty($parts[$p]->bytes))? 0 : $parts[$p]->bytes; 
    129  
     129                                                $hasAttachment = false; 
    130130                        # Force inline disposition if none is present 
    131131                        //if ($parts[$p]->ifdisposition == true) 
     
    144144                                        { 
    145145                                            $this->fname[$mid][$n] = $param->value; 
     146                                            $hasAttachment = true; 
    146147                                            break; 
    147                                         } 
     148                                        }                                         
    148149                                    } 
    149150                                } 
    150151                                 
    151152                                // Alguns web-mails utilizam o parameters 
    152                                 if ($parts[$p]->ifparameters == true) 
     153                                if ($parts[$p]->ifparameters == true && !$hasAttachment) 
    153154                                { 
    154155                                    $params = $parts[$p]->parameters; 
     
    170171                                        if(strtolower($param->attribute) == 'charset'){ 
    171172                                                if($this->charset[$mid][$n] == '') 
    172                                                         $this->charset[$mid][$n] = $param->value; 
     173                                                        $this->charset[$mid][$n] = $param->value;                                                
    173174                                        } 
    174175                                    } 
     
    224225                } 
    225226                 
    226                 $this->encoding[$mid][0]                = $this->encoding_types[$this->structure[$mid]->encoding]; 
     227                $this->encoding[$mid][0]              = $this->encoding_types[$this->structure[$mid]->encoding]; 
    227228                if(!preg_match("/5./",phpversion())) 
    228229                                        $this->charset[$mid][0] = $this->structure[$mid]->parameters[0]->value; 
     
    250251                                        } 
    251252                                } 
     253                                if (isset($this->structure[$mid]->ifparameters)) 
     254                                { 
     255                                        $params = $this->structure[$mid]->parameters; 
     256                                        $n = 0; 
     257                                        if($params) 
     258                                        foreach ($params as $param) 
     259                                        { 
     260                                                if(strtolower($param->attribute) == 'charset'){ 
     261                                if($this->charset[$mid][$n] == '') 
     262                                $this->charset[$mid][$n] = $param->value; 
     263                        } 
     264                                                $n++; 
     265                                        } 
     266                                } 
    252267                                $this->disposition[$mid][0] = $this->structure[$mid]->disposition; 
    253268                //$this->disposition[$mid][0] = 'inline'; 
  • trunk/expressoMail1_2/index.php

    r10 r13  
    44                'nonavbar' => False, 
    55                'currentapp' => 'expressoMail1_2', 
    6                 'update_version'        => '1.2029', 
     6                'update_version'        => '1.2030', 
    77                'enable_nextmatchs_class' => True 
    88        ); 
     
    8282 
    8383        // Is IE ?? 
    84         echo "<SCRIPT>if ((!is_gecko) && (!is_ie6up)) {alert('OPSS !! Desculpe, mas seu navegador não suporta este WebMail. Instale o Mozilla FireFox 1.0+ ou Internet Explorer 6.0+. No momento, utilize a versão antiga do WebMail.');window.location=\"../email/\";}</SCRIPT>"; 
     84        //echo "<SCRIPT>if ((!is_gecko) && (!is_ie6up)) {alert('OPSS !! Desculpe, mas seu navegador não suporta este WebMail. Instale o Mozilla FireFox 1.0+ ou Internet Explorer 6.0+. No momento, utilize a versão antiga do WebMail.');window.location=\"../email/\";}</SCRIPT>"; 
    8585         
    8686        // Get Preferences or redirect to preferences page. 
  • trunk/expressoMail1_2/js/draw_api.js

    r2 r13  
    956956                div_toaddress.id = "div_toaddress_"+ID; 
    957957                div_toaddress.style.display=""; 
    958                 div_toaddress.innerHTML += " (<a STYLE='color: RED;' onclick=javascript:show_div_address_full('"+ID+"');>"+get_lang('more')+"</a>)"; 
     958                div_toaddress.innerHTML += " (<a STYLE='color: RED;' onclick=javascript:show_div_address_full('"+ID+"','to');>"+get_lang('more')+"</a>)"; 
    959959                to.appendChild(div_toaddress);           
    960960        } 
     
    981981                cc_values.value = info_msg.cc; 
    982982                 
    983                 var ccaddress_array = info_msg.cc.split(",");            
    984                 if (ccaddress_array.length > 1){ 
     983                ccaddress_array[ID] = info_msg.cc.split(",");            
     984                if (ccaddress_array[ID].length > 1){ 
    985985                        var div_ccaddress = document.createElement("SPAN"); 
    986986                        div_ccaddress.id = "div_ccaddress_"+ID; 
    987987                        var div_ccaddress_full = document.createElement("SPAN"); 
    988                         div_ccaddress_full.id = "div_ccaddress_full_"+ID; 
    989                  
     988                        div_ccaddress_full.id = "div_ccaddress_full_"+ID;                
    990989                        div_ccaddress.style.display=""; 
    991                         cc.innerHTML = draw_plugin_cc(ID, ccaddress_array[0]); 
    992                         div_ccaddress.innerHTML += " (<a STYLE='color: RED;' onclick=document.getElementById('div_ccaddress_"+ID+"').style.display='none';document.getElementById('div_ccaddress_full_"+ID+"').style.display='';>"+get_lang('more')+"</a>)"; 
    993                         cc.appendChild(div_ccaddress);           
    994                         div_ccaddress_full.style.display="none"; 
    995                          
    996                         for(idx = 1 ; idx  < ccaddress_array.length;idx++) { 
    997                                 div_ccaddress_full.innerHTML += ', '; 
    998                                 div_ccaddress_full.innerHTML += draw_plugin_cc(ID, ccaddress_array[idx]); 
    999                         }                        
    1000                          
    1001                         div_ccaddress_full.innerHTML += " (<a STYLE='color: RED;' onclick=document.getElementById('div_ccaddress_full_"+ID+"').style.display='none';document.getElementById('div_ccaddress_"+ID+"').style.display='';>"+get_lang('less')+"</a>)"; 
    1002                         cc.appendChild(div_ccaddress_full); 
     990                        cc.innerHTML = draw_plugin_cc(ID, ccaddress_array[ID][0]); 
     991                        div_ccaddress.innerHTML += " (<a STYLE='color: RED;' onclick=javascript:show_div_address_full('"+ID+"','cc');>"+get_lang('more')+"</a>)"; 
     992                        cc.appendChild(div_ccaddress); 
    1003993                } 
    1004994                else{ 
     
    21022092         
    21032093} 
    2104 function show_div_address_full(id) { 
    2105         var div_toaddress_full = Element("div_toaddress_full_"+id); 
    2106         if(!div_toaddress_full) { 
    2107                 div_toaddress_full = document.createElement("SPAN"); 
    2108                 div_toaddress_full.id = "div_toaddress_full_"+id;        
    2109                 div_toaddress_full.style.display="none";         
    2110                 var toaddress = toaddress_array[id]; 
    2111                 var isOverLimit = (toaddress.length > 100); 
     2094function show_div_address_full(id, type) { 
     2095        var div_address_full = Element("div_"+type+"address_full_"+id); 
     2096        if(!div_address_full) { 
     2097                div_address_full = document.createElement("SPAN"); 
     2098                div_address_full.id = "div_"+type+"address_full_"+id;    
     2099                div_address_full.style.display="none";   
     2100                var _address = eval(type+"address_array['"+id+"']"); 
     2101                var isOverLimit = (_address.length > 100); 
    21122102                 
    21132103                if(isOverLimit) { 
    2114                         alert("Esse campo possui muitos endereços ("+toaddress.length+" destinatários).\r\n"+ 
     2104                        alert("Esse campo possui muitos endereços ("+_address.length+" destinatários).\r\n"+ 
    21152105                        "Para evitar o travamento do navegador, o botão 'Adicionar Contato' foi desabilitado!"); 
    21162106                } 
    2117                 for(var idx = 1 ; idx  < toaddress.length;idx++) { 
    2118                         div_toaddress_full.innerHTML += isOverLimit ?  '<br>'+toaddress[idx] : ','+draw_plugin_cc(id,toaddress[idx]); 
     2107 
     2108                for(var idx = 1 ; idx  < _address.length;idx++) { 
     2109                        div_address_full.innerHTML += isOverLimit ?  '<br>'+_address[idx] : ','+draw_plugin_cc(id,_address[idx]); 
    21192110                }                
    2120                 div_toaddress_full.innerHTML += " (<a STYLE='color: RED;' onclick=document.getElementById('div_toaddress_full_"+id+"').style.display='none';document.getElementById('div_toaddress_"+id+"').style.display='';>"+get_lang('less')+"</a>)"; 
    2121                 Element("to_"+id).appendChild(div_toaddress_full); 
    2122         } 
    2123         Element('div_toaddress_'+id).style.display='none'; 
    2124         div_toaddress_full.style.display=''; 
    2125 } 
     2111                div_address_full.innerHTML += " (<a STYLE='color: RED;' onclick=document.getElementById('div_"+type+"address_full_"+id+"').style.display='none';document.getElementById('div_"+type+"address_"+id+"').style.display='';>"+get_lang('less')+"</a>)"; 
     2112                Element(type+"_"+id).appendChild(div_address_full); 
     2113        } 
     2114        Element('div_'+type+'address_'+id).style.display='none'; 
     2115        div_address_full.style.display=''; 
     2116} 
  • trunk/expressoMail1_2/js/globals.js

    r2 r13  
    1313var array_lang = new Array(); 
    1414var cyrus_delimiter = ''; 
     15var ccaddress_array = new Array(); 
    1516var toaddress_array = new Array(); 
    1617var tree_folders = ''; 
Note: See TracChangeset for help on using the changeset viewer.