summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2010-03-04 07:39:53 +0000
committerthomascube <thomas@roundcube.net>2010-03-04 07:39:53 +0000
commita96183883d95dc83a7d0951f5b834e44b062f9cf (patch)
treea8b3471421dcd01531d46100bf19d970789ec568 /program/js/app.js
parent40353f1a6c7e80ae373a2dcec7ae16db217162a5 (diff)
Changed signature separator when top-posting (#1486330)
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index ab70b024b..f6cf04be1 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -2316,6 +2316,7 @@ function rcube_webmail()
var input_message = $("[name='_message']");
var message = input_message.val();
var is_html = ($("input[name='_is_html']").val() == '1');
+ var sig_separator = this.env.sig_above && (this.env.compose_mode == 'reply' || this.env.compose_mode == 'forward') ? '---' : '-- ';
var sig, cursor_pos, p = -1;
if (!this.env.identity)
@@ -2333,7 +2334,7 @@ function rcube_webmail()
sig = this.env.signatures[this.env.identity].is_html ? this.env.signatures[this.env.identity].plain_text : this.env.signatures[this.env.identity].text;
if (sig.indexOf('-- ') != 0)
- sig = '-- \n'+sig;
+ sig = sig_separator + '\n' + sig;
p = this.env.sig_above ? message.indexOf(sig) : message.lastIndexOf(sig);
if (p >= 0)
@@ -2344,7 +2345,7 @@ function rcube_webmail()
if (show_sig && this.env.signatures && this.env.signatures[id]) {
sig = this.env.signatures[id]['is_html'] ? this.env.signatures[id]['plain_text'] : this.env.signatures[id]['text'];
if (sig.indexOf('-- ') != 0)
- sig = '-- \n'+sig;
+ sig = sig_separator + '\n' + sig;
if (this.env.sig_above) {
if (p >= 0) { // in place of removed signature
@@ -2413,12 +2414,12 @@ function rcube_webmail()
if (this.env.signatures[id].is_html) {
sig = this.env.signatures[id].text;
if (this.env.signatures[id].plain_text.indexOf('-- ') != 0)
- sig = '-- <br />' + sig;
+ sig = sig_separator + '<br />' + sig;
}
else {
sig = this.env.signatures[id].text;
if (sig.indexOf('-- ') != 0)
- sig = '-- \n' + sig;
+ sig = sig_separator + '\n' + sig;
sig = '<pre>' + sig + '</pre>';
}