Skip to content

Commit

Permalink
Implement editing in basic view.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Oct 25, 2013
1 parent 5f224b0 commit 9a9448c
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 15 deletions.
6 changes: 2 additions & 4 deletions imp/js/compose-base.js
Expand Up @@ -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) {
Expand All @@ -92,8 +91,7 @@ var ImpComposeBase = {
this.rte.destroy(true);
delete this.rte;
}
s.addClassName('fixed')
.update(identity.sig);
s.update(identity.sig);
}
},

Expand Down
1 change: 1 addition & 0 deletions imp/lib/Basic/Compose.php
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion imp/lib/Compose.php
Expand Up @@ -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');
Expand Down
4 changes: 3 additions & 1 deletion imp/templates/basic/compose/compose.html.php
Expand Up @@ -207,7 +207,9 @@
<strong><?php echo _("Signature") ?></strong>
</td>
<td class="item">
<div id="signature" title="<?php echo _("The signature is not editable.") ?>"></div>
<div id="signatureBorder"<?php if (!$this->rtemode) echo ' class="signaturePlain"' ?>>
<textarea id="signature" name="signature" cols="80" rows="3" class="fixed"></textarea>
</div>
</td>
</tr>
<?php endif; ?>
Expand Down
2 changes: 1 addition & 1 deletion imp/templates/dynamic/compose.html.php
Expand Up @@ -209,7 +209,7 @@
<?php echo _("Signature")?>:
</div>
<div id="signatureBorder">
<textarea id="signature" name="signature"<?php if (!$this->sigExpanded) echo ' style="display:none"' ?>></textarea>
<textarea id="signature" name="signature" class="fixed"<?php if (!$this->sigExpanded) echo ' style="display:none"' ?>></textarea>
</div>
</div>
<?php endif; ?>
Expand Down
10 changes: 9 additions & 1 deletion imp/themes/default/basic/screen.css
Expand Up @@ -224,7 +224,7 @@ div.msgActions, #fmanager div.folderActions {
.composebody {
padding: 2px;
}
#text_identity, #signatureBorder {
#text_identity {
width: 500px;
}
#compose td.light {
Expand All @@ -237,6 +237,14 @@ div.msgActions, #fmanager div.folderActions {
margin-bottom: -8px;
}

#signature {
padding: 2px;
}
#signatureBorder.signaturePlain {
border: 0;
padding: 0;
}

.seen {
background: #fff;
}
Expand Down
7 changes: 7 additions & 0 deletions imp/themes/default/dynamic/screen.css
Expand Up @@ -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;
Expand Down
7 changes: 0 additions & 7 deletions imp/themes/default/screen.css
Expand Up @@ -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;
Expand Down

0 comments on commit 9a9448c

Please sign in to comment.