Changeset 3128
- Timestamp:
- 08/03/10 17:00:29 (13 years ago)
- Location:
- branches/2.0/expressoMail1_2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/expressoMail1_2/inc/class.imap_functions.inc.php
r3038 r3128 732 732 $content = $this -> replace_links( $content ); 733 733 $content = str_replace( array( ' #$<$# ', ' #$>$# ' ), array( '<', '>' ), $content ); 734 $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>';734 $content = '<pre>' . $content . '</pre>'; 735 735 736 736 $return[ 'body' ] = $content; … … 784 784 if(!($file_type == "text/plain" && $msg->fsize[$msg_number][$values] > 102400)) { 785 785 $content .= htmlentities($this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values])); 786 $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>';786 $content = '<pre>' . $content . '</pre>'; 787 787 } 788 788 } … … 798 798 $content .= "<hr align='left' width='95%' style='border:1px solid #DCDCDC'>"; 799 799 $content .= $this->decodeBody(imap_fetchbody($this->mbox, $msg_number, $msg_part, FT_UID), $msg->encoding[$msg_number][$values], $msg->charset[$msg_number][$values]); 800 $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>';800 $content = '<pre>' . $content . '</pre>'; 801 801 802 802 } … … 862 862 $body = $this -> replace_links( $body ); 863 863 $body = str_replace( array( ' #$<$# ', ' #$>$# ' ), array( '<', '>' ), $body ); 864 $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>';864 $body = '<pre>' . $body . '</pre>'; 865 865 } 866 866 -
branches/2.0/expressoMail1_2/js/main.js
r2967 r3128 1331 1331 title = title.substring(0, parseInt(resize)*0.08); 1332 1332 1333 // Load default style for <PRE> tag, inside RichTextEditor. 1334 RichTextEditor.loadStyle("pre","main.css"); 1335 1333 1336 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='templates/"+template+"/images/close_button.gif'></td></tr></table>"; 1334 1337 return new_border_ID; //Preciso retornar o ID da nova mensagem. … … 2003 2006 } 2004 2007 2008 var current_path = window.location.href.substr(0,window.location.href.lastIndexOf("/")); 2009 var window_print_head = window_print.document.getElementsByTagName("head")[0]; 2010 // For IE 2011 if(typeof(window_print_head) == 'undefined'){ 2012 window_print_head = window_print.document.createElement("head"); 2013 window_print.document.appendChild(window_print_head); 2014 } 2015 var window_print_style = window_print.document.createElement("LINK"); 2016 window_print_style.href = current_path+'/templates/default/main.css'; 2017 window_print_style.type = "text/css"; 2018 window_print_style.rel = "stylesheet"; 2019 window_print_head.appendChild(window_print_style); 2020 2005 2021 while (1){ 2006 2022 try{ 2007 var html = '<br><br>'; 2008 //html += "<input type='button' value='Imprimir' onclick='javascript:window.print();'>"; 2023 var html ='<body>'; 2009 2024 html += "<h4>ExpressoLivre - ExpressoMail</h4><hr>"; 2010 2025 html += '<table><tbody>'; … … 2027 2042 html += "<tr><td width=7%><font size='2'>" + get_lang('Subject')+ ": </font></td><td><font size='2'>"+subject.innerHTML+"</font></td></tr>"; 2028 2043 html += "</tbody></table><hr>"; 2029 window_print.document.body.innerHTML = html + '<blockquote><font size="2">' + body.innerHTML + '</font></blockquote>';2044 window_print.document.body.innerHTML = html + body.innerHTML; 2030 2045 if(!is_ie){ 2031 2046 var tab_tags = window_print.document.getElementsByTagName("IMG"); -
branches/2.0/expressoMail1_2/js/rich_text_editor.js
r1296 r3128 64 64 parentDiv.appendChild(checkbox); 65 65 parentDiv.appendChild(text); 66 } 67 68 cRichTextEditor.prototype.loadStyle = function(tag, css_file) { 69 var theRules = new Array(); 70 var stylePRE = ""; 71 for(var s = 0; s < document.styleSheets.length; s++) { 72 if(document.styleSheets[s].href != null && 73 document.styleSheets[s].href.match("templates/"+template+"/"+css_file)){ 74 if (document.styleSheets[s].cssRules) 75 theRules = document.styleSheets[s].cssRules; 76 else if (document.styleSheets[s].rules) 77 theRules = document.styleSheets[s].rules; 78 break; 79 } 80 } 81 for(var s = 0;s < theRules.length; s++){ 82 if(theRules[s].selectorText.toLowerCase() == tag.toLowerCase()){ 83 stylePRE = theRules[s].style; 84 break; 85 } 86 } 87 var _body = Element(this.editor); 88 var i_doc = (document.all) ? _body.contentWindow.document: _body.contentDocument; 89 var hh1 = i_doc.getElementsByTagName('head')[0]; 90 // For IE 91 if(typeof(hh1) == 'undefined'){ 92 hh1 = i_doc.createElement("head"); 93 i_doc.appendChild(hh1); 94 } 95 var ss1 = i_doc.createElement('style'); 96 ss1.setAttribute("type", "text/css"); 97 var def = tag.toLowerCase()+' {'+stylePRE.cssText+'}'; 98 if (ss1.styleSheet) { 99 ss1.styleSheet.cssText = def; 100 } else { 101 var tt1 = i_doc.createTextNode(def); 102 ss1.appendChild(tt1); 103 } 104 hh1.appendChild(ss1); 66 105 } 67 106 -
branches/2.0/expressoMail1_2/templates/default/main.css
r2957 r3128 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.