Changeset 6483 for trunk/expressoMail1_2


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

Location:
trunk/expressoMail1_2
Files:
2 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); 
  • trunk/expressoMail1_2/js/rich_text_editor.js

    r5973 r6483  
    200200         
    201201        $(".cke_editor").css("white-space", "normal"); 
    202         RichTextEditor.editorReady = true; 
    203      }   
     202 
     203    if(typeof(preferences.font_size_editor) !== 'undefined') 
     204        $(editor.document.$.body).css("font-size",preferences.font_size_editor); 
     205    if(typeof(preferences.font_family_editor) !== 'undefined') 
     206        $(editor.document.$.body).css("font-family",preferences.font_family_editor); 
     207 
     208    RichTextEditor.editorReady = true; 
     209    }    
    204210} 
    205211 
Note: See TracChangeset for help on using the changeset viewer.