phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.68,1.69


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.68,1.69
Date: Wed, 13 Mar 2002 19:10:52 -0500

Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv23646/calendar/inc

Modified Files:
        class.uicalendar.inc.php 
Log Message:
Fix for GNU Bug #100528 - day view not printer fiendly.

Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -r1.68 -r1.69
*** class.uicalendar.inc.php    18 Feb 2002 00:28:54 -0000      1.68
--- class.uicalendar.inc.php    14 Mar 2002 00:10:50 -0000      1.69
***************
*** 233,236 ****
--- 233,240 ----
  
                                        }
+                                       else
+                                       {
+                                               $day_params['day_image'] = '';
+                                       }
                                        $var[] = Array(
                                                'day_image'     => 
$day_params['day_image'],
***************
*** 258,261 ****
--- 262,290 ----
                }
  
+               function printer_friendly($body)
+               {
+                       if($this->bo->printer_friendly)
+                       {
+                               $new_body = '<html>'."\n"
+                                       .'<head>'."\n"
+                                       .'<STYLE type="text/css">'."\n"
+                                       .'<!--'."\n"
+                                       .'  body { margin-top: 0px; 
margin-right: 0px; margin-left: 0px; font-family: 
"'.$GLOBALS['phpgw_info']['theme']['font'].'" }'."\n"
+                                       .'  .tablink { color: #000000; }'."\n"
+                                       .' '.$this->css()."\n"
+                                       .'-->'."\n"
+                                       .'</STYLE>'."\n"
+                                       .'</head>'."\n"
+                                       .$body
+                                       .'</body>'."\n"
+                                       .'</html>'."\n";
+                       }
+                       else
+                       {
+                               $new_body = $body;
+                       }
+                       return $new_body;
+               }
+ 
                function month()
                {
***************
*** 268,272 ****
                                $GLOBALS['phpgw']->common->phpgw_header();
                        }
!                       echo $this->get_month();
                }
  
--- 297,301 ----
                                $GLOBALS['phpgw']->common->phpgw_header();
                        }
!                       echo $this->printer_friendly($this->get_month());
                }
  
***************
*** 346,350 ****
                                $GLOBALS['phpgw']->common->phpgw_header();
                        }
!                       echo $this->get_week();
                }
  
--- 375,379 ----
                                $GLOBALS['phpgw']->common->phpgw_header();
                        }
!                       echo $this->printer_friendly($this->get_week());
                }
  
***************
*** 523,527 ****
                                $GLOBALS['phpgw_info']['flags']['nofooter'] = 
True;
                        }
!                       echo $this->get_year();
                }
  
--- 552,556 ----
                                $GLOBALS['phpgw_info']['flags']['nofooter'] = 
True;
                        }
!                       echo $this->printer_friendly($this->get_year());
                }
  
***************
*** 1165,1169 ****
                        $p->set_var($var);
                        $p->parse('day_events','day_event');
!                       $p->pparse('out','day');
                }
  
--- 1194,1198 ----
                        $p->set_var($var);
                        $p->parse('day_events','day_event');
!                       echo $this->printer_friendly($p->fp('out','day'));
                }
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]