From a66386fd1a98dd45772876357a3bd326a94d37a6 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 26 Jun 2009 16:49:22 -0600 Subject: [PATCH] No need for separate print.css file --- imp/lib/DIMP.php | 2 +- imp/lib/IMP.php | 31 +++--------------------- imp/templates/common-header.inc | 2 +- imp/themes/print-dimp.css | 51 --------------------------------------- imp/themes/screen-dimp.css | 53 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 58 insertions(+), 81 deletions(-) delete mode 100644 imp/themes/print-dimp.css diff --git a/imp/lib/DIMP.php b/imp/lib/DIMP.php index 7efba5592..807ad5cf7 100644 --- a/imp/lib/DIMP.php +++ b/imp/lib/DIMP.php @@ -103,7 +103,7 @@ class DIMP '\n"; include IMP_BASE . '/templates/javascript_defs_dimp.php'; - IMP::includeStylesheetFiles(true, 'dimp'); + IMP::includeStylesheetFiles('dimp'); echo "\n"; diff --git a/imp/lib/IMP.php b/imp/lib/IMP.php index dc081a176..38f0e5e36 100644 --- a/imp/lib/IMP.php +++ b/imp/lib/IMP.php @@ -1553,10 +1553,9 @@ class IMP * Outputs the necessary style tags, honoring local configuration * choices as to stylesheet caching. * - * @param boolean $print Include print CSS? - * @param string $app The application to load ('dimp' or 'imp'). + * @param string $app The application to load ('dimp' or 'imp'). */ - static public function includeStylesheetFiles($print = false, $app = 'imp') + static public function includeStylesheetFiles($app = 'imp') { global $conf, $prefs, $registry; @@ -1570,30 +1569,6 @@ class IMP } $css_out = array(); - // Add print specific stylesheets. - if ($print) { - // Add Horde print stylesheet - $tmp = array('u' => $registry->get('themesuri', 'horde') . '/print/screen.css', - 'f' => $registry->get('themesfs', 'horde') . '/print/screen.css'); - if ($app == 'dimp') { - $tmp['m'] = 'print'; - $css_out[] = $tmp; - $css_out[] = array('u' => $themesuri . '/print-dimp.css', - 'f' => $themesfs . '/print-dimp.css', - 'm' => 'print'); - } else { - $css_out[] = $tmp; - } - if (file_exists($themesfs . '/' . $theme . '/print.css')) { - $tmp = array('u' => $themesuri . '/' . $theme . '/print.css', - 'f' => $themesfs . '/' . $theme . '/print.css'); - if ($app == 'dimp') { - $tmp['m'] = 'print'; - } - $css_out[] = $tmp; - } - } - if ($app == 'dimp') { // Load custom stylesheets. if (!empty($conf['dimp']['css_files'])) { @@ -1674,7 +1649,7 @@ class IMP } foreach ($css_out as $file) { - echo '' . "\n"; + echo '' . "\n"; } } diff --git a/imp/templates/common-header.inc b/imp/templates/common-header.inc index 569dd1af8..3eab01bdf 100644 --- a/imp/templates/common-header.inc +++ b/imp/templates/common-header.inc @@ -15,7 +15,7 @@ if (!empty($refresh_time) && !empty($refresh_url)) { } echo Horde_Util::bufferOutput('require', IMP_TEMPLATES . '/javascript_defs.php'); IMP::includeScriptFiles(); -IMP::includeStylesheetFiles(!empty($printer_friendly)); +IMP::includeStylesheetFiles(); ?> <?php echo htmlspecialchars($page_title) ?> diff --git a/imp/themes/print-dimp.css b/imp/themes/print-dimp.css deleted file mode 100644 index 911b0b9cc..000000000 --- a/imp/themes/print-dimp.css +++ /dev/null @@ -1,51 +0,0 @@ -/** - * DIMP print CSS. - */ - -body { - background: #fff; -} - -a, a:visited { - color: #000; -} - -#pageContainer { - margin-left: 20px; - margin-right: 20px; -} - -#dimpmain { - position: relative; - left: 0 !important; - margin-left: 0; - top: 0; -} - -#previewPane { - height: auto !important; - overflow: visible !important; -} - -#msgHeaders, .dispaddrlist { - display: block !important; -} - -.msgfullread .msgBody { - border-top: 1px solid silver; -} - -.label { - min-width: 60px; - text-align: right; - font-weight: bold; -} - -#msgHeadersColl, .context, .address img, .noprint, .mimeStatusMessage, .largeaddrlist, #msgAtc { - display: none !important; -} -a.address { - left: 0; - padding: 0; - text-decoration: none; -} diff --git a/imp/themes/screen-dimp.css b/imp/themes/screen-dimp.css index 8a261c7a6..a7553f563 100644 --- a/imp/themes/screen-dimp.css +++ b/imp/themes/screen-dimp.css @@ -1035,3 +1035,56 @@ span.readonlyImg { #Growler div.imp-forward, div.imp-redirect, span.imp-forward, span.imp-redirect { background-image: url("graphics/mail_forwarded.png"); } + + +/* Print CSS rules. */ +@media print { + body { + background: #fff; + } + + a, a:visited { + color: #000; + } + + #pageContainer { + margin-left: 20px; + margin-right: 20px; + } + + #dimpmain { + position: relative; + left: 0 !important; + margin-left: 0; + top: 0; + } + + #previewPane { + height: auto !important; + overflow: visible !important; + } + + #msgHeaders, .dispaddrlist { + display: block !important; + } + + .msgfullread .msgBody { + border-top: 1px solid silver; + } + + .label { + min-width: 60px; + text-align: right; + font-weight: bold; + } + + #msgHeadersColl, .context, .address img, .noprint, .mimeStatusMessage, .largeaddrlist, #msgAtc { + display: none !important; + } + + a.address { + left: 0; + padding: 0; + text-decoration: none; + } +} -- 2.11.0