Changeset 7520
- Timestamp:
- 11/14/12 15:35:36 (11 years ago)
- Location:
- trunk/expressoMail1_2/js
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/js/abas.js
r7414 r7520 452 452 delete(openTab.type[ID]); 453 453 close_delete(ID, msg_sent); 454 454 455 } 455 456 else if(clicked == 'Salvar e fechar' || clicked == 'Salvar estado atual fechar') … … 457 458 save_msg(ID); 458 459 openTab.toPreserve[ID] = false; 460 459 461 close_delete(ID, msg_sent); 460 462 delete(openTab.type[ID]); … … 507 509 function delete_border(ID, msg_sent) 508 510 { 509 510 if($("#border_id_"+ID).attr("title") == get_lang("New Message")){511 512 /*if($("#border_id_"+ID).attr("title") == get_lang("New Message")){ 511 513 var to = $("#content_id_"+ID).find(".to").parent(".email-area").find("div").length || $("#content_id_"+ID).find(".email-area").find(".to").val(); 512 514 var cc = $("#content_id_"+ID).find(".cc").parent(".email-area").find("div").length || $("#content_id_"+ID).find(".email-area").find(".cc").val(); … … 528 530 } 529 531 } 530 var bolExecuteClose = true; 532 */ 533 if($("#content_id_"+currentTab+" textarea[name=input_to]").length ){ 534 if($("#content_id_"+currentTab+" .save").is(':disabled') ) { 535 close_delete(ID, msg_sent); 536 } else if( $("#content_id_"+currentTab+" .save").is(':enabled') ) { 537 return(draftTests(ID, msg_sent)); 538 } 539 } else { 540 close_delete(ID, msg_sent); 541 } 542 543 /*var bolExecuteClose = true; 531 544 var borderElem = Element("border_id_" + ID); 532 545 if (borderElem){ … … 543 556 } 544 557 } 558 559 545 560 if (bolExecuteClose) 546 561 { … … 548 563 } 549 564 delete(openTab.type[ID]); 565 return true;*/ 566 delete(openTab.type[ID]); 550 567 return true; 551 568 } -
trunk/expressoMail1_2/js/main.js
r7514 r7520 463 463 function watch_changes_in_msg(border_id) 464 464 { 465 console.log("oi"); 465 466 if (document.getElementById('border_id_'+border_id)) 466 467 { … … 2246 2247 var content = $("#content_id_"+new_border_ID); 2247 2248 2249 //It is verifying if the message was modified or not. 2250 var btnSaveVerify = function(){ 2251 $("#content_id_"+currentTab+" .save").button("disable") 2252 2253 2254 $("#content_id_"+currentTab+" .to").keydown(function() { 2255 $("#content_id_"+currentTab+" .save").button("enable"); 2256 } ); 2257 $("#content_id_"+currentTab+" input[name=input_subject]").keydown(function() { 2258 $("#content_id_"+currentTab+" .save").button("enable"); 2259 } ); 2260 2261 RichTextEditor.keydown(new_border_ID); 2262 } 2263 2248 2264 switch(type){ 2249 2265 case "reply_without_history": 2266 btnSaveVerify(); 2267 2250 2268 RichTextEditor.replyController = true; //Seta o editor como modo reply 2251 2269 content.find('[name="input_to"]').val(data.to); … … 2264 2282 break; 2265 2283 case "reply_with_history": 2284 btnSaveVerify(); 2285 2266 2286 RichTextEditor.replyController = true; //Seta o editor como modo reply 2267 2287 title = "Re: " + html_entities(data.subject); … … 2283 2303 break; 2284 2304 case "reply_to_all_without_history": 2305 btnSaveVerify(); 2306 2285 2307 RichTextEditor.replyController = true; //Seta o editor como modo reply 2286 2308 // delete user email from to_all array. … … 2329 2351 break; 2330 2352 case "reply_to_all_with_history": 2353 btnSaveVerify(); 2354 2331 2355 RichTextEditor.replyController = true; //Seta o editor como modo reply 2332 2356 //delete user email from to_all array. … … 2383 2407 break; 2384 2408 case "forward": 2409 btnSaveVerify(); 2410 2385 2411 title = "Fw: " + html_entities(data.subject); 2386 2412 content.find(".subject").val("Fw: " + data.subject); … … 2406 2432 break; 2407 2433 case "new": 2434 2435 btnSaveVerify(); 2436 2408 2437 title = get_lang("New Message"); 2409 2438 if(Element('msg_number').value) { … … 2435 2464 break; 2436 2465 case "edit": 2437 2466 btnSaveVerify(); 2467 2438 2468 if(flagged == 'F') 2439 2469 $(".important").addClass("expressomail-button-icon-ative"); … … 3359 3389 function autoSave( ID ) 3360 3390 { 3391 $(".save").addClass("clicked"); 3392 3361 3393 saveButtonDisabled = $("#content_id_"+ID).find(".save").button('option','disabled'); 3362 3394 if(autoSaveControl.status[ID] === false && !saveButtonDisabled) … … 3366 3398 function save_msg(border_id){ 3367 3399 3400 if(!$("content_id_"+border_id+" .save").hasClass("clicked")){ 3401 $("content_id_"+border_id+" .save").addClass("clicked"); 3402 } 3403 3404 3368 3405 //seta o status do auto_save = true 3369 3406 if (preferences.auto_save_draft == 1) -
trunk/expressoMail1_2/js/rich_text_editor.js
r6699 r7520 176 176 save_link.unbind("click").click(function(){ 177 177 openTab.toPreserve[id] = true;save_msg(id); 178 $(".save").addClass("clicked"); 178 179 }); 179 180 save_link.button({ disabled: false }); … … 363 364 element.setAttribute('contentEditable','true'); 364 365 } 366 cRichTextEditor.prototype.keydown = function (id,rec){ 367 if (rec === undefined) rec = 1; 368 rec++; 369 if( CKEDITOR.instances['body_'+ id] === undefined ) return; 370 var element = CKEDITOR.instances['body_'+ id]; 371 372 if(element.document){ 373 element.document.on('keydown',function(){ 374 $("#content_id_"+currentTab+" .save").button("enable"); 375 }); 376 } else { 377 if (rec <= 20) 378 setTimeout(function(){RichTextEditor.keydown(id,rec)},500); 379 } 380 } 365 381 //Build the Object 366 382 RichTextEditor = new cRichTextEditor();
Note: See TracChangeset
for help on using the changeset viewer.