handle variable attachmentdiv height and control bottom area height preserved for the attachmentdiv, throw out attachment_count, as it seems not to be used

This commit is contained in:
Klaus Leithoff 2011-03-18 12:29:05 +00:00
parent 08806fe9e5
commit 9684af643f
2 changed files with 4 additions and 15 deletions

View File

@ -485,10 +485,10 @@
}
// attachments
if(is_array($attachments) && count($attachments) > 0) {
$this->t->set_var('attachment_count',count($attachments));
if(is_array($attachments) && count($attachments) > 0 && count($attachments) > 4) {
$this->t->set_var('attachment_div_height',' bottom:'.(count($attachments)>4?(count($attachments)*20<=240?count($attachments)*20:240):80).'px');
} else {
$this->t->set_var('attachment_count','0');
$this->t->set_var('attachment_div_height','');
}
if (is_array($attachments) && count($attachments) > 0) {
@ -759,12 +759,6 @@
$this->t->set_var("subject_data",$subject);
// attachments
if(is_array($attachments) && count($attachments) > 0) {
$this->t->set_var('attachment_count',count($attachments));
} else {
$this->t->set_var('attachment_count','0');
}
if (is_array($attachments) && count($attachments) > 0) {
$this->t->set_var('row_color',$this->rowColor[0]);
$this->t->set_var('name',lang('name'));
@ -1558,11 +1552,6 @@
$this->t->set_var('body', $this->getdisplayableBody($bodyParts));
// attachments
if(is_array($attachments))
$this->t->set_var('attachment_count',count($attachments));
else
$this->t->set_var('attachment_count','0');
if (is_array($attachments) && count($attachments) > 0) {
$this->t->set_var('row_color',$this->rowColor[0]);
$this->t->set_var('name',lang('name'));

View File

@ -37,7 +37,7 @@ self.focus();
<div id="headerDIV">
{header}
</div>
<div class="bodyDIV bodyDIVAttachment" id="bodyDIV" style="border: 0px solid green; margin:0px; padding:0px; left:0px;">
<div class="bodyDIV bodyDIVAttachment" id="bodyDIV" style="border: 0px solid green; margin:0px; padding:0px; left:0px; {attachment_div_height}">
{mail_dataScript}
<iframe frameborder="no" scrolling="auto" style="width:100%; height:100%;" src="{url_displayBody}">
</iframe>