Changeset 3131
- Timestamp:
- 08/04/10 10:53:48 (14 years ago)
- Location:
- trunk/expressoMail1_2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoMail1_2/inc/class.imap_functions.inc.php
r3111 r3131 837 837 $content = $this -> replace_links( $content ); 838 838 $content = str_replace( array( ' #$<$# ', ' #$>$# ' ), array( '<', '>' ), $content ); 839 $content = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;white-space:-moz-pre-wrap;font-family: monospace;font-size:12px">' . $content . '</pre>';839 $content = '<pre>' . $content . '</pre>'; 840 840 841 841 $return[ 'body' ] = $content; … … 889 889 if(!($file_type == "text/plain" && $msg->fsize[$msg_number][$values] > 102400)) { 890 890 $content .= htmlentities($this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values])); 891 $content = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;white-space:-moz-pre-wrap;font-family: monospace;font-size:12px">' . $content . '</pre>';891 $content = '<pre>' . $content . '</pre>'; 892 892 } 893 893 } … … 903 903 $content .= "<hr align='left' width='95%' style='border:1px solid #DCDCDC'>"; 904 904 $content .= $this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values]); 905 $content = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;white-space:-moz-pre-wrap;font-family: monospace;font-size:12px">' . $content . '</pre>';905 $content = '<pre>' . $content . '</pre>'; 906 906 907 907 } … … 967 967 $body = $this -> replace_links( $body ); 968 968 $body = str_replace( array( ' #$<$# ', ' #$>$# ' ), array( '<', '>' ), $body ); 969 $body = '<pre style="white-space:pre;word-wrap: break-word;white-space:pre-wrap;white-space:-moz-pre-wrap;font-family: monospace;font-size:12px">' . $body . '</pre>';969 $body = '<pre>' . $body . '</pre>'; 970 970 } 971 971 -
trunk/expressoMail1_2/js/base/main.js
r3117 r3131 1422 1422 title = title.substring(0, parseInt(resize)*0.08); 1423 1423 1424 // Load default style for <PRE> tag, inside RichTextEditor. 1425 RichTextEditor.loadStyle("pre","main.css"); 1424 1426 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>"; 1425 1427 expresso.connector.loadScript('wfolders'); … … 2159 2161 show_attachs = ""; 2160 2162 } 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); 2161 2175 2162 2176 while (1){ 2163 2177 try{ 2164 var html = '<br><br>'; 2165 //html += "<input type='button' value='Imprimir' onclick='javascript:window.print();'>"; 2178 var html ='<body>'; 2166 2179 html += "<h4>ExpressoLivre - ExpressoMail</h4><hr>"; 2167 2180 html += '<table><tbody>'; … … 2185 2198 html += show_attachs; //to show the names of the attachments 2186 2199 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; 2188 2201 if(!is_ie){ 2189 2202 var tab_tags = window_print.document.getElementsByTagName("IMG"); -
trunk/expressoMail1_2/js/jscode/rich_text_editor.js
r2630 r3131 37 37 document.getElementById('fontsize').selectedIndex = 0; 38 38 }; 39 40 cRichTextEditor.prototype.loadStyle = function(tag, css_file) { 41 var theRules = new Array(); 42 var stylePRE = ""; 43 for(var s = 0; s < document.styleSheets.length; s++) { 44 if(document.styleSheets[s].href != null && 45 document.styleSheets[s].href.match("templates/"+template+"/"+css_file)){ 46 if (document.styleSheets[s].cssRules) 47 theRules = document.styleSheets[s].cssRules; 48 else if (document.styleSheets[s].rules) 49 theRules = document.styleSheets[s].rules; 50 break; 51 } 52 } 53 for(var s = 0;s < theRules.length; s++){ 54 if(theRules[s].selectorText.toLowerCase() == tag.toLowerCase()){ 55 stylePRE = theRules[s].style; 56 break; 57 } 58 } 59 var _body = Element(this.editor); 60 var i_doc = (document.all) ? _body.contentWindow.document: _body.contentDocument; 61 var hh1 = i_doc.getElementsByTagName('head')[0]; 62 // For IE 63 if(typeof(hh1) == 'undefined'){ 64 hh1 = i_doc.createElement("head"); 65 i_doc.appendChild(hh1); 66 } 67 var ss1 = i_doc.createElement('style'); 68 ss1.setAttribute("type", "text/css"); 69 var def = tag.toLowerCase()+' {'+stylePRE.cssText+'}'; 70 if (ss1.styleSheet) { 71 ss1.styleSheet.cssText = def; 72 } else { 73 var tt1 = i_doc.createTextNode(def); 74 ss1.appendChild(tt1); 75 } 76 hh1.appendChild(ss1); 77 } 39 78 40 79 cRichTextEditor.prototype.createElementEditor = function(pObj) -
trunk/expressoMail1_2/templates/default/main.css
r2989 r3131 1 pre{ 2 white-space: pre-wrap !important; /* css-3 */ 3 white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ 4 white-space: -pre-wrap !important; /* Opera 4-6 */ 5 white-space: -o-pre-wrap !important; /* Opera 7 */ 6 word-wrap: break-word !important; /* Internet Explorer 5.5+ */ 7 font-family: monospace !important; 8 font-size: 12px !important; 9 } 10 1 11 * { 2 12 font-family: Verdana, Arial, Helvetica, sans-serif;
Note: See TracChangeset
for help on using the changeset viewer.