- reworked display of events:

+ no more redundant information in header and body
 + header shows left start-time plus duration and right the icons
 + short events show title
 + in mozilla events are displayed with nice rounded corners
--> IE display is broken at the moment :-(
- added (next) Four day view
- re-added "classic" 1.0 view with no fixed time intervals (4-day, week &  month), configurable via prefs
- restructured prefs to show notification stuff at the end
This commit is contained in:
Ralf Becker 2006-06-02 19:38:08 +00:00
parent 3660a8f6ad
commit 366f164183
19 changed files with 239 additions and 120 deletions

View File

@ -516,6 +516,11 @@ class uical
'value' => 'menuaction=calendar.uiviews.day', 'value' => 'menuaction=calendar.uiviews.day',
'selected' => $this->view == 'day', 'selected' => $this->view == 'day',
), ),
array(
'text' => lang('four days view'),
'value' => 'menuaction=calendar.uiviews.day4',
'selected' => $this->view == 'day4',
),
array( array(
'text' => lang('weekview with weekend'), 'text' => lang('weekview with weekend'),
'value' => 'menuaction=calendar.uiviews.week&days=7', 'value' => 'menuaction=calendar.uiviews.week&days=7',
@ -582,7 +587,7 @@ class uical
} }
$link_vars['menuaction'] = $this->view_menuaction; // stay in the planner $link_vars['menuaction'] = $this->view_menuaction; // stay in the planner
} }
elseif ($this->view == 'listview') elseif ($this->view == 'listview' || $view == 'day' && $this->view == 'day4')
{ {
$link_vars['menuaction'] = $this->view_menuaction; // stay in the listview $link_vars['menuaction'] = $this->view_menuaction; // stay in the listview
} }

View File

@ -26,47 +26,69 @@ class uiviews extends uical
{ {
var $public_functions = array( var $public_functions = array(
'day' => True, 'day' => True,
'day4' => True,
'week' => True, 'week' => True,
'month' => True, 'month' => True,
'planner' => True, 'planner' => True,
); );
/** /**
* @var $debug mixed integer level or string function- or widget-name * integer level or string function- or widget-name
*
* @var mixed $debug
*/ */
var $debug=false; var $debug=false;
/** /**
* @var minimum width for an event * minimum width for an event
*
* @var int $eventCol_min_width
*/ */
var $eventCol_min_width = 80; var $eventCol_min_width = 80;
/** /**
* @var int $extraRows extra rows above and below the workday * extra rows above and below the workday
*
* @var int $extraRows
*/ */
var $extraRows = 1; var $extraRows = 1;
var $timeRow_width = 40; var $timeRow_width = 40;
/** /**
* @var int $rowsToDisplay how many rows per day get displayed, gets set be the timeGridWidget * how many rows per day get displayed, gets set be the timeGridWidget
*
* @var int $rowsToDisplay
*/ */
var $rowsToDisplay; var $rowsToDisplay;
/** /**
* @var int $rowHeight height in percent of one row, gets set be the timeGridWidget * height in percent of one row, gets set be the timeGridWidget
*
* @var int $rowHeight
*/ */
var $rowHeight; var $rowHeight;
/** /**
* @var array $search_params standard params for calling bocal::search for all views, set by the constructor * standard params for calling bocal::search for all views, set by the constructor
*
* @var array $search_params
*/ */
var $search_params; var $search_params;
/** /**
* @var boolean $use_time_grid=true should we use a time grid, * should we use a time grid, can be set for week- and month-view to false by the cal_pref no_time_grid
* can be set for week- and month-view to false by the cal_pref no_time_grid *
* @var boolean $use_time_grid=true
*/ */
var $use_time_grid=true; var $use_time_grid=true;
/**
* Can we display the whole day in a timeGrid of the size of the workday and just scroll to workday start
*
* @var boolean $scroll_to_wdstart;
*/
var $scroll_to_wdstart=false;
/** /**
* Constructor * Constructor
@ -80,6 +102,7 @@ class uiviews extends uical
$GLOBALS['egw_info']['flags']['nonavbar'] = False; $GLOBALS['egw_info']['flags']['nonavbar'] = False;
$app_header = array( $app_header = array(
'day' => lang('Dayview'), 'day' => lang('Dayview'),
'4day' => lang('Four days view'),
'week' => lang('Weekview'), 'week' => lang('Weekview'),
'month' => lang('Monthview'), 'month' => lang('Monthview'),
'planner' => lang('Group planner'), 'planner' => lang('Group planner'),
@ -274,7 +297,7 @@ class uiviews extends uical
$title = lang('Wk').' '.adodb_date('W',$week_start); $title = lang('Wk').' '.adodb_date('W',$week_start);
$title = $this->html->a_href($title,$week_view,'',' title="'.lang('Weekview').'"'); $title = $this->html->a_href($title,$week_view,'',' title="'.lang('Weekview').'"');
$content .= $this->timeGridWidget($week,60,200,'',$title); $content .= $this->timeGridWidget($week,60,200,'',$title,0,$week_start+WEEK_s >= $this->last);
} }
if (!$home) if (!$home)
{ {
@ -313,6 +336,17 @@ class uiviews extends uical
unset($last['raw']); // otherwise date2ts does not calc raw new, but uses it unset($last['raw']); // otherwise date2ts does not calc raw new, but uses it
$last = $this->bo->date2ts($last); $last = $this->bo->date2ts($last);
} }
/**
* Four days view, everythings done by the week-view code ...
*
* @param boolean $home=false if true return content suitable for home-page
* @return string
*/
function day4($home=false)
{
return $this->week(4,$home);
}
/** /**
* Displays the weekview, with 5 or 7 days * Displays the weekview, with 5 or 7 days
@ -322,7 +356,8 @@ class uiviews extends uical
*/ */
function week($days=0,$home=false) function week($days=0,$home=false)
{ {
$this->use_time_grid = $this->cal_prefs['use_time_grid'] != 'day'; $this->use_time_grid = $days != 4 && !in_array($this->cal_prefs['use_time_grid'],array('day','day4')) ||
$days == 4 && $this->cal_prefs['use_time_grid'] != 'day';
if (!$days) if (!$days)
{ {
@ -337,23 +372,31 @@ class uiviews extends uical
} }
if ($this->debug > 0) $this->bo->debug_message('uiviews::week(days=%1) date=%2',True,$days,$this->date); if ($this->debug > 0) $this->bo->debug_message('uiviews::week(days=%1) date=%2',True,$days,$this->date);
$wd_start = $this->first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day); if ($days == 4) // next 4 days view
if ($days == 5) // no weekend-days
{ {
switch($this->cal_prefs['weekdaystarts']) $wd_start = $this->first = $this->bo->date2ts($this->date);
$this->last = $this->first + $days * DAY_s - 1;
$GLOBALS['egw_info']['flags']['app_header'] .= ': '.lang('Four days view').' '.$this->bo->long_date($this->first,$this->last);
}
else
{
$wd_start = $this->first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day);
if ($days == 5) // no weekend-days
{ {
case 'Saturday': switch($this->cal_prefs['weekdaystarts'])
$this->first += DAY_s; {
// fall through case 'Saturday':
case 'Sunday': $this->first += DAY_s;
$this->first += DAY_s; // fall through
break; case 'Sunday':
$this->first += DAY_s;
break;
}
} }
$this->last = $this->first + $days * DAY_s - 1;
$GLOBALS['egw_info']['flags']['app_header'] .= ': '.lang('Week').' '.adodb_date('W',$this->first).': '.$this->bo->long_date($this->first,$this->last);
} }
//echo "<p>weekdaystarts='".$this->cal_prefs['weekdaystarts']."', get_weekday_start($this->year,$this->month,$this->day)=".date('l Y-m-d',$wd_start).", first=".date('l Y-m-d',$this->first)."</p>\n"; //echo "<p>weekdaystarts='".$this->cal_prefs['weekdaystarts']."', get_weekday_start($this->year,$this->month,$this->day)=".date('l Y-m-d',$wd_start).", first=".date('l Y-m-d',$this->first)."</p>\n";
$this->last = $this->first + $days * DAY_s - 1;
$GLOBALS['egw_info']['flags']['app_header'] .= ': '.lang('Week').' '.adodb_date('W',$this->first).': '.$this->bo->long_date($this->first,$this->last);
$search_params = array( $search_params = array(
'start' => $this->first, 'start' => $this->first,
@ -410,8 +453,8 @@ class uiviews extends uical
$users = $this->search_params['users']; $users = $this->search_params['users'];
if (!is_array($users)) $users = array($users); if (!is_array($users)) $users = array($users);
// for more then 3 users, show all in one row // for more then 5 users, show all in one row
if (count($users) == 1 || count($users) > 3) if (count($users) == 1 || count($users) > 5)
{ {
$dayEvents =& $this->bo->search($this->search_params); $dayEvents =& $this->bo->search($this->search_params);
$owner = 0; $owner = 0;
@ -430,7 +473,8 @@ class uiviews extends uical
$cols = array(); $cols = array();
$cols[0] =& $this->timeGridWidget($dayEvents,$this->cal_prefs['interval'],450,'','',$owner); $cols[0] =& $this->timeGridWidget($dayEvents,$this->cal_prefs['interval'],450,'','',$owner);
if (($todos = $this->get_todos($todo_label)) !== false) // only show todo's for a single user
if (count($users) == 1 && ($todos = $this->get_todos($todo_label)) !== false)
{ {
if ($GLOBALS['egw_info']['user']['apps']['infolog']) if ($GLOBALS['egw_info']['user']['apps']['infolog'])
{ {
@ -546,6 +590,10 @@ class uiviews extends uical
*/ */
function time2pos($time) function time2pos($time)
{ {
if ($this->scroll_to_wdstart) // we display the complete day - thought only workday is visible without scrolling
{
return $this->rowHeight * (1 + $this->extraRows + $time/$this->granularity_m);
}
// time before workday => condensed in the first $this->extraRows rows // time before workday => condensed in the first $this->extraRows rows
if ($this->wd_start > 0 && $time < $this->wd_start) if ($this->wd_start > 0 && $time < $this->wd_start)
{ {
@ -599,17 +647,30 @@ class uiviews extends uical
* @param string $indent='' string for correct indention * @param string $indent='' string for correct indention
* @param string $title='' title of the time-grid * @param string $title='' title of the time-grid
* @param int/array $owner=0 owner of the calendar (default 0 = $this->owner) or array with owner for each column * @param int/array $owner=0 owner of the calendar (default 0 = $this->owner) or array with owner for each column
* @param boolean $last=true last timeGrid displayed, default true
*/ */
function &timeGridWidget($daysEvents,$granularity_m=30,$height=400,$indent='',$title='',$owner=0) function &timeGridWidget($daysEvents,$granularity_m=30,$height=400,$indent='',$title='',$owner=0,$last=true)
{ {
if ($this->debug > 1 || $this->debug==='timeGridWidget') $this->bo->debug_message('uiviews::timeGridWidget(events=%1,granularity_m=%2,height=%3,,title=%4)',True,$daysEvents,$granularity_m,$height,$title); if ($this->debug > 1 || $this->debug==='timeGridWidget') $this->bo->debug_message('uiviews::timeGridWidget(events=%1,granularity_m=%2,height=%3,,title=%4)',True,$daysEvents,$granularity_m,$height,$title);
// determine if the browser supports scrollIntoView: IE4+, firefox1.0+ and safari2.0+ does
// then show all hours in a div of the size of the workday and scroll to the workday start
// still disabled, as things need to be re-aranged first, to that the column headers are not scrolled
$this->scroll_to_wdstart = false;/*$this->use_time_grid && ($this->html->user_agent == 'msie' ||
$this->html->user_agent == 'mozilla' && $this->html->ua_version >= 5.0 ||
$this->html->user_agent == 'safari' && $this->html->ua_version >= 2.0);*/
if ($this->scroll_to_wdstart)
{
$this->extraRows = 0; // no extra rows necessary
$overflow = 'overflow: scroll;';
}
$this->granularity_m = $granularity_m; $this->granularity_m = $granularity_m;
$this->display_start = $this->wd_start - ($this->extraRows * $this->granularity_m); $this->display_start = $this->wd_start - ($this->extraRows * $this->granularity_m);
$this->display_end = $this->wd_end + ($this->extraRows * $this->granularity_m); $this->display_end = $this->wd_end + ($this->extraRows * $this->granularity_m);
$wd_end = ($this->wd_end === 0 ? 1440 : $this->wd_end); if (!$this->wd_end) $this->wd_end = 1440;
$totalDisplayMinutes = $wd_end - $this->wd_start; $totalDisplayMinutes = $this->wd_end - $this->wd_start;
$this->rowsToDisplay = ($totalDisplayMinutes/$granularity_m)+2+2*$this->extraRows; $this->rowsToDisplay = ($totalDisplayMinutes/$granularity_m)+2+2*$this->extraRows;
$this->rowHeight = round(100/$this->rowsToDisplay,1); $this->rowHeight = round(100/$this->rowsToDisplay,1);
@ -618,7 +679,7 @@ class uiviews extends uical
{ {
$height = ($this->rowsToDisplay+1) * 12; $height = ($this->rowsToDisplay+1) * 12;
} }
$html = $indent.'<div class="calTimeGrid" style="height: '.$height.'px;">'."\n"; $html = $indent.'<div class="calTimeGrid" style="height: '.$height.'px;'.$overflow.'">'."\n";
$html .= $indent."\t".'<div class="calGridHeader" style="height: '. $html .= $indent."\t".'<div class="calGridHeader" style="height: '.
$this->rowHeight.'%;">'.$title."</div>\n"; $this->rowHeight.'%;">'.$title."</div>\n";
@ -629,19 +690,35 @@ class uiviews extends uical
$add_links = count($daysEvents) == 1; $add_links = count($daysEvents) == 1;
// the hour rows // the hour rows
for($i=1; $i < $this->rowsToDisplay; $i++) for($t = $this->scroll_to_wdstart ? 0 : $this->wd_start,$i = 1+$this->extraRows;
$t <= $this->wd_end || $this->scroll_to_wdstart && $t < 24*60;
$t += $this->granularity_m,++$i)
{ {
$currentTime = $this->display_start + (($i-1) * $this->granularity_m); $set_id = '';
if($this->wd_start <= $currentTime && $this->wd_end >= $currentTime) if ($t == $this->wd_start)
{ {
$html .= $indent."\t".'<div class="calTimeRow'.($off ? 'Off row_off' : ' row_on'). list($id) = @each($daysEvents);
'" style="height: '.$this->rowHeight.'%; top:'. $i*$this->rowHeight .'%;">'."\n"; $id = 'wd_start_'.$id;
$time = $GLOBALS['egw']->common->formattime(sprintf('%02d',$currentTime/60),sprintf('%02d',$currentTime%60)); $set_id = ' id="'.$id.'"';
if ($add_links) $time = $this->add_link($time,$this->date,(int) ($currentTime/60),$currentTime%60);
$html .= $indent."\t\t".'<div class="calTimeRowTime">'.$time."</div>\n";
$html .= $indent."\t</div>\n"; // calTimeRow
$off = !$off;
} }
$html .= $indent."\t".'<div'.$set_id.' class="calTimeRow'.($off ? 'Off row_off' : ' row_on').
'" style="height: '.$this->rowHeight.'%; top:'. $i*$this->rowHeight .'%;">'."\n";
// show time for full hours, allways for 45min interval and at least on every 3 row
$time = '';
static $show = array(
5 => array(0,15,30,45),
10 => array(0,30),
15 => array(0,30),
45 => array(0,15,30,45),
);
if (!isset($show[$this->granularity_m]) ? $t % 60 == 0 : in_array($t % 60,$show[$this->granularity_m]))
{
$time = $GLOBALS['egw']->common->formattime(sprintf('%02d',$t/60),sprintf('%02d',$t%60));
}
if ($add_links) $time = $this->add_link($time,$this->date,(int) ($t/60),$t%60);
$html .= $indent."\t\t".'<div class="calTimeRowTime">'.$time."</div>\n";
$html .= $indent."\t</div>\n"; // calTimeRow
$off = !$off;
} }
} }
if (is_array($daysEvents) && count($daysEvents)) if (is_array($daysEvents) && count($daysEvents))
@ -657,7 +734,7 @@ class uiviews extends uical
// style="left: 50px; right: 0px;" // style="left: 50px; right: 0px;"
$html .= $indent."\t".'<div id="calDayCols" class="calDayCols'. $html .= $indent."\t".'<div id="calDayCols" class="calDayCols'.
($this->use_time_grid ? ($this->bo->common_prefs['timeformat'] == 12 ? '12h' : '') : 'NoTime'). ($this->use_time_grid ? ($this->bo->common_prefs['timeformat'] == 12 ? '12h' : '') : 'NoTime').
'"><div style="width=100%; height: 100%;">'."\n"; '"><div style="width: 100%; height: 100%;">'."\n";
$dayCol_width = $dayCols_width / count($daysEvents); $dayCol_width = $dayCols_width / count($daysEvents);
$n = 0; $n = 0;
foreach($daysEvents as $day => $events) foreach($daysEvents as $day => $events)
@ -677,7 +754,16 @@ class uiviews extends uical
$html .= $indent."\t</div></div>\n"; // calDayCols $html .= $indent."\t</div></div>\n"; // calDayCols
} }
$html .= $indent."</div>\n"; // calTimeGrid $html .= $indent."</div>\n"; // calTimeGrid
if ($this->scroll_to_wdstart)
{
$html .= "<script>\n\tdocument.getElementById('$id').scrollIntoView();\n";
if ($last) // last timeGrid --> scroll whole document back up
{
$html .= "\tdocument.getElementById('divMain').scrollIntoView();\n";
}
$html .= "</script>\n";
}
return $html; return $html;
} }
@ -730,22 +816,6 @@ class uiviews extends uical
$eventCols[$c][] = $event; $eventCols[$c][] = $event;
} }
if (count($eventCols))
{
/* code to overlay the column, not used at the moment
$eventCol_dist = $eventCol_width = round($width / count($eventCols));
$eventCol_min_width = 80;
if ($eventCol_width < $eventCol_min_width)
{
$eventCol_width = $eventCol_dist = $eventCol_min_width;
if (count($eventCols) > 1)
{
$eventCol_dist = round(($width - $eventCol_min_width) / (count($eventCols)-1));
}
}*/
$eventCol_dist = $eventCol_width = round(100 / count($eventCols));
}
$html = $indent.'<div id="calColumn'.$this->calColumnCounter++.'" class="calDayCol" style="left: '.$left. $html = $indent.'<div id="calColumn'.$this->calColumnCounter++.'" class="calDayCol" style="left: '.$left.
'%; width: '.$width.'%;">'."\n"; '%; width: '.$width.'%;">'."\n";
@ -771,31 +841,33 @@ class uiviews extends uical
} }
$this->_day_class_holiday($day_ymd,$class,$holidays); $this->_day_class_holiday($day_ymd,$class,$holidays);
// the weekday and date // the weekday and date
$html .= $indent."\t".'<div style="height: '. $this->rowHeight .'%" class="calDayColHeader '.$class.'"'.($holidays ? ' title="'.$holidays.'"':'').'>'. $html .= $indent."\t".'<div style="height: '. $this->rowHeight .'%;" class="calDayColHeader '.$class.'"'.($holidays ? ' title="'.$holidays.'"':'').'>'.
$title.(!$short_title && $holidays ? ': '.$holidays : '')."</div>\n"; $title.(!$short_title && $holidays ? ': '.$holidays : '')."</div>\n";
if ($this->use_time_grid) if ($this->use_time_grid)
{ {
// adding divs to click on for each row / time-span // adding divs to click on for each row / time-span
for($counter = 1; $counter < $this->rowsToDisplay; $counter++) for($t = $this->scroll_to_wdstart ? 0 : $this->wd_start,$i = 1+$this->extraRows;
$t <= $this->wd_end || $this->scroll_to_wdstart && $t < 24*60;
$t += $this->granularity_m,++$i)
{ {
//print "$counter - ". $counter*$this->rowHeight ."<br>";
$linkData = array( $linkData = array(
'menuaction' =>'calendar.uiforms.edit', 'menuaction' =>'calendar.uiforms.edit',
'date' => $day_ymd, 'date' => $day_ymd,
'hour' => floor(($this->wd_start + (($counter-$this->extraRows-1)*$this->granularity_m))/60), 'hour' => floor($t / 60),
'minute' => floor(($this->wd_start + (($counter-$this->extraRows-1)*$this->granularity_m))%60), 'minute' => floor($t % 60),
); );
if ($owner) $linkData['owner'] = $owner; if ($owner) $linkData['owner'] = $owner;
$html .= $indent."\t".'<div style="height:'. $this->rowHeight .'%; top: '. $counter*$this->rowHeight . $html .= $indent."\t".'<div style="height:'. $this->rowHeight .'%; top: '. $i*$this->rowHeight .
'%;" class="calAddEvent" onclick="'.$this->popup($GLOBALS['egw']->link('/index.php',$linkData)).';return false;"></div>'."\n"; '%;" class="calAddEvent" onclick="'.$this->popup($GLOBALS['egw']->link('/index.php',$linkData)).';return false;"></div>'."\n";
} }
} }
// displaying all event columns of the day // displaying all event columns of the day
foreach($eventCols as $n => $eventCol) foreach($eventCols as $n => $eventCol)
{ {
$html .= $this->eventColWidget($eventCol,$n*$eventCol_dist,$eventCol_width,$indent."\t"); $html .= $this->eventColWidget($eventCol,!$n ? 0 : 60-10*(count($eventCols)-$n),
count($eventCols) == 1 ? 100 : (!$n ? 80 : 50),$indent."\t");
} }
$html .= $indent."</div>\n"; // calDayCol $html .= $indent."</div>\n"; // calDayCol
@ -911,11 +983,11 @@ class uiviews extends uical
} }
else else
{ {
foreach(array($event['start_m'],$event['end_m']) as $minutes) $mins = $event['end_m'] - $event['start_m'];
{ if ($event['end_m'] == 24*60-1) ++$mins;
$timespan[] = $GLOBALS['egw']->common->formattime(sprintf('%02d',$minutes/60),sprintf('%02d',$minutes%60)); $timespan = $timespan2 = $GLOBALS['egw']->common->formattime(sprintf('%02d',$event['start_m']/60),sprintf('%02d',$event['start_m']%60)).
} ' '.floor($mins/60).lang('h').($mins%60 ? $mins%60 : '');
$timespan = implode(' - ',$timespan); $timespan2 = str_replace(' ',' - '.$GLOBALS['egw']->common->formattime(sprintf('%02d',$event['end_m']/60),sprintf('%02d',$event['end_m']%60)).': ',$timespan);
} }
$is_private = !$this->bo->check_perms(EGW_ACL_READ,$event); $is_private = !$this->bo->check_perms(EGW_ACL_READ,$event);
@ -931,7 +1003,7 @@ class uiviews extends uical
$border=1; $border=1;
$headerbgcolor = $color ? $color : '#808080'; $headerbgcolor = $color ? $color : '#808080';
// the body-colors (gradient) are calculated from the headercolor, which depends on the cat of an event // the body-colors (gradient) are calculated from the headercolor, which depends on the cat of an event
$bodybgcolor1 = $this->brighter($headerbgcolor,170); $bodybgcolor1 = $this->brighter($headerbgcolor,$headerbgcolor == '#808080' ? 100 : 170);
$bodybgcolor2 = $this->brighter($headerbgcolor,220); $bodybgcolor2 = $this->brighter($headerbgcolor,220);
// seperate each participant types // seperate each participant types
@ -954,18 +1026,22 @@ class uiviews extends uical
// as we only deal with percentual widht, we consider only the full dayview (1 colum) as NOT small // as we only deal with percentual widht, we consider only the full dayview (1 colum) as NOT small
$small = $this->view != 'day' || $width < 50; $small = $this->view != 'day' || $width < 50;
// $small = $width <= $small_trigger_width // $small = $width <= $small_trigger_width
$small_height = $this->use_time_grid && ( $event['end_m']-$event['start_m'] < 2*$this->granularity_m ||
$event['end_m'] <= $this->wd_start || $event['start_m'] >= $this->wd_end);
$tpl->set_var(array( $tpl->set_var(array(
// event-content, some of it displays only if it really has content or is needed // event-content, some of it displays only if it really has content or is needed
'header_icons' => $small ? '' : implode("",$icons), 'header_icons' => $small ? '' : implode("",$icons),
'body_icons' => $small ? implode("\n",$icons) : '', 'body_icons' => $small ? implode("\n",$icons) : '',
'icons' => implode("\n",$icons), 'icons' => implode('',$icons),
'timespan' => $small ? str_replace(' ','',$timespan) : $timespan, 'timespan' => $timespan,
'title' => !$is_private ? $this->html->htmlspecialchars($event['title']).$width : lang('private'), 'title' => ($title = !$is_private ? $this->html->htmlspecialchars($event['title']) : lang('private')),
'header' => $small_height ? $title : $timespan,
'description' => !$is_private ? nl2br($this->html->htmlspecialchars($event['description'])) : '', 'description' => !$is_private ? nl2br($this->html->htmlspecialchars($event['description'])) : '',
'location' => !$is_private ? $this->add_nonempty($event['location'],lang('Location')) : '', 'location' => !$is_private ? $this->add_nonempty($event['location'],lang('Location')) : '',
'participants' => $participants, 'participants' => $participants,
'times' => !$event['multiday'] ? $this->add_nonempty($timespan,lang('Time')) : 'times' => !$event['multiday'] ? $this->add_nonempty($timespan2,lang('Time')) :
$this->add_nonempty($this->bo->format_date($event['start']),lang('Start')). $this->add_nonempty($this->bo->format_date($event['start']),lang('Start')).
$this->add_nonempty($this->bo->format_date($event['end']),lang('End')), $this->add_nonempty($this->bo->format_date($event['end']),lang('End')),
'multidaytimes' => !$event['multiday'] ? '' : 'multidaytimes' => !$event['multiday'] ? '' :
@ -983,11 +1059,13 @@ class uiviews extends uical
'border' => $border, 'border' => $border,
'bordercolor' => $headerbgcolor, 'bordercolor' => $headerbgcolor,
'headerbgcolor' => $headerbgcolor, 'headerbgcolor' => $headerbgcolor,
'bodybackground' => 'url('.$GLOBALS['egw_info']['server']['webserver_url']. 'bodybackground' => ($background = 'url('.$GLOBALS['egw_info']['server']['webserver_url'].
'/calendar/inc/gradient.php?color1='.urlencode($bodybgcolor1).'&color2='.urlencode($bodybgcolor2). '/calendar/inc/gradient.php?color1='.urlencode($bodybgcolor1).'&color2='.urlencode($bodybgcolor2).
'&width='.$width.') repeat-y '.$bodybgcolor2, '&width='.$width.') repeat-y '.$bodybgcolor2),
'Small' => $small ? 'Small' : '', // to use in css class-names 'Small' => $small ? 'Small' : '', // to use in css class-names
'indent' => $indent."\t",
)); ));
/* not used at the moment
foreach(array( foreach(array(
'upper_left'=>array('width'=>-$corner_radius,'height'=>$header_height,'border'=>0,'bgcolor'=>$headerbgcolor), 'upper_left'=>array('width'=>-$corner_radius,'height'=>$header_height,'border'=>0,'bgcolor'=>$headerbgcolor),
'upper_right'=>array('width'=>$corner_radius,'height'=>$header_height,'border'=>0,'bgcolor'=>$headerbgcolor), 'upper_right'=>array('width'=>$corner_radius,'height'=>$header_height,'border'=>0,'bgcolor'=>$headerbgcolor),
@ -1001,6 +1079,7 @@ class uiviews extends uical
(isset($data['color']) ? '&color='.urlencode($data['color']) : ''). (isset($data['color']) ? '&color='.urlencode($data['color']) : '').
(isset($data['border']) ? '&border='.urlencode($data['border']) : '')); (isset($data['border']) ? '&border='.urlencode($data['border']) : ''));
} }
*/
$tooltip = $tpl->fp('tooltip','event_tooltip'); $tooltip = $tpl->fp('tooltip','event_tooltip');
$tpl->set_var('tooltip',$this->html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0))); $tpl->set_var('tooltip',$this->html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)));
$html = $tpl->fp('out',$block); $html = $tpl->fp('out',$block);
@ -1021,7 +1100,7 @@ class uiviews extends uical
$ie_fix = ''; $ie_fix = '';
if ($this->html->user_agent == 'msie') // add a transparent image to make the event "opaque" to mouse events if ($this->html->user_agent == 'msie') // add a transparent image to make the event "opaque" to mouse events
{ {
$ie_fix = $this->html->image('calendar','transparent.gif','', $ie_fix = $indent."\t".$this->html->image('calendar','transparent.gif','',
$this->html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)). $this->html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)).
' style="top:0px; left:0px; position:absolute; height:100%; width:100%; z-index:1"') . "\n"; ' style="top:0px; left:0px; position:absolute; height:100%; width:100%; z-index:1"') . "\n";
} }
@ -1031,10 +1110,12 @@ class uiviews extends uical
} }
else else
{ {
$style = 'position: relative;'; $style = 'position: relative; margin-top: 3px;';
} }
return $indent.'<div class="calEvent'.($is_private ? 'Private' : '').'" style="'.$style.'"'. return $indent.'<div class="calEvent'.($is_private ? 'Private' : '').
$popup.'>'."\n".$ie_fix.$html.$indent."</div>\n"; '" style="'.$style.' border-color: '.$headerbgcolor.'; background: '.$background.';"'.
$popup.' '.$this->html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)).
'>'."\n".$ie_fix.$html.$indent."</div>\n";
} }
function add_nonempty($content,$label,$one_per_line=False) function add_nonempty($content,$label,$one_per_line=False)

View File

@ -19,6 +19,7 @@
$default = array( $default = array(
'day' => lang('Dayview'), 'day' => lang('Dayview'),
'day4' => lang('Four days view'),
'week' => lang('Weekview'), 'week' => lang('Weekview'),
'month' => lang('Monthview'), 'month' => lang('Monthview'),
'planner_cat' => lang('Planner by category'), 'planner_cat' => lang('Planner by category'),
@ -26,8 +27,9 @@
'listview' => lang('Listview'), 'listview' => lang('Listview'),
); );
$grid_views = array( $grid_views = array(
'' => lang('Dayview').', '.lang('Weekview').' &amp; '.lang('Monthview'), '' => lang('all'),
'day_week' => lang('Dayview').' &amp; '.lang('Weekview'), 'day_week' => lang('Dayview').', '.lang('Four days view').' &amp; '.lang('Weekview'),
'day4' => lang('Dayview').' &amp; '.lang('Four days view'),
'day' => lang('Dayview'), 'day' => lang('Dayview'),
); );
/* Select list with number of day by week */ /* Select list with number of day by week */

View File

@ -374,3 +374,4 @@ your meeting scheduled for %1 has been canceled calendar ca S'ha cancel
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar ca La vostra reunió programada per %1 ha estat reprogramada a %2 your meeting that had been scheduled for %1 has been rescheduled to %2 calendar ca La vostra reunió programada per %1 ha estat reprogramada a %2
your suggested time of <b> %1 - %2 </b> conflicts with the following existing calendar entries: calendar ca Les vostres hores proposades de <B> %1 - %2 </B> estan en conflicte amb les següents entrades del calendari: your suggested time of <b> %1 - %2 </b> conflicts with the following existing calendar entries: calendar ca Les vostres hores proposades de <B> %1 - %2 </B> estan en conflicte amb les següents entrades del calendari:
h calendar ca h

View File

@ -116,6 +116,7 @@ for which views should calendar show distinct lines with a fixed time interval.
format of event updates calendar de Format der Benachrichtigungen format of event updates calendar de Format der Benachrichtigungen
forward half a month calendar de einen halben Monat weiter forward half a month calendar de einen halben Monat weiter
forward one month calendar de einen Monat weiter forward one month calendar de einen Monat weiter
four days view calendar de Vier-Tagesansicht
freebusy: unknow user '%1', wrong password or not availible to not loged in users !!! calendar de Belegtzeiten: Unbekannter Benutzername '%1', falsches Passwort oder nicht verfügbar für nicht angemeldete Benutzer !!! freebusy: unknow user '%1', wrong password or not availible to not loged in users !!! calendar de Belegtzeiten: Unbekannter Benutzername '%1', falsches Passwort oder nicht verfügbar für nicht angemeldete Benutzer !!!
freetime search calendar de Terminsuche freetime search calendar de Terminsuche
fri calendar de Fr fri calendar de Fr
@ -128,6 +129,7 @@ group invitation calendar de Gruppeneinladung
group planner calendar de Gruppenplaner group planner calendar de Gruppenplaner
group public only calendar de Gruppen-Öffentlich group public only calendar de Gruppen-Öffentlich
groupmember(s) %1 not included, because you have no access. calendar de Gruppenmitglied(er) %1 nicht enthalten, da Sie keinen Zugriff haben. groupmember(s) %1 not included, because you have no access. calendar de Gruppenmitglied(er) %1 nicht enthalten, da Sie keinen Zugriff haben.
h calendar de h
here is your requested alarm. calendar de Hier ist ihr bestellter Alarm. here is your requested alarm. calendar de Hier ist ihr bestellter Alarm.
high priority calendar de Hohe Priorität high priority calendar de Hohe Priorität
holiday calendar de Feiertag holiday calendar de Feiertag

View File

@ -116,6 +116,7 @@ for which views should calendar show distinct lines with a fixed time interval.
format of event updates calendar en Format of event updates format of event updates calendar en Format of event updates
forward half a month calendar en forward half a month forward half a month calendar en forward half a month
forward one month calendar en forward one month forward one month calendar en forward one month
four days view calendar en four days view
freebusy: unknow user '%1', wrong password or not availible to not loged in users !!! calendar en freebusy: Unknow user '%1', wrong password or not availible to not loged in users !!! freebusy: unknow user '%1', wrong password or not availible to not loged in users !!! calendar en freebusy: Unknow user '%1', wrong password or not availible to not loged in users !!!
freetime search calendar en Freetime Search freetime search calendar en Freetime Search
fri calendar en Fri fri calendar en Fri
@ -128,6 +129,7 @@ group invitation calendar en Group invitation
group planner calendar en Group planner group planner calendar en Group planner
group public only calendar en group public only group public only calendar en group public only
groupmember(s) %1 not included, because you have no access. calendar en Groupmember(s) %1 not included, because you have no access. groupmember(s) %1 not included, because you have no access. calendar en Groupmember(s) %1 not included, because you have no access.
h calendar en h
here is your requested alarm. calendar en Here is your requested alarm. here is your requested alarm. calendar en Here is your requested alarm.
high priority calendar en high priority high priority calendar en high priority
holiday calendar en Holiday holiday calendar en Holiday

View File

@ -308,3 +308,4 @@ you need to select an ical file first calendar es-es Necesita seleccionar antes
you need to set either a day or a occurence !!! calendar es-es Debe indicar un día o una ocurrencia you need to set either a day or a occurence !!! calendar es-es Debe indicar un día o una ocurrencia
your meeting scheduled for %1 has been canceled calendar es-es Su reunión programada para %1 ha sido cancelada your meeting scheduled for %1 has been canceled calendar es-es Su reunión programada para %1 ha sido cancelada
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar es-es Su reunión programada para %1 ha sido reprogramada para %2 your meeting that had been scheduled for %1 has been rescheduled to %2 calendar es-es Su reunión programada para %1 ha sido reprogramada para %2
h calendar es-es h

View File

@ -267,3 +267,4 @@ you need to select an ical file first calendar eu Lehenago
you need to set either a day or a occurence !!! calendar eu Egun bat edo ateraldi bat jarri behar duzu you need to set either a day or a occurence !!! calendar eu Egun bat edo ateraldi bat jarri behar duzu
your meeting scheduled for %1 has been canceled calendar eu %1 programatutako bilera ezeztatu egin da your meeting scheduled for %1 has been canceled calendar eu %1 programatutako bilera ezeztatu egin da
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar eu %1 programatutako bilera %2 programatu da your meeting that had been scheduled for %1 has been rescheduled to %2 calendar eu %1 programatutako bilera %2 programatu da
h calendar eu h

View File

@ -414,3 +414,4 @@ you need to set either a day or a occurence !!! calendar fr Vous devez r
your meeting scheduled for %1 has been canceled calendar fr Votre réunion planifiée pour %1 a été annulée your meeting scheduled for %1 has been canceled calendar fr Votre réunion planifiée pour %1 a été annulée
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar fr Votre réunion qui avait été planifiée pour %1 a été replanifiée pour %2 your meeting that had been scheduled for %1 has been rescheduled to %2 calendar fr Votre réunion qui avait été planifiée pour %1 a été replanifiée pour %2
your suggested time of <b> %1 - %2 </b> conflicts with the following existing calendar entries: calendar fr L'heure que vous avez suggéré <B> %1 - %2 </B> entre en conflit avec les entrés suivantes du calendrier: your suggested time of <b> %1 - %2 </b> conflicts with the following existing calendar entries: calendar fr L'heure que vous avez suggéré <B> %1 - %2 </B> entre en conflit avec les entrés suivantes du calendrier:
h calendar fr h

View File

@ -233,3 +233,4 @@ you can either set a year or a occurence, not both !!! calendar hu Tudsz
you can only set a year or a occurence !!! calendar hu Tudsz állítani csupán egy évet vagy egy esemény!!! you can only set a year or a occurence !!! calendar hu Tudsz állítani csupán egy évet vagy egy esemény!!!
you do not have permission to read this record! calendar hu Neked nincs jogosultságod olvasni ezt a bejegyzést! you do not have permission to read this record! calendar hu Neked nincs jogosultságod olvasni ezt a bejegyzést!
you have a meeting scheduled for %1 calendar hu Neked van egy ütemezett találkozód %1-el! you have a meeting scheduled for %1 calendar hu Neked van egy ütemezett találkozód %1-el!
h calendar hu óra

View File

@ -301,3 +301,4 @@ you need to select an ical file first calendar it Devi prima selezionare un file
you need to set either a day or a occurence !!! calendar it Impostare un giorno o una ricorrenza !!! you need to set either a day or a occurence !!! calendar it Impostare un giorno o una ricorrenza !!!
your meeting scheduled for %1 has been canceled calendar it Il tuo meeting fissato per il %1 è stato cancellato your meeting scheduled for %1 has been canceled calendar it Il tuo meeting fissato per il %1 è stato cancellato
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar it Il tuo meeting fissato per il %1 è stato spostato al %2 your meeting that had been scheduled for %1 has been rescheduled to %2 calendar it Il tuo meeting fissato per il %1 è stato spostato al %2
h calendar it h

View File

@ -285,3 +285,4 @@ you need to set either a day or a occurence !!! calendar lv Tev jāuzstāda dien
your meeting scheduled for %1 has been canceled calendar lv Tava ieplānotā tikšanās %1 ir atcelta your meeting scheduled for %1 has been canceled calendar lv Tava ieplānotā tikšanās %1 ir atcelta
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar lv Tava ieplānotā tikšanās %1 tika pārcelta uz %2 your meeting that had been scheduled for %1 has been rescheduled to %2 calendar lv Tava ieplānotā tikšanās %1 tika pārcelta uz %2
your suggested time of <b> %1 - %2 </b> conflicts with the following existing calendar entries: calendar lv Tavs ieteiktais <B> %1 - %2 </B> laiks nonāķ pretrunā ar sekojošīem kalendāra ierakstiem: your suggested time of <b> %1 - %2 </b> conflicts with the following existing calendar entries: calendar lv Tavs ieteiktais <B> %1 - %2 </B> laiks nonāķ pretrunā ar sekojošīem kalendāra ierakstiem:
h calendar lv h

View File

@ -306,3 +306,4 @@ you need to select an ical file first calendar nl U moet eerst een iCal selecter
you need to set either a day or a occurence !!! calendar nl U moet of een Dag of een Gebeurtenis instellen !!! you need to set either a day or a occurence !!! calendar nl U moet of een Dag of een Gebeurtenis instellen !!!
your meeting scheduled for %1 has been canceled calendar nl U geplande vergadering voor %1 is geannuleerd. your meeting scheduled for %1 has been canceled calendar nl U geplande vergadering voor %1 is geannuleerd.
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar nl Uw vergadering die stond gepland voor %1 is opnieuw ingepland naar %2 your meeting that had been scheduled for %1 has been rescheduled to %2 calendar nl Uw vergadering die stond gepland voor %1 is opnieuw ingepland naar %2
h calendar nl h

View File

@ -306,3 +306,4 @@ you need to select an ical file first calendar no Du m
you need to set either a day or a occurence !!! calendar no Du må enten sette en dag eller hendelse !!! you need to set either a day or a occurence !!! calendar no Du må enten sette en dag eller hendelse !!!
your meeting scheduled for %1 has been canceled calendar no Møtet ditt planlagt for %1 har blitt kansellert your meeting scheduled for %1 has been canceled calendar no Møtet ditt planlagt for %1 har blitt kansellert
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar no Møtet ditt som var planlagt for %1 har blitt flyttet til %2 your meeting that had been scheduled for %1 has been rescheduled to %2 calendar no Møtet ditt som var planlagt for %1 har blitt flyttet til %2
h calendar no t

View File

@ -308,3 +308,4 @@ you need to select an ical file first calendar pt-br Voc
you need to set either a day or a occurence !!! calendar pt-br Você deve determinar um dia ou recorrência!!! you need to set either a day or a occurence !!! calendar pt-br Você deve determinar um dia ou recorrência!!!
your meeting scheduled for %1 has been canceled calendar pt-br Seu compromisso agendado para %1 foi cancelado your meeting scheduled for %1 has been canceled calendar pt-br Seu compromisso agendado para %1 foi cancelado
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar pt-br Seu compromisso agendado para %1 foi remarcado para %2 your meeting that had been scheduled for %1 has been rescheduled to %2 calendar pt-br Seu compromisso agendado para %1 foi remarcado para %2
h calendar pt-br h

View File

@ -308,3 +308,4 @@ you need to select an ical file first calendar sl Najprej morate izbrati datotek
you need to set either a day or a occurence !!! calendar sl Nastaviti morate dan ali pojavljanje! you need to set either a day or a occurence !!! calendar sl Nastaviti morate dan ali pojavljanje!
your meeting scheduled for %1 has been canceled calendar sl Vaš sestanek %1 je izbrisan your meeting scheduled for %1 has been canceled calendar sl Vaš sestanek %1 je izbrisan
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar sl Sestanek za %1 je bil prestavljen na %2 your meeting that had been scheduled for %1 has been rescheduled to %2 calendar sl Sestanek za %1 je bil prestavljen na %2
h calendar sl h

View File

@ -308,3 +308,4 @@ you need to select an ical file first calendar zh-tw 您必須先選擇一個 iC
you need to set either a day or a occurence !!! calendar zh-tw 您必須設定一個日期或是一個期間! you need to set either a day or a occurence !!! calendar zh-tw 您必須設定一個日期或是一個期間!
your meeting scheduled for %1 has been canceled calendar zh-tw 您與%1的行程已經取消了 your meeting scheduled for %1 has been canceled calendar zh-tw 您與%1的行程已經取消了
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar zh-tw 您與%1的行程已經重新安排到%2 your meeting that had been scheduled for %1 has been rescheduled to %2 calendar zh-tw 您與%1的行程已經重新安排到%2
h calendar zh-tw 時

View File

@ -187,21 +187,32 @@ e.g. the div with class calTimeGrid is generated by the timeGridWidget method of
.calEvent,.calEventPrivate{ .calEvent,.calEventPrivate{
position: absolute; position: absolute;
left: 0px; left: 0px;
width: 100%; right: 0px;
overflow: hidden; overflow: hidden;
z-index: 20; z-index: 20;
border-width: 1px;
border-style: solid;
border-radius: 6px;
-moz-border-radius: 6px;
/* set via inline style on runtime: /* set via inline style on runtime:
* top: depending on startime * top: depending on startime
* height: depending on length * height: depending on length
* background-color: depending on category * border-color: depending on category
* background: depending on category (shade)
*/ */
} }
.calEvent:hover{ .calEvent:hover{
/* background-color: #ffff80;*/
cursor: pointer; cursor: pointer;
cursor: hand; cursor: hand;
} }
.calEventTooltip{
border-width: 1px;
border-style: solid;
border-radius: 6px;
-moz-border-radius: 6px;
}
.calAddEvent{ .calAddEvent{
position: absolute; position: absolute;
width: 100%; width: 100%;
@ -217,21 +228,37 @@ e.g. the div with class calTimeGrid is generated by the timeGridWidget method of
/* header-row of the event /* header-row of the event
*/ */
.calEventHeader,.calEventHeaderSmall{ .calEventHeader,.calEventHeaderSmall{
position: relative; /* as the calEventIcons use postion: absolute! */
font-weight: bold; font-weight: bold;
font-size: 9pt; font-size: 9pt;
background-color: #0000ff;
color: white; color: white;
text-align: left; text-align: left;
left: 0px;
right: 0px;
padding-left: 2px;
/* set via inline style on runtime
* background-color: depending on category
*/
} }
.calEventHeaderSmall{ .calEventHeaderSmall{
font-size: 8pt; font-size: 8pt;
line-height: 10pt; line-height: 10pt;
} }
.calEventIcons{
position: absolute;
right: 0px;
top: 0px;
}
.calEventHeaderSmall .calEventIcons img{ height: 13px;}
/* body of the event /* body of the event
*/ */
.calEventBody,.calEventBodySmall{ .calEventBody,.calEventBodySmall{
padding: 0px 3px 0px; padding: 0px 3px 0px;
left: 2px;
right: 2px;
height: 99%;
} }
.calEventBodySmall{ .calEventBodySmall{

View File

@ -1,39 +1,27 @@
<!-- BEGIN event_widget --> <!-- BEGIN event_widget -->
<table style="width: 100%; height: 100%; margin: 0px; padding: 0px;" cellpadding="0" cellspacing="0" border="0" align="center" {tooltip}> {indent}<div class="calEventHeader{Small}" style="background-color: {bordercolor};">
{indent} {header}
<tr style="height: {header_height};" valign="top"> {indent} <div class="calEventIcons">{icons}</div>
<td valign="middle" class="calEventHeader{Small}" style="height: {header_height}; border-top: {border}px solid {bordercolor}; background-color: {headerbgcolor};"> {indent}</div>
{icons} {timespan} {indent}<div class="calEventBody{Small}">{title}</div>
</td>
</tr>
<tr valign="top" style="height: 100%;">
<td class="calEventBody{Small}" style="background: {bodybackground}; border-bottom: {border}px solid {bordercolor}; border-left: {border}px solid {bordercolor}; border-right: {border}px solid {bordercolor};">
{title}
</td>
</tr>
</table>
<!-- END event_widget --> <!-- END event_widget -->
<!-- BEGIN event_tooltip --> <!-- BEGIN event_tooltip -->
<table style="width: 100%; margin: 0px; padding: 0px;" cellpadding="0" cellspacing="0" border="0" align="center"> <div class="calEventTooltip" style="border-color: {bordercolor}; background: {bodybackground};">
<tr style="height: {header_height};" valign="top"> <div class="calEventHeaderSmall" style="background-color: {bordercolor};">
<td valign="middle" class="calEventHeaderSmall" style="height: {header_height}; border-top: {border}px solid {bordercolor}; background-color: {headerbgcolor};"> <font color="white"><b>{timespan}</b></font>
{icons} {timespan} <div class="calEventIcons">{icons}</div>
</td> </div>
</tr> <div class="calEventBodySmall">
<tr valign="top"> <p style="margin: 0px;">
<td class="calEventBodySmall" style="background: {bodybackground}; border-bottom: {border}px solid {bordercolor}; border-left: {border}px solid {bordercolor}; border-right: {border}px solid {bordercolor};"> <span class="calEventTitle">{title}</span><br>
<p style="margin: 0px;"> {description}</p>
<span class="calEventTitle">{title}</span><br> <p style="margin: 2px 0px;">{times}
{description}</p> {location}
<p style="margin: 2px 0px;">{times} {category}
{location} {participants}</p>
{category} </div>
{participants}</p> </dir>
</td>
</tr>
</table>
<!-- END event_tooltip --> <!-- END event_tooltip -->
<!-- BEGIN planner_event --> <!-- BEGIN planner_event -->