Ignore:
Timestamp:
11/03/11 13:24:28 (12 years ago)
Author:
wmerlotto
Message:

Ticket #2305 - Enviando alteracoes, desenvolvidas internamente na Prognus, do modulo ExpressoMail?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/rich_text_editor.js

    r5083 r5134  
    9999        var textArea = document.createElement("TEXTAREA"); 
    100100        textArea.id = pObj; 
    101         textArea.style.height = '500'; 
    102101        textArea.style.width = '100%'; 
    103102        parentDiv.appendChild(textArea); 
     
    367366           if(selection !== undefined && selection !== null) var selectionRanges = selection.getRanges();  
    368367 
    369            editor.insertHtml('<div><br type="_moz"></div>'+data); 
     368           var fontSize = ''; 
     369           var fontFamily = ''; 
    370370            
    371           if(selection !== null) selection.selectRanges(selectionRanges);  
     371           if(typeof(preferences.font_size_editor) !== 'undefined') 
     372               fontSize = 'font-size:' + preferences.font_size_editor; 
     373                
     374           if(fontSize != '')  
     375               fontFamily = ';' 
     376            
     377           if(typeof(preferences.font_family_editor) !== 'undefined') 
     378               fontFamily += 'font-family:' + preferences.font_family_editor + ';';  
     379             
     380           var divBr = '<div style="'+fontSize+fontFamily+'"><br type="_moz"></div>'; 
    372381           
    373           editor.execCommand("autogrow"); //Atualiza tamanho do editor 
     382           editor.insertHtml(divBr+divBr+divBr+data); 
     383            
     384           if(selection !== null) selection.selectRanges(selectionRanges);  
    374385           
    375386          //Caso não for uma resposta votla o foco para o input to 
     
    396407         CKEDITOR.remove(CKEDITOR.instances[id]); 
    397408      
     409    var height = document.body.scrollHeight; 
     410    height -= 425; 
     411      
    398412     $('#'+id).ckeditor(  
    399413          function() {RichTextEditor.execPosInstance(id)}, 
    400414          { 
    401               toolbar:'mail'       
     415              toolbar:'mail', 
     416              height: height 
    402417          });  
    403418 
Note: See TracChangeset for help on using the changeset viewer.