Ignore:
Timestamp:
04/12/10 10:27:29 (14 years ago)
Author:
paula.franceschini
Message:

Ticket #891 - modificações referentes ao corretor ortografico.

Location:
sandbox/expressoMail1_2/corretor_ortografico/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sandbox/expressoMail1_2/corretor_ortografico/js/main.js

    r2431 r2477  
    12501250                         
    12511251                        var body = document.getElementById("body_" + new_border_ID); 
    1252                         beginSpellCheck(parentDiv.id, "body_" + new_border_ID, new_border_ID); 
     1252                    //    beginSpellCheck();                         
    12531253                        body.contentWindow.document.open();                         
    12541254                        // Insert the signature automaticaly at message body if use_signature preference is set 
     
    13861386 
    13871387        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/"+template+"/images/close_button.gif'></td></tr></table>"; 
     1388 
     1389        setupSpellChecker(); 
     1390 
    13881391        return new_border_ID; //Preciso retornar o ID da nova mensagem. 
    13891392} 
  • sandbox/expressoMail1_2/corretor_ortografico/js/rich_text_editor.js

    r2005 r2477  
    5656 
    5757                var checkbox = document.createElement("INPUT"); 
    58                 checkbox.id = 'viewsource_rt_checkbox'; 
     58                checkbox.id = 'viewsource_rt_checkbox_' + currentTab; 
    5959                checkbox.type = "checkbox"; 
    6060                checkbox.setAttribute("tabIndex","-1"); 
     
    169169        } 
    170170        div_button_rt.appendChild(selectBox); 
     171 
    171172         
    172173        var buttons = ['bold', 'italic', 'underline', 'forecolor', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 
     
    198199        } 
    199200 
     201        selectBox=document.createElement("SELECT"); 
     202        selectBox.id="selectLanguage"; 
     203        selectBox.setAttribute("tabIndex","-1"); 
     204        selectBox.setAttribute("unselectable","on"); 
     205        selectBox.className = 'select_richtext'; 
     206        selectBox.onchange = function () {RichTextEditor.Select("selectLanguage");}; 
     207        var option1 = new Option(get_lang("Portuguese"),"pt_BR" ); 
     208        option1.selected = true; 
     209        var option2 = new Option(get_lang("English"),'en'); 
     210        var option3 = new Option(get_lang("Spanish"),'es'); 
     211        if (is_ie){ 
     212                selectBox.add(option1); 
     213                selectBox.add(option2); 
     214                selectBox.add(option3); 
     215        } 
     216        else{ 
     217                selectBox.add(option1, null); 
     218                selectBox.add(option2, null); 
     219                selectBox.add(option3, null); 
     220        } 
     221        div_button_rt.appendChild(selectBox); 
     222 
     223        // spellCheck button 
     224        var img = document.createElement("IMG"); 
     225        img.id = "spellCheck"; 
     226        img.className = 'imagebutton'; 
     227        img.align = 'center'; 
     228        img.src = './templates/'+template+'/images/'+img.id+'.gif'; 
     229        img.title = get_lang(img.id); 
     230        img.style.cursor = 'pointer'; 
     231        img.onclick = function () {RichTextEditor.editorCommand(this.id,'');}; 
     232        img.onmouseover = function () {this.style.border="outset 2px";}; 
     233        img.onmouseout = function () {this.style.border="solid 2px #C0C0C0";}; 
     234        div_button_rt.appendChild(img); 
     235 
    200236        td.appendChild(div_button_rt); 
    201237        tr.appendChild(td); 
     
    206242cRichTextEditor.prototype.editorCommand = function(command, option) { 
    207243        try { 
    208                 var mainField = document.getElementById(this.editor).contentWindow; 
     244                var mainField = document.getElementById(this.editor).contentWindow; 
    209245                mainField.focus(); 
    210246                var signature = preferences.type_signature == 'html' ? preferences.signature : preferences.signature.replace(/\n/g, "<br>"); 
     
    240276                else if (command == 'Image') 
    241277                        mainField.document.execCommand('InsertImage', false, option); 
     278                else if (command == 'spellCheck'){ 
     279                        beginSpellCheck(); // configure 
     280                        spellCheck(); // run spellChecker 
     281                } 
    242282                else 
    243283                        mainField.document.execCommand(command, false, option); 
Note: See TracChangeset for help on using the changeset viewer.