Calendar UI improvments:

- show status of participants in border style of event
  + solid:  all participants accepted
  + dotted: all participants answered, but not all accepted
  + dashed: not all participants answered
- mark invitations (of current user, not calendar selected)
  + white background color (not category based color)
  + show blue questionmark icon in event header
This commit is contained in:
Ralf Becker 2009-11-18 13:58:01 +00:00
parent 43649aa268
commit 91e694e79d
5 changed files with 57 additions and 9 deletions

View File

@ -447,6 +447,10 @@ class calendar_ui
{
$icons[] = html::image('calendar','alarm',lang('alarm'));
}
if($event['participants'][$this->user][0] == 'U')
{
$icons[] = html::image('calendar','cnr-pending',lang('Needs action'));
}
return $icons;
}

View File

@ -1175,6 +1175,30 @@ class calendar_uiviews extends calendar_ui
$bodybgcolor1 = $this->brighter($headerbgcolor,$headerbgcolor == '#808080' ? 100 : 170);
$bodybgcolor2 = $this->brighter($headerbgcolor,220);
// mark event as invitation, by NOT using category based backgrond color, but plain white
if ($event['participants'][$this->user][0] == 'U')
{
$bodybgcolor1 = $bodybgcolor2 = 'white';
}
// get status class of event: calEventAllAccepted, calEventAllAnswered or calEventSomeUnknown
$status_class = 'calEventAllAccepted';
foreach($event['participants'] as $id => $status)
{
calendar_so::split_status($status,$quantity,$role);
switch ($status)
{
case 'A':
break;
case 'U':
$status_class = 'calEventSomeUnknown';
break 2; // break foreach
default:
$status_class = 'calEventAllAnswered';
break;
}
}
// seperate each participant types
$part_array = array();
if ($this->allowEdit)
@ -1238,6 +1262,7 @@ class calendar_uiviews extends calendar_ui
'&width='.$width.') repeat-y '.$bodybgcolor2),
'Small' => $small ? 'Small' : '', // to use in css class-names
'indent' => $indent."\t",
'status_class' => $status_class,
));
/* not used at the moment
foreach(array(
@ -1260,7 +1285,7 @@ class calendar_uiviews extends calendar_ui
$view_link = $GLOBALS['egw']->link('/index.php',array('menuaction'=>'calendar.calendar_uiforms.edit','cal_id'=>$event['id'],'date'=>$this->bo->date2string($event['start'])));
if ($event['recur_type']!= MCAL_RECUR_NONE)
if ($event['recur_type'] != MCAL_RECUR_NONE)
{
$view_link_confirm_abort = $GLOBALS['egw']->link('/index.php',array('menuaction'=>'calendar.calendar_uiforms.edit','cal_id'=>$event['id'],'date'=>$this->bo->date2string($event['start']),'exception'=>1));
$view_link_confirm_text=lang('do you want to edit serialevent als exception? - Ok = Edit Exception, Abort = Edit Serial');
@ -1271,8 +1296,6 @@ class calendar_uiviews extends calendar_ui
$popup = ($is_private || ! $this->allowEdit) ? '' : ' onclick="'.$this->popup($view_link).'; return false;"';
}
//_debug_array($event);
//echo $event['id']."?<br>";
if ($return_array)
{
@ -1310,14 +1333,14 @@ class calendar_uiviews extends calendar_ui
$draggableID = 'drag_'.$event['id'].'_O'.$event['owner'].'_C'.$owner;
$html = $indent.'<div id="'.$draggableID.'" class="calEvent'.($is_private ? 'Private' : '').
$html = $indent.'<div id="'.$draggableID.'" class="calEvent'.($is_private ? 'Private' : '').' '.$status_class.
'" style="'.$style.' border-color: '.$headerbgcolor.'; background: '.$background.'; z-index: 20;"'.
$popup.' '.html::tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)).
'>'."\n".$ie_fix.$html."\n".
$indent."</div>"."\n";
// ATM we do not support whole day events or recurring events for dragdrop
if ( is_object($this->dragdrop) &&
if (is_object($this->dragdrop) &&
$this->use_time_grid &&
$this->bo->check_perms(EGW_ACL_EDIT,$event) &&
!$event['whole_day_on_top'] &&

View File

@ -199,7 +199,6 @@ e.g. the div with class calTimeGrid is generated by the timeGridWidget method of
overflow: hidden;
z-index: 20;
border-width: 1px;
border-style: solid;
border-radius: 6px;
-moz-border-radius: 6px;
/* set via inline style on runtime:
@ -213,9 +212,31 @@ e.g. the div with class calTimeGrid is generated by the timeGridWidget method of
cursor: pointer;
}
.calEventTooltip{
border-width: 1px;
/**
* All participants accepted the invitation
*/
.calEventAllAccepted {
border-style: solid;
border-width: 1px;
}
/**
* All participants answered the invitation, but not all accepted
*/
.calEventAllAnswered {
border-style: dotted;
border-width: 2px;
}
/**
* Some participants did NOT answer the invitation
*/
.calEventSomeUnknown {
border-style: dashed;
border-width: 1px;
}
.calEventTooltip{
border-radius: 6px;
-moz-border-radius: 6px;
max-height: 400px;

View File

@ -13,7 +13,7 @@
<!-- END event_widget_wholeday_on_top -->
<!-- BEGIN event_tooltip -->
<div class="calEventTooltip" style="border-color: {bordercolor}; background: {bodybackground};">
<div class="calEventTooltip {status_class}" style="border-color: {bordercolor}; background: {bodybackground};">
<div class="calEventHeaderSmall" style="background-color: {bordercolor};">
<font color="{headercolor}">{timespan}</font>
<div class="calEventIcons">{icons}</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 B

After

Width:  |  Height:  |  Size: 555 B