No need for separate print.css file
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 26 Jun 2009 22:49:22 +0000 (16:49 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 26 Jun 2009 22:52:07 +0000 (16:52 -0600)
imp/lib/DIMP.php
imp/lib/IMP.php
imp/templates/common-header.inc
imp/themes/print-dimp.css [deleted file]
imp/themes/screen-dimp.css

index 7efba55..807ad5c 100644 (file)
@@ -103,7 +103,7 @@ class DIMP
              '<link href="' . $GLOBALS['registry']->getImageDir() . "/favicon.ico\" rel=\"SHORTCUT ICON\" />\n";
         include IMP_BASE . '/templates/javascript_defs_dimp.php';
 
-        IMP::includeStylesheetFiles(true, 'dimp');
+        IMP::includeStylesheetFiles('dimp');
 
         echo "</head>\n";
 
index dc081a1..38f0e5e 100644 (file)
@@ -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 '<link href="' . $file['u'] . '" rel="stylesheet" type="text/css"' . (isset($file['m']) ? ' media="' . $file['m'] . '"' : '') . ' />' . "\n";
+            echo '<link href="' . $file['u'] . '" rel="stylesheet" type="text/css" />' . "\n";
         }
     }
 
index 569dd1a..3eab01b 100644 (file)
@@ -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();
 ?>
 <title><?php echo htmlspecialchars($page_title) ?></title>
 <link href="<?php echo $GLOBALS['registry']->getImageDir() ?>/favicon.ico" rel="SHORTCUT ICON" />
diff --git a/imp/themes/print-dimp.css b/imp/themes/print-dimp.css
deleted file mode 100644 (file)
index 911b0b9..0000000
+++ /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;
-}
index 8a261c7..a7553f5 100644 (file)
@@ -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;
+    }
+}