Ignore:
Timestamp:
08/04/10 10:53:48 (14 years ago)
Author:
niltonneto
Message:

Ticket #1111 - Corrigido problema ao editar/imprimir mensagens com tags <pre>.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/js/base/main.js

    r3117 r3131  
    14221422                title = title.substring(0, parseInt(resize)*0.08); 
    14231423 
     1424        // Load default style for <PRE> tag, inside RichTextEditor. 
     1425        RichTextEditor.loadStyle("pre","main.css");      
    14241426        Element("border_id_" + new_border_ID).innerHTML = "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td id=font_border_id_" + new_border_ID +" class='font-menu' width=*>" +title + "</td><td width=1px><img onmousedown='javascript:return false' style='cursor:pointer' onclick=delete_border('" + new_border_ID + "','false') src='"+URL_SERVER+"expressoMail1_2/templates/"+template+"/images/close_button.png'></td></tr></table>"; 
    14251427        expresso.connector.loadScript('wfolders'); 
     
    21592161                show_attachs = ""; 
    21602162        } 
     2163        var current_path = window.location.href.substr(0,window.location.href.lastIndexOf("/")); 
     2164        var window_print_head  = window_print.document.getElementsByTagName("head")[0]; 
     2165        // For IE 
     2166        if(typeof(window_print_head) == 'undefined'){ 
     2167                window_print_head = window_print.document.createElement("head"); 
     2168                window_print.document.appendChild(window_print_head); 
     2169        } 
     2170        var window_print_style = window_print.document.createElement("LINK"); 
     2171        window_print_style.href = current_path+'/templates/default/main.css'; 
     2172        window_print_style.type = "text/css"; 
     2173        window_print_style.rel = "stylesheet"; 
     2174        window_print_head.appendChild(window_print_style); 
    21612175         
    21622176        while (1){ 
    21632177                try{ 
    2164                         var html = '<br><br>'; 
    2165                         //html += "<input type='button' value='Imprimir' onclick='javascript:window.print();'>"; 
     2178                        var html ='<body>'; 
    21662179                        html += "<h4>ExpressoLivre - ExpressoMail</h4><hr>"; 
    21672180                        html += '<table><tbody>'; 
     
    21852198                        html += show_attachs; //to show the names of the attachments 
    21862199                        html += "</tbody></table><hr>"; 
    2187                         window_print.document.body.innerHTML = html + '<blockquote><font size="2">' + body.innerHTML + '</font></blockquote>'; 
     2200                        window_print.document.body.innerHTML = html + body.innerHTML; 
    21882201                        if(!is_ie){ 
    21892202                                var tab_tags = window_print.document.getElementsByTagName("IMG");                        
Note: See TracChangeset for help on using the changeset viewer.