Changeset 603 for trunk


Ignore:
Timestamp:
01/14/09 11:47:51 (15 years ago)
Author:
eduardoalex
Message:

Ticket #396

Location:
trunk/expressoMail1_2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/inc/class.imap_functions.inc.php

    r591 r603  
    180180                $return_get_body = $this->get_body_msg($msg_number, $msg_folder); 
    181181                 
    182                 //Substituição de links por hiperlinks no texto. 
    183                 $body = ereg_replace("^<>\'&^<>\"[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href='\\0'>\\0</a>",$return_get_body['body']); 
    184                 $body = ereg_replace("^<>\'&^<>\"www[^<>[:space:]]+[[:alnum:]/]","<a href='http://\\0'>\\0</a>",$body); 
    185                  
     182                //Substituição de links em email para abrir no próprio expresso 
     183                $body = ereg_replace("<a[^>]*href=[\'\"]mailto:([^\"\']+)[\'\"]>([^<]+)</a>","<a href=\"javascript:new_message_to('\\1')\">\\2</a>",$return_get_body['body']); 
     184                         
    186185                $return['body']                 = $body; 
    187186                $return['attachments']  = $return_get_body['attachments']; 
  • trunk/expressoMail1_2/js/main.js

    r569 r603  
    457457} 
    458458 
     459function new_message_to(email) { 
     460        var new_border_ID = new_message('new','null'); 
     461        document.getElementById("to_" + new_border_ID).value=email; 
     462} 
     463 
    459464function new_message(type, border_ID){ 
    460  
    461465        var new_border_ID = draw_new_message(parseInt(border_ID)); 
    462466        if (new_border_ID == false) 
     
    834838 
    835839        Element("border_id_" + new_border_ID).innerHTML = "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td id=font_border_id_" + new_border_ID +" class='font-menu' width=*>" +title + "</td><td width=1px><img onmousedown='javascript:return false' style='cursor:pointer' onclick=delete_border('" + new_border_ID + "','false') src='templates/default/images/close_button.gif'></td></tr></table>"; 
     840        return new_border_ID; //Preciso retornar o ID da nova mensagem. 
    836841} 
    837842 
Note: See TracChangeset for help on using the changeset viewer.