Index: /branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php
===================================================================
--- /branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php	(revision 4010)
+++ /branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php	(revision 4030)
@@ -4358,8 +4358,137 @@
 						);
 						$p->set_var($var);
-						$events = $this->bo->cached_events[$date];
-						foreach($events as $event)
+						$eventsCached = $this->bo->cached_events[$date];
+
+						if($_GET['d'] == '1')
 						{
-							if ($this->bo->rejected_no_show($event))
+
+						    for($i_events = 0; $i_events < count($eventsCached) ; $i_events++)
+							{
+							if ($eventsCached[$i_events]['users_status'] == 'R')
+							{
+								continue;	// user does not want to see rejected events
+							}
+							$events[] = $eventsCached[$i_events];
+						    }
+						    /*echo "<pre>";
+							print_r($events1);
+
+						    echo "</pre>";
+						    exit();*/
+
+						    $newEvents = Array();
+						    $eventAux = Array
+								(
+								    'owner' => '',
+								    'id' => '',
+								    'type' => '',
+								    'public' => '',
+								    'category' => '',
+								    'title' => '',
+								    'description' => '',
+								    'alter_by' => '',
+								    'observations' => '',
+								    'attachment' => '',
+								    'ex_participants' => '',
+								    'uid' => '',
+								    'location' => '',
+								    'reference' => '',
+								    'start' => Array
+									(
+									    'year' => '',
+									    'month' => '',
+									    'mday' => '',
+									    'hour' => '',
+									    'min' => '',
+									    'sec' => '',
+									    'alarm' => '',
+									),
+
+								    'modtime' => Array
+									(
+									),
+
+								    'end' => Array
+									(
+									    'year' => '',
+									    'month' => '',
+									    'mday' => '',
+									    'hour' => '',
+									    'min' => '',
+									    'sec' => '',
+									    'alarm' => '',
+									),
+
+								    'priority' => '',
+								    'users_status' => '',
+								    'participants' => Array
+									(
+									),
+
+								    'alarm' => Array
+									(
+									),
+
+								);
+
+						    $delta = 60; //em segundos
+						    for($i_events = 0; $i_events < count($events) ; $i_events++)
+						    {
+
+							$newEvents[] = $events[$i_events];
+
+							$hf_current = mktime($events[$i_events]['end']['hour'], 0, 0, $month, $day, $year);
+							$hi_prox = mktime($events[$i_events+1]['start']['hour'], 0, 0, $month, $day, $year);
+
+							if($events[$i_events]['end']['min'] > 0)
+							{
+							    $hf_current += 60*$delta;
+							}
+
+							while($hi_prox > $hf_current)
+							{
+
+							    $aux1 = date('Y:m:d:H:i:s',$hf_current);
+							    $aux2 = explode(':',$aux1);
+							    $eventAux['start']['year'] = $aux2[0];
+							    $eventAux['start']['month'] = $aux2[1];
+							    $eventAux['start']['mday'] = $aux2[2];
+							    $eventAux['start']['hour'] = $aux2[3];
+							    $eventAux['start']['min'] = $aux2[4];
+							    $eventAux['start']['sec'] = $aux2[5];
+
+							    //$aux3 = date('Y:m:d:H:i:s',$hf_current);
+							    //$aux4 = explode(':',$aux3);
+							    $eventAux['end']['year'] = $aux2[0];
+							    $eventAux['end']['month'] = $aux2[1];
+							    $eventAux['end']['mday'] = $aux2[2];
+							    $eventAux['end']['hour'] = $aux2[3];
+							    $eventAux['end']['min'] = $aux2[4];
+							    $eventAux['end']['sec'] = $aux2[5];
+
+							    $eventAux['owner'] = $GLOBALS['phpgw_info']['user']['account_id'];
+							    $eventAux['title'] = "\n\n\n";
+							    $eventAux['description'] = '';
+							    $eventAux['observations'] = '';
+							    $eventAux['location'] = '';
+
+							    $newEvents[] = $eventAux;
+							    $hf_current += 60*$delta;
+
+							}
+						    }
+
+						    foreach($newEvents as $event)
+						    {
+							$p->set_var('day_events',$this->link_to_month_entry($event,$month,$day,$year));
+							$p->parse('events','event',True);
+							$p->set_var('day_events','');
+						}
+					}
+						else
+						{
+						    foreach($eventsCached as $event)
+						    {
+							if ($this->bo->rejected_no_show($event) || $event['users_status'] == 'R')
 							{
 								continue;	// user does not want to see rejected events
@@ -4368,5 +4497,12 @@
 							$p->parse('events','event',True);
 							$p->set_var('day_events','');
+						    }
 						}
+
+						/*echo "<pre>";
+						    print_r($newEvents);
+
+						echo "</pre>";
+						exit();*/
 					}
 					$p->parse('daily_events','day_event',True);
@@ -4374,4 +4510,5 @@
 					$p->set_var('daily_events','');
 					$p->set_var('events','');
+
 				}
 				$p->parse('column_header','month_column',True);
@@ -4390,12 +4527,4 @@
 			}
 
-/*			$this->bo->store_to_cache(
-				Array(
-					'syear'	=> $year,
-					'smonth'=> $month,
-					'sday'	=> 1
-				)
-			);
-*/
 			$day_ini = $_GET['day_ini'];// dia do inicio da impressao; o padrao e o dia atual;
 			$num_dias = $_GET['num_dias'];// quantidade de dias a partir do dia inicial;
@@ -4939,5 +5068,5 @@
 			$p->set_var('hora_final',$result_events_json['hora_final']);
 			$p->set_var('hora_inicial',$result_events_json['hora_inicial']);
-			$p->set_var('hour_size_px',$result_events_json['hour_size_px']) ;
+			$p->set_var('hour_size_px',$result_events_json['hour_size_px']);
 
 			$p->set_var('events_json',json_encode($result_events_json['events_to_show_json'])?json_encode($result_events_json['events_to_show_json']):'null');
@@ -5025,5 +5154,5 @@
 			$hora_final = $account_prefs['calendar']['workdayends']; //18;
 
-			$hour_size_px = $account_prefs['calendar']['interval'] ? $account_prefs['calendar']['interval'] : 42 ;
+			$hour_size_px = $account_prefs['calendar']['interval'] ? $account_prefs['calendar']['interval'] : 42;
 
                         $events_to_show_json = array();
@@ -5135,5 +5264,5 @@
 			    'hora_final'	    => $hora_final,
 			    'hour_size_px'	    => $hour_size_px,
-			    'date_events_json'	    => $date_events_json ,
+			    'date_events_json'	    => $date_events_json,
 			    'events_to_show_json'   => $events_to_show_json
 			);
Index: /branches/2.2.0.1/calendar/templates/default/app_print.css
===================================================================
--- /branches/2.2.0.1/calendar/templates/default/app_print.css	(revision 4001)
+++ /branches/2.2.0.1/calendar/templates/default/app_print.css	(revision 4030)
@@ -8,8 +8,6 @@
 	color: #000066;
 	background-color: #F7F7F7;
-	/*border: 1px solid #CCCCCC;*/
 	margin: 0px;
 	padding: 0px;
-	/*height: 100%;*/
 	width: 98%;
 	position:absolute;
