From 9a9448c0eaac4aedf3617586b54915d2847f9131 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 25 Oct 2013 17:43:56 +0200 Subject: [PATCH] Implement editing in basic view. --- imp/js/compose-base.js | 6 ++---- imp/lib/Basic/Compose.php | 1 + imp/lib/Compose.php | 2 +- imp/templates/basic/compose/compose.html.php | 4 +++- imp/templates/dynamic/compose.html.php | 2 +- imp/themes/default/basic/screen.css | 10 +++++++++- imp/themes/default/dynamic/screen.css | 7 +++++++ imp/themes/default/screen.css | 7 ------- 8 files changed, 24 insertions(+), 15 deletions(-) diff --git a/imp/js/compose-base.js b/imp/js/compose-base.js index a10a40342fc..5ef2197fcee 100644 --- a/imp/js/compose-base.js +++ b/imp/js/compose-base.js @@ -66,8 +66,7 @@ var ImpComposeBase = { } if (this.editor_on) { - s.removeClassName('fixed') - .update(identity.hsig); + s.update(identity.hsig); if (Object.isUndefined(this.rte_loaded)) { CKEDITOR.on('instanceReady', function(evt) { @@ -92,8 +91,7 @@ var ImpComposeBase = { this.rte.destroy(true); delete this.rte; } - s.addClassName('fixed') - .update(identity.sig); + s.update(identity.sig); } }, diff --git a/imp/lib/Basic/Compose.php b/imp/lib/Basic/Compose.php index 973c2e6d1d9..8e978bcbe6e 100644 --- a/imp/lib/Basic/Compose.php +++ b/imp/lib/Basic/Compose.php @@ -525,6 +525,7 @@ protected function _init() $header, $identity, array( + 'signature' => $this->vars->signature, 'encrypt' => $prefs->isLocked('default_encrypt') ? $prefs->getValue('default_encrypt') : $this->vars->encrypt_options, 'html' => $rtemode, 'pgp_attach_pubkey' => $this->vars->pgp_attach_pubkey, diff --git a/imp/lib/Compose.php b/imp/lib/Compose.php index 2c5ec6fb47f..1ebefc0d474 100644 --- a/imp/lib/Compose.php +++ b/imp/lib/Compose.php @@ -1340,7 +1340,7 @@ protected function _createMimeMessage( if (!empty($options['signature'])) { if (is_string($options['signature'])) { if (empty($options['html'])) { - $body .= $options['signature']; + $body .= "\n" . $options['signature']; } else { $html_sig = $options['signature']; $body .= "\n" . $injector->getInstance('Horde_Core_Factory_TextFilter')->filter($html_sig, 'Html2text'); diff --git a/imp/templates/basic/compose/compose.html.php b/imp/templates/basic/compose/compose.html.php index eda07bbee73..ff91a29111e 100644 --- a/imp/templates/basic/compose/compose.html.php +++ b/imp/templates/basic/compose/compose.html.php @@ -207,7 +207,9 @@ -
">
+
rtemode) echo ' class="signaturePlain"' ?>> + +
diff --git a/imp/templates/dynamic/compose.html.php b/imp/templates/dynamic/compose.html.php index 06eb65a69d2..a4fc03d4e85 100644 --- a/imp/templates/dynamic/compose.html.php +++ b/imp/templates/dynamic/compose.html.php @@ -209,7 +209,7 @@ :
- +
diff --git a/imp/themes/default/basic/screen.css b/imp/themes/default/basic/screen.css index 4fac3fc8baf..afcfda619fe 100644 --- a/imp/themes/default/basic/screen.css +++ b/imp/themes/default/basic/screen.css @@ -224,7 +224,7 @@ div.msgActions, #fmanager div.folderActions { .composebody { padding: 2px; } -#text_identity, #signatureBorder { +#text_identity { width: 500px; } #compose td.light { @@ -237,6 +237,14 @@ div.msgActions, #fmanager div.folderActions { margin-bottom: -8px; } +#signature { + padding: 2px; +} +#signatureBorder.signaturePlain { + border: 0; + padding: 0; +} + .seen { background: #fff; } diff --git a/imp/themes/default/dynamic/screen.css b/imp/themes/default/dynamic/screen.css index 3a36286e7b4..2d75f82b7cb 100644 --- a/imp/themes/default/dynamic/screen.css +++ b/imp/themes/default/dynamic/screen.css @@ -691,12 +691,19 @@ div.dimpActionsMsg #windowclose { padding: 10px; } #signatureBorder { + height: 4.4em; margin-top: 4px; } #signatureParent .label { white-space: nowrap; font-weight: bold; } +#signature { + height: 100%; + width: 100%; + border: 0; + background-color: #fff; +} #signatureToggle { cursor: pointer; float: left; diff --git a/imp/themes/default/screen.css b/imp/themes/default/screen.css index 8ae92f721b5..41cf07c349a 100644 --- a/imp/themes/default/screen.css +++ b/imp/themes/default/screen.css @@ -139,17 +139,10 @@ div.partsTreeDiv { width: 500px; } #signatureBorder { - height: 4.4em; border: 1px solid #d0d0d0; background-color: #fff; padding: 0.2em 5px; } -#signature { - height: 100%; - width: 100%; - border: 0; - background-color: #fff; -} #signatureBorder .cke_skin_kama, #signatureBorder .cke_skin_kama .cke_wrapper { border: 0; padding: 0;