Ignore:
Timestamp:
06/13/12 18:15:17 (12 years ago)
Author:
cristiano
Message:

Ticket #2857 - Problema na inserção de fonte padrão do expresso

File:
1 edited

Legend:

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

    r6457 r6483  
    30333033             */ 
    30343034            //////////////////////////////////////////////////////////////////////////////////////////////////// 
    3035  
    3036             $this->rfc2397ToEmbeddedAttachment($mailService , $body);  
    3037  
    30383035            if ($isHTML) 
     3036            { 
     3037                $this->rfc2397ToEmbeddedAttachment($mailService , $body); 
     3038 
     3039                require_once(dirname(__FILE__).'/../../library/CssToInlineStyles/css_to_inline_styles.php'); 
     3040                $defaultStyle = '.expressoDefaultFont{'; 
     3041 
     3042                if(isset($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_family_editor']) && $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_family_editor']) 
     3043                    $defaultStyle .= ' font-family:'.$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_family_editor'] .';'; 
     3044                 
     3045                if(isset($_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_size_editor']) && $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_size_editor']) 
     3046                    $defaultStyle .= ' font-size:'.$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['font_size_editor'].';'; 
     3047                 
     3048                $defaultStyle .= '}'; 
     3049 
     3050                $cssToInlineStyles = new CSSToInlineStyles('<span class="expressoDefaultFont">'.$body.'</span>'); 
     3051                $cssToInlineStyles->setUseInlineStylesBlock(true); 
     3052                $cssToInlineStyles->setCSS($defaultStyle); 
     3053                $cssToInlineStyles->setCleanup(TRUE); 
     3054                $body = $cssToInlineStyles->convert(); //Converte as tag style em inline styles 
     3055                unset($cssToInlineStyles); 
     3056 
    30393057                $mailService->setBodyHtml($body); 
     3058            }     
    30403059            else 
    30413060                $mailService->setBodyText($body); 
Note: See TracChangeset for help on using the changeset viewer.