Index: /branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php
===================================================================
--- /branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php	(revision 4550)
+++ /branches/2.2.0.1/calendar/inc/class.uicalendar.inc.php	(revision 4557)
@@ -5462,46 +5462,46 @@
 				}
 
+				$evDescription = '';
 				if($title_view == 0)
 				{
-				    if($_GET['menuaction'] ==  'calendar.uicalendar.day')
+				    $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 = $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'];
+					$text .= " " . '<img width="11px" height="10px" border="0" title="'.$participants.'" src="calendar/templates/'.$templateSet.'/images/multi_3.png"/>';
 				    }
 				    else
 				    {
-					$text = ' - '.$event['end']['hour'].':'.$event['end']['min'] . ' - '. $event['title']." - ".$event['description'];
+					$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 = '';
+				    $text = ' - '.$event['end']['hour'].':'.$event['end']['min'] . ' - '. $event['title'].$evDescription;
 				}
 
@@ -5510,6 +5510,6 @@
                                     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']),
Index: /branches/2.2.0.1/calendar/js/dhtmlx/codebase/dhtmlxscheduler_debug.js
===================================================================
--- /branches/2.2.0.1/calendar/js/dhtmlx/codebase/dhtmlxscheduler_debug.js	(revision 4529)
+++ /branches/2.2.0.1/calendar/js/dhtmlx/codebase/dhtmlxscheduler_debug.js	(revision 4557)
@@ -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: /branches/2.2.0.1/calendar/templates/default/day_cal.tpl
===================================================================
--- /branches/2.2.0.1/calendar/templates/default/day_cal.tpl	(revision 4549)
+++ /branches/2.2.0.1/calendar/templates/default/day_cal.tpl	(revision 4557)
@@ -150,7 +150,8 @@
 	    }
 
+	    //hide/show event description according to the preference title_view
 	    if(event.title_view == 0)
 	    {
-		if(event.descOnTitle == 1)
+		if(event.descOnTitle == 1) //to show, or not, description beside the title
 		{
 		    var eventDescOnTitle = (" - ") + event.text;
