Changeset 5459 for trunk/expressoMail1_2/js
- Timestamp:
- 02/01/12 13:20:05 (12 years ago)
- Location:
- trunk/expressoMail1_2/js
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/abas.js
r5439 r5459 285 285 div.style.overflow = "hidden"; 286 286 287 Element("exmail_main_body").insertBefore(div,Element("footer_menu")); 287 Element("exmail_main_body").insertBefore(div,Element("footer_menu")); 288 288 alternate_border(ID); 289 289 return ID; … … 436 436 openTab.imapUid[ID] = 0; 437 437 438 if (preferences.auto_save_draft == 1) 439 { 440 if (openTab.autosave_timer[ID]) 441 clearTimeout(openTab.autosave_timer[ID]); 442 openTab.autosave_timer[ID] = false; 443 } 444 438 // Limpa o autosave 439 if (preferences.auto_save_draft == 1 && autoSaveControl.timer[ID] !== null ) 440 { 441 autoSaveControl.status[ID] = null; 442 clearInterval(autoSaveControl.timer[ID]); 443 } 444 //////////////////////////////// 445 445 446 hold_session = false; 446 447 if (exist_className(Element('border_id_'+ID),'menu-sel')) -
trunk/expressoMail1_2/js/common_functions.js
r5458 r5459 367 367 inputFile.onchange = function () { 368 368 validateFileExtension(this.value, this.id.replace('input','div'), this.getAttribute('id_border')); 369 openTab.autosave_timer[id_border] = setTimeout("save_msg("+id_border+")", autosave_time);370 369 }; 371 372 inputFile.onfocus = function () {373 if (openTab.autosave_timer[id_border])374 clearTimeout(openTab.autosave_timer[id_border]);375 };376 370 377 371 divFile.appendChild(inputFile); -
trunk/expressoMail1_2/js/draw_api.js
r5456 r5459 6 6 'imapBox' : [], // Stores the folder name 7 7 'toPreserve' : [], // Check if the message should be removed from draft after send 8 'autosave_timer' : [], // The timeout timer for autosave function9 8 'condition' : [] // Will store the search condition if the tab is the result of a search 10 9 }; 10 11 var autoSaveControl = { 12 'timer' : [], // The timeout timer for autosave function 13 'status' : [] // The status autosave 14 }; 15 11 16 var tabTypes = { 12 17 'new':4, … … 17 22 'reply_to_all_without_history':10, 18 23 'edit':5 19 } 24 }; 20 25 21 26 var currentTab,numBox = 0; // Open Tab and num of mailboxes opened at context -
trunk/expressoMail1_2/js/main.js
r5453 r5459 3 3 // tempo do auto save (em milisegundos) 4 4 // 20000 = 20 segundos 5 var autosave_time = 20000;5 var autosave_time = 40000; 6 6 7 7 var results_search_messages = ""; … … 2039 2039 function send_message(ID, folder, folder_name){ 2040 2040 2041 //limpa autosave_timer[ID]; havia conflito quando uma mensagem ia ser enviada e nesse exato momento o autosave2042 //entrava em execucao (a aba de edicao da mensagem continuava aberta e a mensagem exibida era a de que a mensagem foi2043 //salva na pasta Rascunhos e nao que tinha sido enviada, como deveria);2044 2041 if (preferences.auto_save_draft == 1) 2045 { 2046 if (openTab.autosave_timer[ID]) 2047 { 2048 clearTimeout(openTab.autosave_timer[ID]); 2049 } 2050 } 2051 2042 autoSaveControl.status[ID] = true; 2052 2043 2053 2044 var save_link = Element("save_message_options_"+ID); … … 2393 2384 } 2394 2385 2386 function autoSave( ID ) 2387 { 2388 if(autoSaveControl.status[ID] === false) 2389 save_msg(ID); 2390 } 2391 2395 2392 function save_msg(border_id,withImage, out){ 2393 2394 //seta o status do auto_save = true 2395 if (preferences.auto_save_draft == 1) 2396 autoSaveControl.status[border_id] = true; 2397 /////////////////////////////////////////// 2398 2396 2399 if (typeof(withImage) == 'undefined') 2397 2400 withImage = false; … … 2451 2454 mail_as_plain = ( mail_as_plain ) ? mail_as_plain.checked : false; 2452 2455 2453 2456 var content_body = RichTextEditor.getData("body_"+border_id); 2454 2457 //Remove imagens do corpo que estao com o checkbox desmarcados 2455 2458 var files_checkbox = $("#divFiles_"+border_id+" input:checkbox"); -
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.