From 9684af643f83f810a22ab9c931faefc5e56ac590 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 18 Mar 2011 12:29:05 +0000 Subject: [PATCH] handle variable attachmentdiv height and control bottom area height preserved for the attachmentdiv, throw out attachment_count, as it seems not to be used --- felamimail/inc/class.uidisplay.inc.php | 17 +++-------------- felamimail/templates/default/view_message.tpl | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/felamimail/inc/class.uidisplay.inc.php b/felamimail/inc/class.uidisplay.inc.php index b303742943..92d9b91f27 100644 --- a/felamimail/inc/class.uidisplay.inc.php +++ b/felamimail/inc/class.uidisplay.inc.php @@ -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')); diff --git a/felamimail/templates/default/view_message.tpl b/felamimail/templates/default/view_message.tpl index a1a1e4feb1..c1092df8e2 100644 --- a/felamimail/templates/default/view_message.tpl +++ b/felamimail/templates/default/view_message.tpl @@ -37,7 +37,7 @@ self.focus();
{header}
-
+
{mail_dataScript}