summaryrefslogtreecommitdiff
path: root/roundcubemail
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-29 06:44:09 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-29 06:44:09 +0000
commit5a2e86a82a68ca9af65fe962a7975b4de10db8bd (patch)
treec03523899b58d0782c67259404fafaef11197d42 /roundcubemail
parent62e81e742417631446e1c1e3ce7b3dcf319f8966 (diff)
- 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 git-svn-id: https://svn.roundcube.net/trunk@1692 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
-rw-r--r--roundcubemail/program/js/app.js26
1 files changed, 16 insertions, 10 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index bfab0035f..0e5aa0183 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -2060,24 +2060,30 @@ function rcube_webmail()
{
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>';
}
}