From 79d58d4cf67e930dda60f07284837351541c1cf9 Mon Sep 17 00:00:00 2001 From: stevetruckstuff Date: Thu, 19 Oct 2006 16:08:14 +0000 Subject: [PATCH] Template for viewing HTML messages in iframes git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11928 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 32 ++++---------------------- templates/default/css/default.css | 10 ++++++++ templates/default/read_html_iframe.tpl | 30 ++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 27 deletions(-) create mode 100644 templates/default/read_html_iframe.tpl diff --git a/functions/mime.php b/functions/mime.php index 2ad04ef7..c86621a4 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -414,33 +414,11 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma . '&ent_id=' . $ent_num . '&view_unsafe_images=' . (int) $view_unsafe_images; - // adding warning message - $body = html_tag('div',_("Viewing HTML formatted email"),'center'); - - /** - * height can't be set to 100%, because it does not work as expected when - * iframe is inside the table. Browsers do not create full height objects - * even when iframe is not nested. Maybe there is some way to get full size - * with CSS. Tested in firefox 1.02 and opera 7.53 - * - * width="100%" does not work as expected, when table width is not set (automatic) - * - * tokul: I think \n"; + global $oTemplate; + $oTemplate->assign('iframe_url', $iframeurl); + $oTemplate->assign('html_body', $html_body); + + $body = $oTemplate->fetch('read_html_iframe.tpl'); } else { // old way of html rendering $body = magicHTML($body, $id, $message, $mailbox); diff --git a/templates/default/css/default.css b/templates/default/css/default.css index 2bee390e..c18d2463 100644 --- a/templates/default/css/default.css +++ b/templates/default/css/default.css @@ -1032,5 +1032,15 @@ div.viewHeader span.headerName { font-weight: bold; } +div.htmlIframe { + text-align: center; + margin-left: auto; + margin-right: auto; + width: 100%; +} +div.htmlIframe iframe { + height: 250px; + width:100%; +} diff --git a/templates/default/read_html_iframe.tpl b/templates/default/read_html_iframe.tpl new file mode 100644 index 00000000..b673b446 --- /dev/null +++ b/templates/default/read_html_iframe.tpl @@ -0,0 +1,30 @@ + +
+ + +
\ No newline at end of file -- 2.25.1