Changeset 5459 for trunk/expressoMail1_2/js/rich_text_editor.js
- Timestamp:
- 02/01/12 13:20:05 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/rich_text_editor.js
r5417 r5459 146 146 147 147 cRichTextEditor.prototype.createImage = function(){ 148 if (preferences.auto_save_draft == 1)149 {150 autosave_time = 200000;151 clearTimeout(openTab.autosave_timer[currentTab]);152 }153 148 154 149 var form = document.getElementById("attachment_window"); … … 264 259 265 260 cRichTextEditor.prototype.execPosInstance = function(inst) { 261 if(RichTextEditor.editorReady === false) 262 { 266 263 var editor = CKEDITOR.instances[inst]; 267 264 var id = inst.replace('body_',''); … … 274 271 }); 275 272 276 //Adicionando atalhos de preferencias277 //TODO: Não esta pegando o numero (keycode)278 // if (preferences.use_shortcuts == '1')279 // {280 // CKEDITOR.instances[inst].document.on('keyup', function(event){281 // if(event.keyCode == 27){282 // delete_border(id,'false');} //Tecla delete fechar aba283 // });284 // }285 273 286 274 // IM Module Enabled … … 291 279 }); 292 280 } 293 281 294 282 if (preferences.auto_save_draft == 1) 295 283 { 296 openTab.autosave_timer[id] = false; 297 var save_link = document.getElementById("save_message_options"+id); 298 CKEDITOR.instances[inst].document.on('keydown', function(event){ 299 if (openTab.autosave_timer[id]) 300 clearTimeout(openTab.autosave_timer[id]); 301 openTab.autosave_timer[id] = setTimeout("save_msg("+id+")", autosave_time); 302 303 }); 304 } 305 306 /*var rich_button = document.createElement("a"); 307 //rich_button.className = "button small"; 308 rich_button.name = "textplain_rt_checkbox_"+id; 309 rich_button.innerHTML = get_lang('Simple text mode')+" >>"; 310 rich_button.href = "#"; 311 rich_button.onclick = function (){ 312 var check = $("#"+$(this).attr("name")).attr("checked"); 313 $("#"+$(this).attr("name")).attr("checked", (!check ? true : false)); 314 $("#"+$(this).attr("name")).trigger('click'); 315 //RichTextEditor.setPlain($("#"+$(this).attr("name")).attr("checked"), id); 316 }; 317 if($("#cke_top_body_"+id).find(".cke_toolbar:last")) 318 $("#cke_top_body_"+id).find(".cke_toolbar:last").append("<span class='button small'></span>"); 319 $("#cke_top_body_"+id).find("span:last").append(rich_button); 320 $("#cke_top_body_"+id).attr("colSpan", "2"); 321 $("#cke_contents_body_"+id).attr("colSpan", "2"); 322 $("#cke_bottom_body_"+id).attr("colSpan", "2");*/ 284 autoSaveControl.status[id] = true; 285 autoSaveControl.timer[id] = window.setInterval( "autoSave("+id+")" ,autosave_time); 286 287 CKEDITOR.instances[inst].document.on('keydown', function(event){ 288 autoSaveControl.status[id] = false; 289 }) 290 } 291 323 292 $(".cke_editor").css("white-space", "normal"); 324 325 RichTextEditor.editorReady = true; 326 } 293 RichTextEditor.editorReady = true; 294 } 295 } 296 327 297 cRichTextEditor.prototype.setPlain = function (active,id){ 328 298 RichTextEditor.plain[id] = active;
Note: See TracChangeset
for help on using the changeset viewer.