[Svn] r1692 - trunk/roundcubemail/program/js

trac at roundcube.net trac at roundcube.net
Fri Aug 29 08:44:10 CEST 2008


Author: alec
Date: 2008-08-29 01:44:09 -0500 (Fri, 29 Aug 2008)
New Revision: 1692

Modified:
   trunk/roundcubemail/program/js/app.js
Log:
- signature in html editor must be in <div> not <span>, because
  IE not allows to include block elements inside <span>
- if identity has no signature, replace previous with empty div


Modified: trunk/roundcubemail/program/js/app.js
===================================================================
--- trunk/roundcubemail/program/js/app.js	2008-08-28 18:04:19 UTC (rev 1691)
+++ trunk/roundcubemail/program/js/app.js	2008-08-29 06:44:09 UTC (rev 1692)
@@ -2060,24 +2060,30 @@
       {
       var editor = tinyMCE.get('compose-body');
 
-      if (this.env.signatures && this.env.signatures[id])
+      if (this.env.signatures)
         {
-        // Append the signature as a span within the body
+        // Append the signature as a div within the body
         var sigElem = editor.dom.get("_rc_sig");
+	var newsig = '';
+	var htmlsig = true;
+	
         if (!sigElem)
           {
-          sigElem = editor.getDoc().createElement("span");
+          sigElem = editor.getDoc().createElement("div");
           sigElem.setAttribute("id", "_rc_sig");
           editor.getBody().appendChild(sigElem);
           }
-        if (this.env.signatures[id]['is_html'])
-          {
-          sigElem.innerHTML = this.env.signatures[id]['text'];
-          }
+
+	if (this.env.signatures[id])
+	  {
+	  newsig = this.env.signatures[id]['text'];
+	  htmlsig = this.env.signatures[id]['is_html'];
+	  }
+
+        if (htmlsig)
+          sigElem.innerHTML = newsig;
         else
-          {
-          sigElem.innerHTML = '<pre>' + this.env.signatures[id]['text'] + '</pre>';
-          }
+          sigElem.innerHTML = '<pre>' + newsig + '</pre>';
         }
       }
 

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list