Ignore:
Timestamp:
05/06/11 17:01:31 (13 years ago)
Author:
rafaelraymundo
Message:

Ticket #1726 - Corrige local do opcao do envio de e-mail em texto puro. r4218

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.0.1/expressoMail1_2/js/main.js

    r4252 r4258  
    16591659        textArea.name = "body"; 
    16601660        body = document.getElementById("body_"+ID); 
    1661         textArea.value += ( ( mail_as_plain ) ? body.previousSibling.value : ( '<body>\r\n' + body.contentWindow.document.body.innerHTML + '\r\n</body>' ) ); 
     1661        textArea.value = ( ( mail_as_plain ) ? body.previousSibling.value : ( '<body>\r\n' + body.contentWindow.document.body.innerHTML + '\r\n</body>' ) ); 
    16621662        var input_folder = document.createElement("INPUT"); 
    16631663        input_folder.style.display='none'; 
     
    19031903                withImage = false; 
    19041904 
    1905         var rt_checkbox = Element('viewsource_rt_checkbox_' + ID); 
     1905        var rt_checkbox = Element('viewsource_rt_checkbox_' + border_id); 
    19061906        if (rt_checkbox == null) 
    19071907                return false; 
     
    19301930        var handler_save_msg = function(data){ return_save(data,this.tmp_border_id,this.tmp_folder_name,this.tmp_folder_id,this.message_id); } 
    19311931 
     1932        var mail_as_plain = document.getElementById( 'textplain_rt_checkbox_' + border_id ); 
     1933        mail_as_plain = ( mail_as_plain ) ? mail_as_plain.checked : false; 
     1934 
    19321935        var textArea = document.createElement("TEXTAREA"); 
    19331936        textArea.style.display='none'; 
     
    19361939        if (! body) 
    19371940                return; 
    1938         textArea.value += '<body>\r\n'; 
    1939         textArea.value += body.contentWindow.document.body.innerHTML; 
    1940         textArea.value += '\r\n</body>'; 
     1941        textArea.value = ( ( mail_as_plain ) ? body.previousSibling.value : ( '<body>\r\n' + body.contentWindow.document.body.innerHTML + '\r\n</body>' ) ); 
    19411942        var input_folder = document.createElement("INPUT"); 
    19421943        input_folder.style.display='none'; 
     
    19641965        form.appendChild(input_msgid); 
    19651966        form.appendChild(input_insertImg); 
     1967 
     1968        var mail_type = form.appendChild( document.createElement( 'input' ) ); 
     1969        mail_type.name = 'type'; 
     1970        mail_type.type = 'hidden'; 
     1971        mail_type.value = ( mail_as_plain ) ? 'plain' : 'html'; 
    19661972 
    19671973        cExecuteForm ("$this.imap_functions.save_msg", form, handler_save_msg,border_id); 
Note: See TracChangeset for help on using the changeset viewer.