Changeset dd792e8 in github
- Timestamp:
- Dec 3, 2006 5:32:16 PM (6 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 056515e
- Parents:
- 733c78f
- Files:
-
- 5 edited
-
CHANGELOG (modified) (1 diff)
-
program/js/app.js (modified) (2 diffs)
-
program/lib/html2text.inc (modified) (5 diffs)
-
program/steps/mail/compose.inc (modified) (2 diffs)
-
program/steps/settings/edit_identity.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r733c78f rdd792e8 1 1 CHANGELOG RoundCube Webmail 2 2 --------------------------- 3 4 2006/12/03 (estadtherr) 5 ---------- 6 - Added fix to convert HTML signatures for plain text messages 7 - Fixed signature delimeter character to be standard (Bug #1484035) 8 3 9 4 10 2006/12/01 (thomasb) -
program/js/app.js
rb190970 rdd792e8 1715 1715 { 1716 1716 sig = this.env.signatures[this.env.identity]['text']; 1717 if (sig.indexOf('-- ')!=0)1718 sig = '-- \n'+sig;1719 1717 if (sig.indexOf('-- ')!=0) 1718 sig = '-- \n'+sig; 1719 1720 1720 p = message.lastIndexOf(sig); 1721 1721 if (p>=0) 1722 1722 message = message.substring(0, p-1) + message.substring(p+sig.length, message.length); 1723 1723 } 1724 1724 1725 1725 // add the new signature string 1726 1726 if (this.env.signatures && this.env.signatures[id]) 1727 1727 { 1728 1728 sig = this.env.signatures[id]['text']; 1729 if (sig.indexOf('--')!=0) 1730 sig = '--\n'+sig; 1729 if (this.env.signatures[id]['is_html']) 1730 { 1731 sig = this.env.signatures[id]['plain_text']; 1732 } 1733 if (sig.indexOf('-- ')!=0) 1734 sig = '-- \n'+sig; 1731 1735 message += '\n'+sig; 1732 1736 } … … 1734 1738 else 1735 1739 { 1736 var eid = tinyMCE.getEditorId('_message'); 1737 // editor is a TinyMCE_Control object 1738 var editor = tinyMCE.getInstanceById(eid); 1739 var msgDoc = editor.getDoc(); 1740 var msgBody = msgDoc.body; 1741 1742 if (this.env.signatures && this.env.signatures[id]) 1740 var eid = tinyMCE.getEditorId('_message'); 1741 // editor is a TinyMCE_Control object 1742 var editor = tinyMCE.getInstanceById(eid); 1743 var msgDoc = editor.getDoc(); 1744 var msgBody = msgDoc.body; 1745 1746 if (this.env.signatures && this.env.signatures[id]) 1747 { 1748 // Append the signature as a span within the body 1749 var sigElem = msgDoc.getElementById("_rc_sig"); 1750 if (!sigElem) 1743 1751 { 1744 // Append the signature as a span within the body 1745 var sigElem = msgDoc.getElementById("_rc_sig"); 1746 if (!sigElem) 1747 { 1748 sigElem = msgDoc.createElement("span"); 1749 sigElem.setAttribute("id", "_rc_sig"); 1750 msgBody.appendChild(sigElem); 1751 } 1752 if (this.env.signatures[id]['is_html']) 1753 { 1754 sigElem.innerHTML = this.env.signatures[id]['text']; 1755 } 1756 else 1757 { 1758 sigElem.innerHTML = '<pre>' + this.env.signatures[id]['text'] + '</pre>'; 1759 } 1752 sigElem = msgDoc.createElement("span"); 1753 sigElem.setAttribute("id", "_rc_sig"); 1754 msgBody.appendChild(sigElem); 1760 1755 } 1756 if (this.env.signatures[id]['is_html']) 1757 { 1758 sigElem.innerHTML = this.env.signatures[id]['text']; 1759 } 1760 else 1761 { 1762 sigElem.innerHTML = '<pre>' + this.env.signatures[id]['text'] + '</pre>'; 1763 } 1764 } 1761 1765 } 1762 1766 -
program/lib/html2text.inc
r40ed9be rdd792e8 165 165 "strtoupper(\"\n\n\\1\n\n\")", // H1 - H3 166 166 "ucwords(\"\n\n\\1\n\n\")", // H4 - H6 167 "\n \n\t",// <P>167 "\n", // <P> 168 168 "\n", // <br> 169 169 'strtoupper("\\1")', // <b> … … 233 233 */ 234 234 var $_link_list = array(); 235 236 /** 237 * Boolean flag, true if a table of link URLs should be listed after the text. 238 * 239 * @var boolean $_do_links 240 * @access private 241 * @see html2text() 242 */ 243 var $_do_links = true; 235 244 236 245 /** … … 243 252 * @param string $source HTML content 244 253 * @param boolean $from_file Indicates $source is a file to pull content from 245 * @access public 246 * @return void 247 */ 248 function html2text( $source = '', $from_file = false ) 254 * @param boolean $do_link_table indicate whether a table of link URLs is desired 255 * @access public 256 * @return void 257 */ 258 function html2text( $source = '', $from_file = false, $do_link_table = true ) 249 259 { 250 260 if ( !empty($source) ) { … … 252 262 } 253 263 $this->set_base_url(); 264 $this->_do_links = $produce_link_table; 254 265 } 255 266 … … 410 421 function _build_link_list($link, $display) 411 422 { 423 if (! $this->_do_links) return $display; 424 412 425 $link_lc = strtolower($link); 413 426 -
program/steps/mail/compose.inc
r03ac213 rdd792e8 21 21 22 22 require_once('Mail/mimeDecode.php'); 23 require_once('lib/html2text.inc'); 23 24 24 25 // define constants for message compose mode … … 297 298 $a_signatures[$identity_id]['text'] = $sql_arr['signature']; 298 299 $a_signatures[$identity_id]['is_html'] = ($sql_arr['html_signature'] == 1) ? true : false; 300 if ($a_signatures[$identity_id]['is_html']) 301 { 302 $h2t = new html2text($a_signatures[$identity_id]['text'], false, false); 303 $plainTextPart = $h2t->get_text(); 304 $a_signatures[$identity_id]['plain_text'] = trim($plainTextPart); 305 } 299 306 } 300 307 -
program/steps/settings/edit_identity.inc
r740e9ec rdd792e8 57 57 "theme_advanced_toolbar_align : 'left'," . 58 58 "theme_advanced_buttons1 : 'bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,separator,outdent,indent,charmap,hr'," . 59 "theme_advanced_buttons2 : 'link,unlink, forecolor,fontselect,fontsizeselect'," .59 "theme_advanced_buttons2 : 'link,unlink,code,forecolor,fontselect,fontsizeselect'," . 60 60 "theme_advanced_buttons3 : '' });"); 61 61
Note: See TracChangeset
for help on using the changeset viewer.
