[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.42,
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.42,1.66.2.43 |
Date: |
Sat, 16 Nov 2002 14:07:45 -0500 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv11894
Modified Files:
Tag: Version-0_9_14-branch
class.uicalendar.inc.php
Log Message:
Fixed sometimes wrong calculation of the end_cell of an event in the planner.
Corrected some identions.
Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.66.2.42
retrieving revision 1.66.2.43
diff -C2 -r1.66.2.42 -r1.66.2.43
*** class.uicalendar.inc.php 16 Nov 2002 17:50:58 -0000 1.66.2.42
--- class.uicalendar.inc.php 16 Nov 2002 19:07:41 -0000 1.66.2.43
***************
*** 1564,1576 ****
* - first and last cell of the row
*/
! function planner_update_row($params)
{
- $index = $params['index'];
- $name = $params['name'];
- $event = $params['event'];
- $cat = $params['category'];
- $start_cell = $params['start_cell'];
- $end_cell = $params['end_cell'];
-
$rows = &$this->planner_rows;
$intervals_per_day =
$this->bo->prefs['calendar']['planner_intervals_per_day'];
--- 1564,1569 ----
* - first and last cell of the row
*/
! function
planner_update_row($index,$name,$event,$cat,$start_cell,$end_cell)
{
$rows = &$this->planner_rows;
$intervals_per_day =
$this->bo->prefs['calendar']['planner_intervals_per_day'];
***************
*** 1628,1633 ****
if (!$is_private)
{
- // FIXME: how many chars can be
displayed in the event's cell?
- //
$max_chars =
6*$colspan/$intervals_per_day-5;
$max_chars /= ($colspan<9 ? 2 : 1);
--- 1621,1624 ----
***************
*** 1687,1691 ****
{
$opt .= "\" onClick=\"location='".$view."'\"";
! $cel = '<a href="'.$view.'">'; // FIXME
}
else
--- 1678,1682 ----
{
$opt .= "\" onClick=\"location='".$view."'\"";
! $cel = '<a href="'.$view.'">';
}
else
***************
*** 1743,1747 ****
else
{
! $start_cell = 0;
}
--- 1734,1738 ----
else
{
! $start_cell = 0;
}
***************
*** 1750,1756 ****
if ($event_end <= $this->planner_lastday)
{
! $days_between =
$GLOBALS['phpgw']->datetime->days_between($event['end']['month'],$event['end']['mday'],$event['end']['year'],$this->planner_end_month,$this->planner_days_in_end_month,$this->planner_end_year);
! $end_cell = $last_cell - $intervals_per_day *
($days_between+1) + $interval[$event['end']['hour']];
if ($end_cell == $start_cell && $end_cell <
$last_cell)
{
--- 1741,1747 ----
if ($event_end <= $this->planner_lastday)
{
! $days_between =
$GLOBALS['phpgw']->datetime->days_between($this->bo->month,1,$this->bo->year,$event['end']['month'],$event['end']['mday'],$event['end']['year']);
! $end_cell = $intervals_per_day * $days_between
+ $interval[$event['end']['hour']];
if ($end_cell == $start_cell && $end_cell <
$last_cell)
{
***************
*** 1760,1764 ****
else
{
! $end_cell = $last_cell;
}
--- 1751,1755 ----
else
{
! $end_cell = $last_cell;
}
***************
*** 1767,1783 ****
if ($c = $event['category'])
{
! list($cat) =
$this->planner_category($event['category']);
! if ($cat['parent'])
! {
! list($pcat) = $this->planner_category($c =
$cat['parent']);
! }
! else
! {
! $pcat = $cat;
! }
}
else
{
! $cat = $pcat = array( 'name' => lang('none'));
}
--- 1758,1774 ----
if ($c = $event['category'])
{
! list($cat) =
$this->planner_category($event['category']);
! if ($cat['parent'])
! {
! list($pcat) =
$this->planner_category($c = $cat['parent']);
! }
! else
! {
! $pcat = $cat;
! }
}
else
{
! $cat = $pcat = array( 'name' => lang('none'));
}
***************
*** 1786,1801 ****
if ($this->bo->sortby == 'category')
{
! // event needs to show up in it`s category`s row
! //
! $this->planner_update_row(
! Array(
! 'index' => $c,
! 'name' => $pcat['name'],
! 'event' => $event,
! 'category' => $cat,
! 'start_cell' => $start_cell,
! 'end_cell' => $end_cell
! )
! );
}
elseif ($this->bo->sortby == 'user')
--- 1777,1783 ----
if ($this->bo->sortby == 'category')
{
! // event needs to show up in it`s category`s row
! //
!
$this->planner_update_row($c,$pcat['name'],$event,$cat,$start_cell,$end_cell);
}
elseif ($this->bo->sortby == 'user')
***************
*** 1810,1823 ****
if (isset($status) && $status != 'R')
{
! $this->planner_update_row(
! Array(
! 'index' =>
$user_name,
! 'name' =>
$user_name,
! 'event' =>
$event,
! 'category'
=> $cat,
! 'start_cell'
=> $start_cell,
! 'end_cell'
=> $end_cell
! )
! );
}
}
--- 1792,1796 ----
if (isset($status) && $status != 'R')
{
!
$this->planner_update_row($user_name,$user_name,$event,$cat,$start_cell,$end_cell);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.42,1.66.2.43,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.26,1.71.2.27 class.uicalendar.inc.php,1.66.2.41,1.66.2.42
- Next by Date:
[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.43,1.66.2.44
- Previous by thread:
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.26,1.71.2.27 class.uicalendar.inc.php,1.66.2.41,1.66.2.42
- Next by thread:
[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.43,1.66.2.44
- Index(es):