forked from extern/egroupware
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:
parent
43649aa268
commit
91e694e79d
@ -447,6 +447,10 @@ class calendar_ui
|
|||||||
{
|
{
|
||||||
$icons[] = html::image('calendar','alarm',lang('alarm'));
|
$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;
|
return $icons;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1175,6 +1175,30 @@ class calendar_uiviews extends calendar_ui
|
|||||||
$bodybgcolor1 = $this->brighter($headerbgcolor,$headerbgcolor == '#808080' ? 100 : 170);
|
$bodybgcolor1 = $this->brighter($headerbgcolor,$headerbgcolor == '#808080' ? 100 : 170);
|
||||||
$bodybgcolor2 = $this->brighter($headerbgcolor,220);
|
$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
|
// seperate each participant types
|
||||||
$part_array = array();
|
$part_array = array();
|
||||||
if ($this->allowEdit)
|
if ($this->allowEdit)
|
||||||
@ -1238,6 +1262,7 @@ class calendar_uiviews extends calendar_ui
|
|||||||
'&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",
|
'indent' => $indent."\t",
|
||||||
|
'status_class' => $status_class,
|
||||||
));
|
));
|
||||||
/* not used at the moment
|
/* not used at the moment
|
||||||
foreach(array(
|
foreach(array(
|
||||||
@ -1271,8 +1296,6 @@ class calendar_uiviews extends calendar_ui
|
|||||||
$popup = ($is_private || ! $this->allowEdit) ? '' : ' onclick="'.$this->popup($view_link).'; return false;"';
|
$popup = ($is_private || ! $this->allowEdit) ? '' : ' onclick="'.$this->popup($view_link).'; return false;"';
|
||||||
}
|
}
|
||||||
//_debug_array($event);
|
//_debug_array($event);
|
||||||
//echo $event['id']."?<br>";
|
|
||||||
|
|
||||||
|
|
||||||
if ($return_array)
|
if ($return_array)
|
||||||
{
|
{
|
||||||
@ -1310,7 +1333,7 @@ class calendar_uiviews extends calendar_ui
|
|||||||
|
|
||||||
$draggableID = 'drag_'.$event['id'].'_O'.$event['owner'].'_C'.$owner;
|
$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;"'.
|
'" style="'.$style.' border-color: '.$headerbgcolor.'; background: '.$background.'; z-index: 20;"'.
|
||||||
$popup.' '.html::tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)).
|
$popup.' '.html::tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)).
|
||||||
'>'."\n".$ie_fix.$html."\n".
|
'>'."\n".$ie_fix.$html."\n".
|
||||||
|
@ -199,7 +199,6 @@ e.g. the div with class calTimeGrid is generated by the timeGridWidget method of
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
z-index: 20;
|
z-index: 20;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
-moz-border-radius: 6px;
|
-moz-border-radius: 6px;
|
||||||
/* set via inline style on runtime:
|
/* 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;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.calEventTooltip{
|
/**
|
||||||
border-width: 1px;
|
* All participants accepted the invitation
|
||||||
|
*/
|
||||||
|
.calEventAllAccepted {
|
||||||
border-style: solid;
|
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;
|
border-radius: 6px;
|
||||||
-moz-border-radius: 6px;
|
-moz-border-radius: 6px;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<!-- END event_widget_wholeday_on_top -->
|
<!-- END event_widget_wholeday_on_top -->
|
||||||
|
|
||||||
<!-- BEGIN event_tooltip -->
|
<!-- 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};">
|
<div class="calEventHeaderSmall" style="background-color: {bordercolor};">
|
||||||
<font color="{headercolor}">{timespan}</font>
|
<font color="{headercolor}">{timespan}</font>
|
||||||
<div class="calEventIcons">{icons}</div>
|
<div class="calEventIcons">{icons}</div>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 632 B After Width: | Height: | Size: 555 B |
Loading…
Reference in New Issue
Block a user