Changeset 2477 for sandbox/expressoMail1_2/corretor_ortografico/js
- Timestamp:
- 04/12/10 10:27:29 (14 years ago)
- Location:
- sandbox/expressoMail1_2/corretor_ortografico/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/expressoMail1_2/corretor_ortografico/js/main.js
r2431 r2477 1250 1250 1251 1251 var body = document.getElementById("body_" + new_border_ID); 1252 beginSpellCheck(parentDiv.id, "body_" + new_border_ID, new_border_ID);1252 // beginSpellCheck(); 1253 1253 body.contentWindow.document.open(); 1254 1254 // Insert the signature automaticaly at message body if use_signature preference is set … … 1386 1386 1387 1387 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 1388 1391 return new_border_ID; //Preciso retornar o ID da nova mensagem. 1389 1392 } -
sandbox/expressoMail1_2/corretor_ortografico/js/rich_text_editor.js
r2005 r2477 56 56 57 57 var checkbox = document.createElement("INPUT"); 58 checkbox.id = 'viewsource_rt_checkbox ';58 checkbox.id = 'viewsource_rt_checkbox_' + currentTab; 59 59 checkbox.type = "checkbox"; 60 60 checkbox.setAttribute("tabIndex","-1"); … … 169 169 } 170 170 div_button_rt.appendChild(selectBox); 171 171 172 172 173 var buttons = ['bold', 'italic', 'underline', 'forecolor', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', … … 198 199 } 199 200 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 200 236 td.appendChild(div_button_rt); 201 237 tr.appendChild(td); … … 206 242 cRichTextEditor.prototype.editorCommand = function(command, option) { 207 243 try { 208 244 var mainField = document.getElementById(this.editor).contentWindow; 209 245 mainField.focus(); 210 246 var signature = preferences.type_signature == 'html' ? preferences.signature : preferences.signature.replace(/\n/g, "<br>"); … … 240 276 else if (command == 'Image') 241 277 mainField.document.execCommand('InsertImage', false, option); 278 else if (command == 'spellCheck'){ 279 beginSpellCheck(); // configure 280 spellCheck(); // run spellChecker 281 } 242 282 else 243 283 mainField.document.execCommand(command, false, option);
Note: See TracChangeset
for help on using the changeset viewer.