From 91e694e79de5dbe131ddb1f59db2f58df40775b8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 18 Nov 2009 13:58:01 +0000 Subject: [PATCH] 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 --- calendar/inc/class.calendar_ui.inc.php | 4 +++ calendar/inc/class.calendar_uiviews.inc.php | 33 +++++++++++++++--- calendar/templates/default/app.css | 27 ++++++++++++-- calendar/templates/default/event_widget.tpl | 2 +- .../templates/default/images/cnr-pending.png | Bin 632 -> 555 bytes 5 files changed, 57 insertions(+), 9 deletions(-) diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php index f146332d76..10183541b6 100644 --- a/calendar/inc/class.calendar_ui.inc.php +++ b/calendar/inc/class.calendar_ui.inc.php @@ -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; } diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index f24209807a..4a496892ae 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -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']."?
"; - if ($return_array) { @@ -1310,14 +1333,14 @@ class calendar_uiviews extends calendar_ui $draggableID = 'drag_'.$event['id'].'_O'.$event['owner'].'_C'.$owner; - $html = $indent.'
0,'Padding'=>0)). '>'."\n".$ie_fix.$html."\n". $indent."
"."\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'] && diff --git a/calendar/templates/default/app.css b/calendar/templates/default/app.css index db6c9c8ecb..6e882be6d4 100644 --- a/calendar/templates/default/app.css +++ b/calendar/templates/default/app.css @@ -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; diff --git a/calendar/templates/default/event_widget.tpl b/calendar/templates/default/event_widget.tpl index 44e1ed19c7..a49f54ded9 100644 --- a/calendar/templates/default/event_widget.tpl +++ b/calendar/templates/default/event_widget.tpl @@ -13,7 +13,7 @@ -
+
{timespan}
{icons}
diff --git a/calendar/templates/default/images/cnr-pending.png b/calendar/templates/default/images/cnr-pending.png index b151e9681b44c5506ef975f15382782ed2f9dd64..dffe0115e3d2df8e6d8714f801e2b51230bb6202 100755 GIT binary patch delta 530 zcmV+t0`2|y1giv)B!2;OQb$4nuFf3k00006VoOIv00000008+zyMF)x010qNS#tmY z3ljhU3ljkVnw%H_000McNliru*$Wa4DIf#YWikK&0jo(wK~yMHrH(ylQ(+W_pL4&& zG@3+Pg%D5*MX@eAxQYmZ3R;S&brI{RxCx?@h>K&zE+VbyAb(Vp4%rkDRH}$jP%A=H ze;N~PY$Z)@linov`;J4b4!ZeFFP!&1Jn-KP=B8>57cTg=RS!bPslw#Hi-*R}%*^Z3 zwMTwwzG_>ls^yvuhaUQ+>AB`IePcs^%6)gu=nKt1ejilz7ZpFSD|v9FJbP!Nw!p!A zUIYM@a4KIdUVnYlDE@vT@Zrjatq~(K@v&8ZmTT5AVhsQX9_(6Ntj3*!8b#I!uP?0M z5|4_PIWby@WqO-pp{zXx4*(m+LWinRBq98WI=e3Jnat^%#pLe(C0(mXQh?C3l{{l- zO14EOq&vk7?C3}Vr1l;5{lMwmvW5ge!nn3ldfRPM-GARn2(=D$vJnQivg57Kn|f+X zstzZtvWR{6e0y6-M39KZ07f~wIhLHgd~zdQ3UPsmVxyiTd+bPikUb9Hp6rZz5qEu0 zDt&)CsLHt;U#OtNy~%Xf>KOKX_a$JQzt}tcma{Lv4m_=V;^M13`$uv>|H}C%?bpr4 UTO>4%01E&B07*qoM6N<$f({kybpQYW delta 581 zcmV-L0=oUH1o#AyBo78+OGiWi{{a60|De66laW9kf7T2J5CQ?QKNc$h00IR`L_t(2 z&rQ)iXcKV&K=F4Uxx3`{^qwmiGMt8cbLTOGCFmC^32)O zkN3N#y&FNb(WO{zBFhp(oYM;m5t?(>y3JO`)~6bAhySk T;5I2K00000NkvXXu0mjf7!efV