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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.