Ignore:
Timestamp:
05/04/11 18:49:21 (13 years ago)
Author:
rodsouza
Message:

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

File:
1 edited

Legend:

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

    r4202 r4218  
    16691669        textArea.name = "body"; 
    16701670        body = document.getElementById("body_"+ID); 
    1671         textArea.value += ( ( mail_as_plain ) ? body.previousSibling.value : ( '<body>\r\n' + body.contentWindow.document.body.innerHTML + '\r\n</body>' ) ); 
     1671        textArea.value = ( ( mail_as_plain ) ? body.previousSibling.value : ( '<body>\r\n' + body.contentWindow.document.body.innerHTML + '\r\n</body>' ) ); 
    16721672        var input_folder = document.createElement("INPUT"); 
    16731673        input_folder.style.display='none'; 
     
    19131913                withImage = false; 
    19141914 
    1915         var rt_checkbox = Element('viewsource_rt_checkbox_' + ID); 
     1915        var rt_checkbox = Element('viewsource_rt_checkbox_' + border_id); 
    19161916        if (rt_checkbox == null) 
    19171917                return false; 
     
    19401940        var handler_save_msg = function(data){ return_save(data,this.tmp_border_id,this.tmp_folder_name,this.tmp_folder_id,this.message_id); } 
    19411941 
     1942        var mail_as_plain = document.getElementById( 'textplain_rt_checkbox_' + border_id ); 
     1943        mail_as_plain = ( mail_as_plain ) ? mail_as_plain.checked : false; 
     1944 
    19421945        var textArea = document.createElement("TEXTAREA"); 
    19431946        textArea.style.display='none'; 
     
    19461949        if (! body) 
    19471950                return; 
    1948         textArea.value += '<body>\r\n'; 
    1949         textArea.value += body.contentWindow.document.body.innerHTML; 
    1950         textArea.value += '\r\n</body>'; 
     1951        textArea.value = ( ( mail_as_plain ) ? body.previousSibling.value : ( '<body>\r\n' + body.contentWindow.document.body.innerHTML + '\r\n</body>' ) ); 
    19511952        var input_folder = document.createElement("INPUT"); 
    19521953        input_folder.style.display='none'; 
     
    19741975        form.appendChild(input_msgid); 
    19751976        form.appendChild(input_insertImg); 
     1977 
     1978        var mail_type = form.appendChild( document.createElement( 'input' ) ); 
     1979        mail_type.name = 'type'; 
     1980        mail_type.type = 'hidden'; 
     1981        mail_type.value = ( mail_as_plain ) ? 'plain' : 'html'; 
    19761982 
    19771983        cExecuteForm ("$this.imap_functions.save_msg", form, handler_save_msg,border_id); 
Note: See TracChangeset for help on using the changeset viewer.