Index: trunk/calendar/inc/class.uicalendar.inc.php
===================================================================
--- trunk/calendar/inc/class.uicalendar.inc.php	(revision 4705)
+++ trunk/calendar/inc/class.uicalendar.inc.php	(revision 4707)
@@ -477,12 +477,11 @@
 			if($this->bo->printer_friendly || $_GET['plain'] == 'True')
 			{	
-				$app_css_path = $_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set']; 
- 	            $app_print_css_path = $app_css_path; 
- 	            if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_css_path.'/app.css')) 
-					$app_css_path = 'default'; 
- 	            if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_print_css_path.'/app_print.css')) 
+				$app_css_path = $_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set'];
+				$app_print_css_path = $app_css_path;
+				if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_css_path.'/app.css'))
+					$app_css_path = 'default';
+				if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$app_print_css_path.'/app_print.css'))
 					$app_print_css_path = 'default';
-			
-			
+
 				$new_body = '<html>'."\n"
 					.'<head>'."\n"
@@ -531,7 +530,7 @@
 
                         }else{
-                            $params['day'] = $_POST['date']?(int)substr($_POST['date'] , 6, 2):(int)substr($_GET['date'] , 6, 2); 
- 	                        $params['month'] = $_POST['date']?(int)substr($_POST['date'] , 4, 2):(int)substr($_GET['date'] , 4, 2); 
-							$params['year'] = $_POST['date']?(int)substr($_POST['date'] , 0, 4):(int)substr($_GET['date'] , 0, 4); 
+                            $params['day'] = $_POST['date']?(int)substr($_POST['date'] , 6, 2):(int)substr($_GET['date'] , 6, 2);
+                            $params['month'] = $_POST['date']?(int)substr($_POST['date'] , 4, 2):(int)substr($_GET['date'] , 4, 2);
+                            $params['year'] = $_POST['date']?(int)substr($_POST['date'] , 0, 4):(int)substr($_GET['date'] , 0, 4);
 
                         }
@@ -705,10 +704,10 @@
                             $params['month'] = $_GET['month']?(int)$_GET['month']:(int)$_POST['month'];
                             $params['year'] = $_GET['year']?(int)$_GET['year']:(int)$_POST['year'];
-                            $params['day'] = $_GET['day']?(int)$_GET['day']:(int)$_POST['day'];;
+                            $params['day'] = $_GET['day']?(int)$_GET['day']:(int)$_POST['day'];
 
                         }else{
-                            $params['day'] = $_POST['date']?(int)substr($_POST['date'] , 6, 2):(int)substr($_GET['date'] , 6, 2); 
-							$params['month'] = $_POST['date']?(int)substr($_POST['date'] , 4, 2):(int)substr($_GET['date'] , 4, 2); 
- 	                        $params['year'] = $_POST['date']?(int)substr($_POST['date'] , 0, 4):(int)substr($_GET['date'] , 0, 4);
+                            $params['day'] = $_POST['date']?(int)substr($_POST['date'] , 6, 2):(int)substr($_GET['date'] , 6, 2);
+                            $params['month'] = $_POST['date']?(int)substr($_POST['date'] , 4, 2):(int)substr($_GET['date'] , 4, 2);
+                            $params['year'] = $_POST['date']?(int)substr($_POST['date'] , 0, 4):(int)substr($_GET['date'] , 0, 4);
 
                         }
@@ -3659,5 +3658,5 @@
 			}
 			else
-			{ if ($texttitle)
+			{if ($texttitle)
 				$picture[] = Array(
 					'pict'	=>  $GLOBALS['phpgw']->common->image('calendar','single'),
@@ -5088,19 +5087,18 @@
 			if(isset($_GET['date']))
 			{
-                $dia = substr($_GET['date'],-2);
-            }
-            elseif(isset($_POST['day']))
-            {
-                $dia = $_POST['day'];
-            }
-            else
-            {
-                $dia = $params['day'];
-            }
-                        
-            $print =  '<a href="javascript:void(0)" id="printFriendly">['.lang('Printer Friendly').']</a>';
-            $param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$dia.'&num_dias=1'.'&d=1';
+			    $dia = substr($_GET['date'],-2);
+			}
+			elseif(isset($_POST['day']))
+			{
+			    $dia = $_POST['day'];
+			}
+			else
+			{
+			    $dia = $params['day'];
+			}
 			
-			
+			$print =  '<a href="javascript:void(0)" id="printFriendly">['.lang('Printer Friendly').']</a>';
+			$param = '&year='.$this->bo->year.'&month='.$this->bo->month.'&friendly=1'.'&day_ini='.$dia.'&num_dias=1'.'&d=1';
+
 			$p->set_file($templates);
 			$p->set_block('day_cal','day','day');
@@ -5110,6 +5108,6 @@
 			$p->set_var('date',$result_events_json['date_events_json']);
 			$p->set_var('templateSet',$templateSet);
-			$p->set_var('iprint',$print); 
- 	        $p->set_var('param',$param);		
+			$p->set_var('iprint',$print);
+			$p->set_var('param',$param);
 			$p->set_var('hora_final',$result_events_json['hora_final']);
 			$p->set_var('hora_inicial',$result_events_json['hora_inicial']);
@@ -5398,6 +5396,5 @@
 
                         $events_to_show_json = array();
-						$templateSet = $GLOBALS['phpgw_info']['server']['template_set'];
-						
+			$templateSet = $GLOBALS['phpgw_info']['server']['template_set'];
                         foreach($dates as $day)
                         {
@@ -5424,10 +5421,9 @@
                                 }
 
-
                                 $isPublic = 1;
                                 if(($event['type'] == E && $event['public'] == 0))
                                 {
                                     $isPublic = 0;
-                                    $isPublicTitle = lang('private');
+                                    $isPublicTitle = lang('restrict');
                                 }
 
@@ -5435,5 +5431,5 @@
                                 {
                                     $isPublic = 0;
-                                    $isPublicTitle = "Privado";
+                                    $isPublicTitle = lang('private');
                                 }
 
@@ -5458,65 +5454,62 @@
                                 }
                                 if($event['users_status'] == 'R')
-								{
+				{
                                     $rejected = TRUE;
-                                }
-								else
-								{
+				}
+                                else
+				{
                                     $rejected = FALSE;
-								}
-								
-				if($title_view == 0) 
-	                        { 
-                                    if($_GET['menuaction'] ==  'calendar.uicalendar.day')
-                                    {
-					$text = $event['description']; 
- 		                                    } 
- 		                                    elseif($_GET['menuaction'] ==  'calendar.uicalendar.week') 
- 		                                    { 
- 	                                        $text = ' - '.$event['end']['hour'].':'.$event['end']['min']; 
- 	 
- 	                                        //is recurrent? 
- 		                                        $text .= (isset($recur) && $recur != false) ? ' ' . '<img width="10px" height="10px" border="0" title="'.lang('recurring event').'" src="calendar/templates/'.$templateSet.'/images/recur.png"/>' : '' ; 
- 		 
- 		                                        //participants? 
- 	                                        if(count($event['participants']) > 1) 
- 		                                        { 
- 		                                            $text .= " " . '<img width="11px" height="10px" border="0" title="'.$participants.'" src="calendar/templates/'.$templateSet.'/images/multi_3.png"/>'; 
- 		                                        } 
- 		                                        else 
- 		                                        { 
- 		                                            $text .= " " . '<img width="11px" height="10px" border="0" title="'.$participants.'" src="calendar/templates/'.$templateSet.'/images/single.png"/>'; 
- 		                                        } 
- 		 
- 		                                        //has attachments? 
- 		                                        $text .= (isset($event['attachment']) && $event['attachment'] != '') ? ' ' . '<img width="10px" height="10px" border="0" title="'.lang('email notifications with attachments has been sent').'" src="calendar/templates/'.$templateSet.'/images/clip.png"/>' : '' ; 
- 		 
- 		                                        //is public? 
- 		                                        $text .= $isPublic == 0 ? ' ' . '<img width="11px" height="10px" border="0" title="'.$isPublicTitle.'" src="calendar/templates/'.$templateSet.'/images/private.png"/>' : '' ; 
- 		 
- 		                                        //has alarm? 
- 		                                        $text .= (isset($event['alarm']) && count($event['alarm']) >= 1) ? ' ' . '<img width="11px" height="10px" border="0" title="'.lang('alarm').'" src="calendar/templates/'.$templateSet.'/images/alarm.png"/>' : '' ; 
- 		 
- 		                                        $text .= ' - ' . $event['title']." - ".$event['description'];
-                                    }
-                                    else
-                                    {
-                                        $text = ' - '.$event['end']['hour'].':'.$event['end']['min'] . ' - '. $event['title']." - ".$event['description'];
-                                    }
-
-                                }
-                                else
-                                {
-                                    $text = '';
-                                }
-								
-								
-								
+				}
+
+				$evDescription = '';
+				if($title_view == 0)
+				{
+				    $evDescription = " - ".$event['description'];
+				}
+
+				if($_GET['menuaction'] ==  'calendar.uicalendar.day')
+				{
+				    $text = $event['description'];
+				}
+				elseif($_GET['menuaction'] ==  'calendar.uicalendar.week')
+				{
+				    
+				    $text = ' - '.$event['end']['hour'].':'.$event['end']['min'];
+
+				    //is recurrent?
+				    $text .= (isset($recur) && $recur != false) ? ' ' . '<img width="10px" height="10px" border="0" title="'.lang('recurring event').'" src="calendar/templates/'.$templateSet.'/images/recur.png"/>' : '' ;
+
+				    //participants?
+				    if(count($event['participants']) > 1)
+				    {
+					$text .= " " . '<img width="11px" height="10px" border="0" title="'.$participants.'" src="calendar/templates/'.$templateSet.'/images/multi_3.png"/>';
+				    }
+				    else
+				    {
+					$text .= " " . '<img width="11px" height="10px" border="0" title="'.$participants.'" src="calendar/templates/'.$templateSet.'/images/single.png"/>';
+				    }
+
+				    //has attachments?
+				    $text .= (isset($event['attachment']) && $event['attachment'] != '') ? ' ' . '<img width="10px" height="10px" border="0" title="'.lang('email notifications with attachments has been sent').'" src="calendar/templates/'.$templateSet.'/images/clip.png"/>' : '' ;
+
+				    //is public?
+				    $text .= $isPublic == 0 ? ' ' . '<img width="11px" height="10px" border="0" title="'.$isPublicTitle.'" src="calendar/templates/'.$templateSet.'/images/private.png"/>' : '' ;
+
+				    //has alarm?
+				    $text .= (isset($event['alarm']) && count($event['alarm']) >= 1) ? ' ' . '<img width="11px" height="10px" border="0" title="'.lang('alarm').'" src="calendar/templates/'.$templateSet.'/images/alarm.png"/>' : '' ;
+
+				    $text .= ' - ' . $event['title'].$evDescription;
+				}
+				else
+				{
+				    $text = ' - '.$event['end']['hour'].':'.$event['end']['min'] . ' - '. $event['title'].$evDescription;
+				}
+
                                 $events_to_show_json[] = array(
                                     start_date		    => $event['start']['year'].'-'.$event['start']['month'].'-'.$event['start']['mday'].' '.$event['start']['hour'].':'.$event['start']['min'],
                                     end_date		    => $event['end']['year'].'-'.$event['end']['month'].'-'.$event['end']['mday'].' '.$event['end']['hour'].':'.$event['end']['min'] . ' - ' . utf8_encode($event['title']),
                                     text		    => utf8_encode($text),
-				    textTitle               => utf8_encode($event['description']),
-                                    descOnTitle		    => ($eventTime <= 30) ? 1 : 0,
+				    textTitle		    => utf8_encode($event['description']), //week and month tooltip
+                                    descOnTitle		    => ($eventTime <= 57) ? 1 : 0,
                                     title		    => utf8_encode($event['title']),
                                     observation		    => utf8_encode($event['observations']),
@@ -5526,14 +5519,14 @@
                                     participants_title	    => $participants,
                                     attachments		    => $event['attachment'] ? 1 : 0 ,
-									attachmentsTitle        => utf8_encode(lang('email notifications with attachments has been sent')),
+				    attachmentsTitle	    => utf8_encode(lang('email notifications with attachments has been sent')),
                                     isPublic		    => $isPublic,
                                     isPublicTitle	    => utf8_encode($isPublicTitle),
                                     alarm		    => (isset($event['alarm']) && count($event['alarm']) >= 1) ? 1 : 0,
-									alarmTitle              => utf8_encode(lang('alarm')),
+				    alarmTitle		    => utf8_encode(lang('alarm')),
                                     recur		    => $recur,
-									recurTitle              => utf8_encode(lang('recurring event')),
+				    recurTitle		    => utf8_encode(lang('recurring event')),
                                     intersection	    => $intersection,
                                     rejected                => $rejected,
-				    title_view              => $title_view
+				    title_view		    => $title_view
                                 );
 
@@ -6013,8 +6006,8 @@
 									// End load array_lang
 								}
-								
-								$edit_js_path = 'calendar/templates/'.$_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set']; 
- 	                            if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].$edit_js_path.'/js/edit.js')) 
- 	                                $edit_js_path = 'calendar'; 
+
+								$edit_js_path = 'calendar/templates/'.$_SESSION['phpgw_info']['calendar']['user']['preferences']['common']['template_set'];
+								if (!file_exists($GLOBALS['phpgw_info']['server']['webserver_url'].$edit_js_path.'/js/edit.js'))
+									$edit_js_path = 'calendar';
 
 								$var['participants'] = array
@@ -6107,5 +6100,5 @@
 			}
 
-// Reminder
+                        // Reminder
 			// The user must use "Alarm Management" to change/modify an alarm
 			// so only display the email reminder fields if this is a new event
@@ -6190,20 +6183,24 @@
 			);
 
-			$preferences = CreateObject('phpgwapi.preferences',(int)$this->owner);
-            $selected_creator = $selected_owner = '';
-            if($event['notifications_owner'] == 1)
-                $selected_owner = ' selected';
-            else
-                $selected_creator = ' selected';
-                     
-            $option = '<option value="0" '.$selected_creator.' >'.$GLOBALS['phpgw']->common->grab_owner_name((int)$_SESSION['phpgw_session']['account_id']).'</option>';
-            if($_SESSION['phpgw_session']['account_id'] != $event['owner']){
-                $option .= '<option value="1" '.$selected_owner.' >'.$GLOBALS['phpgw']->common->grab_owner_name((int)$event['owner']).'</option>';
-            }
-            $var['notifications_owner'] = Array(
-                'field' => lang('Send notificatios as'),
-                'data'  => '<select name="cal[notifications_owner]" >'.$option.'</select>'
-                );
-				
+
+                        $preferences = CreateObject('phpgwapi.preferences',(int)$this->owner);
+                       $selected_creator = $selected_owner = '';
+                       if($event['notifications_owner'] == 1)
+                           $selected_owner = ' selected';
+                       else
+                           $selected_creator = ' selected';
+                      
+                       $option = '<option value="0" '.$selected_creator.' >'.$GLOBALS['phpgw']->common->grab_owner_name((int)$_SESSION['phpgw_session']['account_id']).'</option>';
+                       if($_SESSION['phpgw_session']['account_id'] != $event['owner']){
+                           $option .= '<option value="1" '.$selected_owner.' >'.$GLOBALS['phpgw']->common->grab_owner_name((int)$event['owner']).'</option>';
+                       }
+
+
+                       $var['notifications_owner'] = Array(
+				'field'	=> lang('Send notificatios as'),
+				'data'	=> '<select name="cal[notifications_owner]" >'.$option.'</select>'
+			);
+
+
 			if($event['recur_enddate']['year'] != 0 && $event['recur_enddate']['month'] != 0 && $event['recur_enddate']['mday'] != 0)
 			{
Index: trunk/calendar/js/dhtmlx/codebase/dhtmlxscheduler_debug.js
===================================================================
--- trunk/calendar/js/dhtmlx/codebase/dhtmlxscheduler_debug.js	(revision 4554)
+++ trunk/calendar/js/dhtmlx/codebase/dhtmlxscheduler_debug.js	(revision 4707)
@@ -3173,4 +3173,7 @@
 	if (cse) cs=cs+" "+cse;
 //alert(h);
+//alert(title_view);
+	var evDescription = contentB;
+
 	var html = '';
 	if(h == 41)
@@ -3186,4 +3189,10 @@
 	else
 	{
+	    //hide/show event description according to the preference title_view
+	    if(ev.title_view == 1)
+	    {
+		evDescription = '';
+	    }
+	    
 	    html='<div event_id="'+id+'" class="'+cs+'" ondblclick="javascript:callViewEvent(\''+id+'\');" title="'+contentB+'" style="position:absolute; top:'+y+'px; left:'+x+'px; width:'+(w-4)+'px; height:'+h+'px;'+(style||"")+'">';
 	    //var html='<div event_id="'+id+'" class="'+cs+'" ondblclick="javascript:callViewEvent(\''+id+'\');" title="'+contentB+'" style="position:absolute; top:'+y+'px; left:'+x+'px; width:'+(w-4)+'px; height:'+(h-(this._quirks?15:25))+'px;">';
@@ -3191,5 +3200,5 @@
 	    html+='<div class="dhx_title">'+contentA+'</div>';
 	    //html+='<div class="dhx_title" style="height:'+(h-(this._quirks?15:25))+'px;">'+contentA+'</div>';
-	    html+='<div class="dhx_body" style=" width:'+(w-(this._quirks?4:14))+'px; height:'+(h-(this._quirks?20:30))+'px;">'+contentB+'</div>';
+	    html+='<div class="dhx_body" style=" width:'+(w-(this._quirks?4:14))+'px; height:'+(h-(this._quirks?20:30))+'px;">'+evDescription+'</div>';
 	    html+='<div class="dhx_footer" style=" width:'+(w-8)+'px;'+(bottom?' margin-top:-1px;':'')+'" ></div></div>';
 	}
Index: trunk/calendar/templates/default/day_cal.tpl
===================================================================
--- trunk/calendar/templates/default/day_cal.tpl	(revision 4565)
+++ trunk/calendar/templates/default/day_cal.tpl	(revision 4707)
@@ -150,14 +150,15 @@
 	    }
 
-	    if(event.title_view == 0) 
- 		            { 
- 		                if(event.descOnTitle == 1) 
- 		                { 
- 		                    var eventDescOnTitle = (" - ") + event.text; 
- 		                } 
- 		                else 
- 		                { 
- 		                    var eventDescOnTitle = ''; 
- 		                }
+	    //hide/show event description according to the preference title_view
+	    if(event.title_view == 0)
+	    {
+		if(event.descOnTitle == 1) //to show, or not, description beside the title
+		{
+		    var eventDescOnTitle = (" - ") + event.text;
+		}
+		else
+		{
+		    var eventDescOnTitle = '';
+		}
 	    }
 	    else
@@ -209,8 +210,8 @@
 <!-- END day -->
 <!-- BEGIN day_event_off -->
-        <!--<font class="event-on">{event}</font>-->
+	<!--<font class="event-on">{event}</font>-->
 <!-- END day_event_off -->
 <!-- BEGIN day_time -->
-        <!--{time}-->
+	<!--{time}-->
      <!--<td class="time" nowrap>{open_link}{time}{close_link}</td>-->
 <!-- END day_time -->
@@ -219,7 +220,7 @@
 <!-- END day_row -->
 <!-- BEGIN day_event_on -->
-        <!--<font class="event-on">{event}</font>-->
+	<!--<font class="event-on">{event}</font>-->
 <!-- END day_event_on -->
 <!-- BEGIN day_event_holiday -->
-        <!--{event}-->
+	<!--{event}-->
 <!-- END day_event_holiday -->
