Ignore:
Timestamp:
04/19/12 14:02:45 (12 years ago)
Author:
gustavo
Message:

Ticket #2611 - Refatorar interface de criação de nova mensagem

File:
1 edited

Legend:

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

    r5962 r5973  
    1010    this.plain = new Array; 
    1111    this.editorReady = true; 
     12        this.hoho = ''; 
    1213} 
    1314 
     
    240241        CKEDITOR.instances[id].setData(data) 
    241242} 
    242 cRichTextEditor.prototype.setInitData = function (id,data,reply,recursion){ 
     243cRichTextEditor.prototype.setInitData = function (id,data,reply,recursion, callback){ 
    243244        var content = $("#content_id_"+id); 
    244245        if(recursion === undefined){ 
     
    282283                                        editor.insertHtml(divBr+data); 
    283284                                editor.focus(); 
    284                         }                        
     285                        } 
     286 
     287                        if(selection !== null){  
     288                                if(selectionRanges[selectionRanges.length-1] !== undefined){ 
     289                                        selectionRanges[selectionRanges.length-1].setStart(selectionRanges[selectionRanges.length-1].getTouchedStartNode().getParents()[1].getChild(0), 0); 
     290                                        selectionRanges[selectionRanges.length-1].setEnd(selectionRanges[selectionRanges.length-1].getTouchedStartNode().getParents()[1].getChild(0), 0); 
     291                                } 
     292                                selection.selectRanges(selectionRanges); 
     293                        } 
    285294                         
    286                         if(selection !== null){ 
    287                                 selection.selectRanges(selectionRanges);  
    288                         } 
    289295                        if (is_webkit){ 
    290296                                $('#cke_contents_body_'+id+'>iframe').scrollTo(':first'); 
    291297                        } 
    292  
     298                        if(callback !== undefined) 
     299                                callback(); 
    293300                } 
    294301                else if(recursion < 20){ 
Note: See TracChangeset for help on using the changeset viewer.