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
Files:
7 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); 
  • sandbox/expressoMail1_2/corretor_ortografico/setup/phpgw_en.lang

    r1747 r2477  
    9999Enable digitally sign/cipher the message?       expressoMail1_2 en      Enable digitally sign/cipher the message? 
    100100Enable Quick Reply      expressoMail1_2 en      Enable Quick Reply 
     101English                 expressoMail1_2 en      English 
    101102Enter a name for the box        expressoMail1_2 en      Enter a name for the box 
    102103Enter the name of the new folder:       expressoMail1_2 en      Enter the name of the new folder: 
     
    257258Postfix with LDAP       expressoMail1_2 en      Postfix with LDAP 
    258259People  expressoMail1_2 en      People 
     260Portuguese              expressoMail1_2 en      Portuguese 
    259261Preferences     expressoMail1_2 en      Preferences 
    260262Previous        expressoMail1_2 en      Previous 
     
    335337Spam    expressoMail1_2 en      Spam 
    336338Spam Folder name        admin   en      Spam Folder name 
     339Spanish expressoMail1_2 en      Spanish 
    337340standard IMAP server    expressoMail1_2 en      standard IMAP server 
    338341standard POP3 server    expressoMail1_2 en      standard POP3 server 
  • sandbox/expressoMail1_2/corretor_ortografico/setup/phpgw_es-es.lang

    r1402 r2477  
    7777Enable  expressoMail1_2 es-es   Habilitar 
    7878Enable Quick Reply      expressoMail1_2 es-es   Responder rápidamente (con detalles y al remitente) 
     79English         expressoMail1_2 es-es   Inglés 
    7980Enter a name for the box        expressoMail1_2 es-es   Entre con un nombre para la Bandeja 
    8081Enter the name of the new folder:       expressoMail1_2 es-es   Entre con un nombre para la nueva carpeta:  
     
    216217Personal Catalog        expressoMail1_2 es-es   Catálogo Personal 
    217218Postfix with LDAP       expressoMail1_2 es-es   Postfix con LDAP 
     219Portuguese              expressoMail1_2 es-es   Portugués 
    218220Preferences     expressoMail1_2 es-es   Preferencias 
    219221Previous        expressoMail1_2 es-es   Anterior 
     
    286288Spam    expressoMail1_2 es-es   Espam 
    287289Spam Folder name        admin   es-es   Nombre de la carpeta Spam 
     290Spanish             expressoMail1_2     es-es   Español 
    288291standard IMAP server    expressoMail1_2 es-es   Servidor standar de IMAP 
    289292standard POP3 server    expressoMail1_2 es-es   Servidor standar de POP3 
  • sandbox/expressoMail1_2/corretor_ortografico/setup/phpgw_pt-br.lang

    r2022 r2477  
    134134Enabling this options you will be able to store messages in your local computer expressoMail1_2 pt-br   Ao ativar esta opção você será capaz de armazenar mensagens no seu computador local 
    135135End of archive messages expressoMail1_2 pt-br   Fim do arquivamento de mensagens 
     136English     expressoMail1_2     pt-br Inglês 
    136137Enter a name for the box        expressoMail1_2 pt-br   Entre com um nome para a caixa 
    137138Enter the name of the new folder:       expressoMail1_2 pt-br   Insira o nome da nova pasta:  
     
    337338Phone Warnings List     expressoMail1_2 pt-br   Lista de Alertas Telefônicos 
    338339Postfix with LDAP       expressoMail1_2 pt-br   Postfix with LDAP 
     340Portuguese              expressoMail1_2 pt-br   Português 
    339341Preferences     expressoMail1_2 pt-br   Preferências 
    340342Preview message text within a tool-tip box?     expressoMail1_2 pt-br   Pré-visualizar a mensagem em uma caixa tool-tip? 
     
    435437Spam    expressoMail1_2 pt-br   Spam 
    436438Spam Folder name        admin   pt-br   Nome da pasta spam 
     439Spanish     expressoMail1_2     pt-br   Espanhol 
    437440standard IMAP server    expressoMail1_2 pt-br   servidor padrão de IMAP 
    438441standard POP3 server    expressoMail1_2 pt-br   servidor padrão de POP3 
  • sandbox/expressoMail1_2/corretor_ortografico/spell_checker/js/spell_checker.js

    r2430 r2477  
    4343var positionEditor; 
    4444var areaEditor; 
    45 var abaEditor;  
     45var abaEditor; 
     46var blockSpellCheck = false; 
    4647cp = new cpaint(); 
    4748cp.set_transfer_mode('post'); 
    4849cp.set_response_type('text'); 
    49 function beginSpellCheck(position, area, aba){ 
    50  
    51      
     50function beginSpellCheck(){ 
     51if(!blockSpellCheck){ 
     52    position = "body_position_" + currentTab; 
     53    area = "body_" + currentTab; 
     54    aba = currentTab; 
    5255    //var cp = new cpaint(); 
    5356    // alert("Seta globals"); 
     
    109112//window.onload =new setupSpellCheckers(); 
    110113//alert("Fim"); 
     114} else { 
     115    alert("O corretor ja esta rodando.") 
     116} 
    111117} // fecha funᅵᅵo 
    112118 
     
    140146         
    141147}; // end setInit 
     148 
     149function setupSpellChecker(){ 
     150 
     151 
     152        currObj = this; 
     153 
     154        currObj.config               = new Array(); 
     155         
     156        currObj.config['divId'] = "body_position_" + currentTab; 
     157        currObj.config['width'] = "99%"; 
     158        currObj.config['id'] = "body_" + currentTab; 
     159 
     160        spellContainer = document.createElement('DIV'); 
     161        spellContainer.id = currObj.config['divId']; 
     162        spellContainer.className = 'spell_container'; 
     163        spellContainer.style.width = currObj.config['width']; 
     164 
     165        oldElement = document.getElementById(currObj.config['id']); 
     166 
     167        //oldElement.parentNode.replaceChild(spellContainer, oldElement); 
     168 
     169        //generate the div to hold the spell checker controls 
     170        currObj.controlPanelDiv = document.createElement('DIV'); 
     171        currObj.controlPanelDiv.className = 'control_panel'; 
     172        currObj.controlPanelDiv.id = 'control_panel_' + currentTab; 
     173        document.getElementById(currObj.config['divId']).appendChild(currObj.controlPanelDiv); 
     174 
     175        //the span that toggles between spell checking and editing 
     176        currObj.actionSpan = document.createElement('SPAN'); 
     177        currObj.actionSpan.className = "action"; 
     178        currObj.actionSpan.id = "action";         
     179        /*if(currObj.config['useIcons']) 
     180        { 
     181                currObj.actionSpan.innerHTML = "<a class=\"check_spelling\" onclick=\"setCurrentObject(" + currObj.config['varName'] + "); " + currObj.config['varName'] + ".spellCheck();\"><img src=\"images/spellcheck.png\" width=\"16\" height=\"16\" title=\"Verificar Ortografia\" alt=\"Verificar Ortografia \" border=\"0\" /></a>"; 
     182        } 
     183        else 
     184        { 
     185                currObj.actionSpan.innerHTML = "<a class=\"check_spelling\" onclick=\"setCurrentObject(" + currObj.config['varName'] + "); " + currObj.config['varName'] + ".spellCheck();\">Verificar Ortografia</a>"; 
     186        }*/ 
     187        currObj.controlPanelDiv.appendChild(currObj.actionSpan); 
     188 
     189        //the span that lets the user know of the status of the spell checker 
     190        currObj.statusSpan = document.createElement('SPAN'); 
     191        currObj.statusSpan.className = "status"; 
     192        currObj.statusSpan.id = "status"; 
     193        currObj.statusSpan.innerHTML = ""; 
     194        currObj.controlPanelDiv.style.display = "none"; 
     195        currObj.controlPanelDiv.appendChild(currObj.statusSpan); 
     196 
     197        //document.getElementById("body_position_" + currentTab).insertBefore(currObj.controlPanelDiv, document.getElementById("viewsource_rt_checkbox")); 
     198        //the textarea to be spell checked 
     199        //oldElement.value = currObj.config['value']; 
     200        //document.getElementById(currObj.config['divId']).appendChild(oldElement); 
     201        currObj.controlPanelDiv.parentNode.insertBefore(currObj.controlPanelDiv, document.getElementById("viewsource_rt_checkbox_" + currentTab)); 
     202 
     203 } 
    142204 
    143205 
     
    161223function ajaxSpell(varName, width, height, spellUrl, divId, name, id, title, value) 
    162224{ 
    163          
    164         currObj = this; 
     225         
     226       currObj = this; 
    165227 
    166228        currObj.config               = new Array();         //the array of configuration options 
     
    185247        } 
    186248         
    187         spellContainer = document.createElement('DIV'); 
     249        /*spellContainer = document.createElement('DIV'); 
    188250        spellContainer.id = currObj.config['divId']; 
    189251        spellContainer.className = 'spell_container'; 
     
    192254        oldElement = document.getElementById(currObj.config['id']); 
    193255 
    194         oldElement.parentNode.replaceChild(spellContainer, oldElement); 
     256        //oldElement.parentNode.replaceChild(spellContainer, oldElement); 
    195257         
    196258        //generate the div to hold the spell checker controls 
     
    203265        currObj.actionSpan.className = "action"; 
    204266        currObj.actionSpan.id = "action"; 
    205         if(currObj.config['useIcons']) 
     267        /*if(currObj.config['useIcons']) 
    206268        { 
    207269                currObj.actionSpan.innerHTML = "<a class=\"check_spelling\" onclick=\"setCurrentObject(" + currObj.config['varName'] + "); " + currObj.config['varName'] + ".spellCheck();\"><img src=\"images/spellcheck.png\" width=\"16\" height=\"16\" title=\"Verificar Ortografia\" alt=\"Verificar Ortografia \" border=\"0\" /></a>"; 
     
    210272        { 
    211273                currObj.actionSpan.innerHTML = "<a class=\"check_spelling\" onclick=\"setCurrentObject(" + currObj.config['varName'] + "); " + currObj.config['varName'] + ".spellCheck();\">Verificar Ortografia</a>"; 
    212         } 
    213         currObj.controlPanelDiv.appendChild(currObj.actionSpan); 
     274        }*/ 
     275        /*currObj.controlPanelDiv.appendChild(currObj.actionSpan); 
    214276         
    215277        //the span that lets the user know of the status of the spell checker 
     
    219281        currObj.statusSpan.innerHTML = ""; 
    220282        currObj.controlPanelDiv.appendChild(currObj.statusSpan); 
    221          
     283 
     284        //document.getElementById("body_position_" + currentTab).insertBefore(currObj.controlPanelDiv, document.getElementById("viewsource_rt_checkbox")); 
    222285        //the textarea to be spell checked 
    223286        oldElement.value = currObj.config['value']; 
    224         document.getElementById(currObj.config['divId']).appendChild(oldElement); 
    225  
    226          
     287        //document.getElementById(currObj.config['divId']).appendChild(oldElement); 
     288        currObj.controlPanelDiv.parentNode.insertBefore(currObj.controlPanelDiv, document.getElementById("viewsource_rt_checkbox_" + currentTab)); 
     289        */ 
     290 
     291        currObj.controlPanelDiv = document.getElementById('control_panel_' + currentTab); 
     292        currObj.statusSpan = currObj.controlPanelDiv.childNodes[1]; 
     293        currObj.actionSpan = currObj.controlPanelDiv.childNodes[0] ; 
     294 
    227295        currObj.objToCheck              = document.getElementById(currObj.config['id']);      //the actual object we're spell checking 
    228296        currObj.spellingResultsDiv      = null;                                               // Auto-generated results div 
     
    276344function spellCheck_cb(new_data) 
    277345{ 
    278         with(currObj); 
     346 
     347        with(currObj); 
    279348        new_data = new_data.toString(); 
    280349        var isThereAMisspelling = new_data.charAt(0); 
     
    295364 
    296365        currObj.objToCheck.style.display = "none"; 
    297         currObj.objToCheck.parentNode.insertBefore(currObj.spellingResultsDiv,currObj.objToCheck); 
     366        //currObj.objToCheck.parentNode. 
     367        //currObj.objToCheck.parentNode.appendChild(currObj.spellingResultsDiv,currObj.objToCheck); 
     368        currObj.objToCheck.parentNode.insertBefore(currObj.spellingResultsDiv, document.getElementById("viewsource_rt_checkbox_" + currentTab)); 
    298369        currObj.statusSpan.innerHTML = "";     
    299370         
     
    320391                currObj.objToCheck.disabled = false; 
    321392        } 
     393 
     394       currObj.controlPanelDiv.style.display = "block"; 
     395 
    322396}; // end spellCheck_cb 
    323397 
     
    332406 *************************************************************/ 
    333407function spellCheck() { 
    334         with(currObj); 
    335         var query; 
    336  
    337         if(currObj.spellingResultsDiv) 
    338         { 
    339                 currObj.spellingResultsDiv.parentNode.removeChild(currObj.spellingResultsDiv); 
    340                 currObj.spellingResultsDiv = null; 
    341         } 
    342          
    343         if(currObj.config['useIcons']) 
    344         { 
    345                 currObj.actionSpan.innerHTML = "<img src=\"images/spellcheck.png\" width=\"16\" height=\"16\" title=\"Verificar Ortografia\" alt=\"Verificar Ortografia\" border=\"0\" />"; 
    346         } 
    347         else 
    348         { 
    349                 currObj.actionSpan.innerHTML = "<a class=\"check_spelling\">Verificar Ortografia</a>"; 
    350         } 
    351          
    352         if(currObj.config['useIcons']) 
    353         { 
    354                 currObj.statusSpan.innerHTML = "<img src=\"images/working.gif\" width=\"16\" height=\"16\" title=\"Verificando Ortografia...\" alt=\"Verificando Ortografia...\" border=\"0\" />"; 
    355         } 
    356         else 
    357         { 
    358                 currObj.statusSpan.innerHTML = "Verificando Ortografia..."; 
    359         } 
    360          
    361          
    362         // Obtain the HTML content from iframe (edit area) 
    363          var ifr= currObj.objToCheck; 
    364          if(ifr.contentWindow) 
    365             ifr=ifr.contentWindow.document; 
    366          else 
    367             ifr=ifr.contentDocument; 
    368          var texto = ifr.body.innerHTML; 
    369          
    370          
    371         query = texto; 
    372         //query = currObj.objToCheck.value;         
    373          
    374         //query = query.replace(/\r?\n/gi, "<br />"); //  Commented from the original by Nathalie 
    375         query = query.replace(/\r?\n/gi, " ");  // replace \n with " " - By Nathalie 
    376         
    377          
    378         cp.call(currObj.config['spellUrl'], 'spellCheck', spellCheck_cb, query, currObj.config['varName']); 
     408 
     409        if(!blockSpellCheck) { 
     410            blockSpellCheck = true; 
     411 
     412         language =  document.getElementById("selectLanguage"); 
     413            language = language[document.getElementById("selectLanguage").selectedIndex].value; 
     414 
     415            with(currObj); 
     416            var query; 
     417 
     418            currObj.controlPanelDiv.style.display = "block"; 
     419 
     420            if(currObj.spellingResultsDiv) 
     421            { 
     422                    currObj.spellingResultsDiv.parentNode.removeChild(currObj.spellingResultsDiv); 
     423                    currObj.spellingResultsDiv = null; 
     424            } 
     425 
     426            /*if(currObj.config['useIcons']) 
     427            { 
     428                    currObj.actionSpan.innerHTML = "<img src=\"images/spellcheck.png\" width=\"16\" height=\"16\" title=\"Verificar Ortografia\" alt=\"Verificar Ortografia\" border=\"0\" />"; 
     429            } 
     430            else 
     431            { 
     432                    currObj.actionSpan.innerHTML = "<a class=\"check_spelling\">Verificar Ortografia</a>"; 
     433            }*/ 
     434 
     435            /*if(currObj.config['useIcons']) 
     436            { 
     437                    currObj.statusSpan.innerHTML = "<img src=\"images/working.gif\" width=\"16\" height=\"16\" title=\"Verificando Ortografia...\" alt=\"Verificando Ortografia...\" border=\"0\" />"; 
     438            } 
     439            else 
     440            { 
     441                    currObj.statusSpan.innerHTML = "Verificando Ortografia..."; 
     442            }*/ 
     443 
     444            // Obtain the HTML content from iframe (edit area) 
     445             var ifr= currObj.objToCheck; 
     446             if(ifr.contentWindow) 
     447                ifr=ifr.contentWindow.document; 
     448             else 
     449                ifr=ifr.contentDocument; 
     450             var texto = ifr.body.innerHTML; 
     451 
     452            query = texto; 
     453            //query = currObj.objToCheck.value; 
     454 
     455            //query = query.replace(/\r?\n/gi, "<br />"); //  Commented from the original by Nathalie 
     456            query = query.replace(/\r?\n/gi, " ");  // replace \n with " " - By Nathalie 
     457 
     458            cp.call(currObj.config['spellUrl'], 'spellCheck', spellCheck_cb, query, currObj.config['varName'], language); 
     459        } 
    379460}; // end spellcheck 
    380461 
     
    400481                spellingSuggestionsDiv = null; 
    401482        } 
    402          
     483 
     484        currObj.controlPanelDiv.style.display = "block"; 
     485 
    403486        if(currObj.config['useIcons']) 
    404487        { 
     
    595678function showSuggestions(word, id) 
    596679{ 
    597  
     680        language =  document.getElementById("selectLanguage"); 
     681        language = language[document.getElementById("selectLanguage").selectedIndex].value; 
     682         
    598683        with(currObj); 
    599684        if(currObj.config['useIcons']) 
     
    633718        document.body.appendChild(spellingSuggestionsDiv); 
    634719         
    635         cp.call(currObj.config['spellUrl'], 'showSuggestions', showSuggestions_cb, word, id); 
     720        cp.call(currObj.config['spellUrl'], 'showSuggestions', showSuggestions_cb, word, id, language); 
    636721}; // end showSuggestions 
    637722 
     
    682767 
    683768        with(currObj); 
    684  
    685769        //By Nathalie - The Element means that this div belongs to the current tab 
    686770        var parentElement = Element(currObj.spellingResultsDiv.id);  
    687  
    688771        // Obtain all span tags which have highlight className or corrected_word className 
    689772        var nodeArray = parentElement.getElementsByTagName("span"); 
     
    691774        var nodeRemove = new Array(totArray); 
    692775        var j = -1; 
     776 
    693777        for (var i = 0 ; i < totArray ; i++) { 
    694778            var node = nodeArray[i]; 
     
    708792            parent.replaceChild(fake, document.getElementById(nodeRemove[i]));             
    709793        } 
    710         var text = currObj.spellingResultsDiv.innerHTML; 
     794 
     795       var text = currObj.spellingResultsDiv.innerHTML; 
    711796 
    712797        text = text.replace(/&nbsp;/gi, " %u2026 "); // Replace &nbsp; with the code %u2026 
    713798        text = '*' + text; 
     799 
    714800        cp.call(currObj.config['spellUrl'], 'switchText', switchText_cb, text); 
    715801         
     
    730816function switchText_cb(new_string) 
    731817{ 
    732  
     818     
    733819        with(currObj); 
    734820 
     
    775861         
    776862        with(currObj); 
     863 
     864        currObj.controlPanelDiv.style.display = "block"; 
    777865        if(currObj.config['useIcons']) 
    778866        { 
     
    812900function resetAction() 
    813901{ 
    814         
    815902        with(currObj); 
    816         if(currObj.config['useIcons']) 
     903        /*if(currObj.config['useIcons']) 
    817904        { 
    818905                currObj.actionSpan.innerHTML = "<a class=\"check_spelling\" onclick=\"setCurrentObject(" + currObj.config['varName'] + "); " + currObj.config['varName'] + ".spellCheck();\"><img src=\"images/spellcheck.png\" width=\"16\" height=\"16\" title=\"Verificar Ortografia\" alt=\"Verificar Ortografia\" border=\"0\" /></a>"; 
     
    821908        { 
    822909                currObj.actionSpan.innerHTML = "<a class=\"check_spelling\" onclick=\"setCurrentObject(" + currObj.config['varName'] + "); " + currObj.config['varName'] + ".spellCheck();\">Verificar Ortografia</a>"; 
    823         } 
    824  
     910        }*/ 
     911 
     912        currObj.actionSpan.innerHTML = ""; 
    825913        currObj.statusSpan.innerHTML = ""; 
     914        currObj.controlPanelDiv.style.display = "none"; 
     915        blockSpellCheck = false; 
    826916}; // end resetAction 
    827917 
  • sandbox/expressoMail1_2/corretor_ortografico/spell_checker/spell_checker.php

    r2430 r2477  
    7575 
    7676//$pspell_link = pspell_new_config($pspell_config); 
    77 $pspell_link = pspell_new("pt_BR"); 
     77 
    7878 
    7979require_once("cpaint/cpaint2.inc.php"); //AJAX library file 
     
    9898 * 
    9999 *************************************************************/ 
    100 function showSuggestions($word, $id) 
     100function showSuggestions($word, $id, $language) 
    101101{ 
    102102        global $editablePersonalDict; //bool to set editability of personal dictionary 
    103         global $pspell_link; //the global link to the pspell module 
     103        //global $pspell_link; //the global link to the pspell module 
     104        $pspell_link = pspell_new($language); 
    104105        global $cp; //the CPAINT object 
    105106         
     
    160161 * 
    161162 *************************************************************/ 
    162 function spellCheck($string, $varName) 
    163 { 
    164         global $pspell_link; //the global link to the pspell module 
     163function spellCheck($string, $varName, $language) 
     164{ 
     165        //global $pspell_link; //the global link to the pspell module 
     166        $pspell_link = pspell_new($language); 
    165167        global $cp; //the CPAINT object 
    166168        $retVal = ""; 
     
    287289{ 
    288290        global $editablePersonalDict; 
    289         global $pspell_link; //the global link to the pspell module 
     291        //global $pspell_link; //the global link to the pspell module 
     292        $pspell_link = pspell_new("pt_BR"); 
    290293        global $cp; //the CPAINT object 
    291294        $retVal = ""; 
Note: See TracChangeset for help on using the changeset viewer.