Ignore:
Timestamp:
10/22/10 13:44:09 (14 years ago)
Author:
brunocosta
Message:

Ticket #891 - Implementação do correção ortográfica.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/expressoMail1_2/js/rich_text_editor.js

    r3238 r3400  
    238238                div_button_rt.appendChild(img); 
    239239        } 
     240        if(preferences.use_SpellChecker != '0'){ 
     241            selectBox=document.createElement("SELECT"); 
     242            selectBox.id="selectLanguage"; 
     243            selectBox.setAttribute("tabIndex","-1"); 
     244            selectBox.setAttribute("unselectable","on"); 
     245            selectBox.className = 'select_richtext'; 
     246            selectBox.onchange = function () {RichTextEditor.Select("selectLanguage");}; 
     247            var option1 = new Option(get_lang("Portuguese"),"pt_BR" ); 
     248            option1.selected = true; 
     249            var option2 = new Option(get_lang("English"),'en'); 
     250            var option3 = new Option(get_lang("Spanish"),'es'); 
     251            if (is_ie){ 
     252                    selectBox.add(option1); 
     253                    selectBox.add(option2); 
     254                    selectBox.add(option3); 
     255            } 
     256            else{ 
     257                    selectBox.add(option1, null); 
     258                    selectBox.add(option2, null); 
     259                    selectBox.add(option3, null); 
     260            } 
     261            div_button_rt.appendChild(selectBox); 
     262 
     263            // spellCheck button 
     264            var img = document.createElement("IMG"); 
     265            img.id = "spellCheck"; 
     266            img.className = 'imagebutton'; 
     267            img.align = 'center'; 
     268            img.src = './templates/'+template+'/images/'+img.id+'.gif'; 
     269            img.title = get_lang(img.id); 
     270            img.style.cursor = 'pointer'; 
     271            img.onclick = function () {RichTextEditor.editorCommand(this.id,'');}; 
     272            img.onmouseover = function () {this.style.border="outset 2px";}; 
     273            img.onmouseout = function () {this.style.border="solid 2px #C0C0C0";}; 
     274            div_button_rt.appendChild(img); 
     275        } 
     276 
    240277 
    241278        td.appendChild(div_button_rt); 
     
    281318                else if (command == 'Image') 
    282319                        mainField.document.execCommand('InsertImage', false, option); 
     320                else if (command == 'spellCheck' && preferences.use_SpellChecker != '0'){ 
     321                        beginSpellCheck(); // configure 
     322                        spellCheck(); // run spellChecker 
     323                } 
    283324                else 
    284325                        mainField.document.execCommand(command, false, option); 
Note: See TracChangeset for help on using the changeset viewer.