[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.84,1.85
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.84,1.85 |
Date: |
Wed, 18 Sep 2002 22:14:43 -0400 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv15073
Modified Files:
class.uicalendar.inc.php
Log Message:
Fixed a few image problems, and a small piece of the mini-calendar is now being
cached.
Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.84
retrieving revision 1.85
diff -C2 -r1.84 -r1.85
*** class.uicalendar.inc.php 17 Sep 2002 02:25:40 -0000 1.84
--- class.uicalendar.inc.php 19 Sep 2002 02:14:41 -0000 1.85
***************
*** 127,130 ****
--- 127,131 ----
function mini_calendar($params)
{
+ static $mini_cal_tpl;
if(!is_array($params))
{
***************
*** 165,185 ****
$weekstarttime =
$GLOBALS['phpgw']->datetime->get_weekday_start($params['year'],$params['month'],1);
! if($this->debug)
! {
! echo '<!-- mini_calendar:monthstart =
'.$monthstart.' -->'."\n";
! echo '<!-- mini_calendar:weekstarttime =
'.date('Ymd H:i:s',$weekstarttime).' -->'."\n";
! }
! $p =
CreateObject('phpgwapi.Template',$this->template_dir);
! $p->set_unknowns('remove');
! $p->set_file(
! Array(
! 'mini_calendar' => 'mini_cal.tpl'
! )
! );
! $p->set_block('mini_calendar','mini_cal','mini_cal');
! $p->set_block('mini_calendar','mini_week','mini_week');
! $p->set_block('mini_calendar','mini_day','mini_day');
if($this->bo->printer_friendly == False)
--- 166,186 ----
$weekstarttime =
$GLOBALS['phpgw']->datetime->get_weekday_start($params['year'],$params['month'],1);
! print_debug('mini_calendar:monthstart',$monthstart);
! print_debug('mini_calendar:weekstarttime',date('Ymd
H:i:s',$weekstarttime));
! if(!is_object($mini_cal_tpl))
! {
! $mini_cal_tpl =
CreateObject('phpgwapi.Template',$this->template_dir);
! $mini_cal_tpl->set_unknowns('remove');
! $mini_cal_tpl->set_file(
! Array(
! 'mini_calendar' =>
'mini_cal.tpl'
! )
! );
!
$mini_cal_tpl->set_block('mini_calendar','mini_cal','mini_cal');
!
$mini_cal_tpl->set_block('mini_calendar','mini_week','mini_week');
!
$mini_cal_tpl->set_block('mini_calendar','mini_day','mini_day');
! }
if($this->bo->printer_friendly == False)
***************
*** 193,197 ****
$var = Array(
! 'cal_img_root' =>
$GLOBALS['phpgw']->common->image('calendar','mini-calendar-bar.gif'),
'bgcolor' =>
$this->theme['bg_color'],
'bgcolor1' =>
$this->theme['bg_color'],
--- 194,198 ----
$var = Array(
! 'cal_img_root' =>
$GLOBALS['phpgw']->common->image('calendar','mini-calendar-bar'),
'bgcolor' =>
$this->theme['bg_color'],
'bgcolor1' =>
$this->theme['bg_color'],
***************
*** 201,205 ****
);
! $p->set_var($var);
switch(strtolower($params['buttons']))
--- 202,206 ----
);
! $mini_cal_tpl->set_var($var);
switch(strtolower($params['buttons']))
***************
*** 207,222 ****
case 'right':
$var = Array(
! 'nextmonth'
=> '<a href="'.$this->page('month','&date='.$month_ahead).'"><img
src="'.$GLOBALS['phpgw']->common->image('phpgwapi','right.gif').'"
border="0"></a>'
);
break;
case 'left':
$var = Array(
! 'prevmonth'
=> '<a href="'.$this->page('month','&date='.$month_ago).'"><img
src="'.$GLOBALS['phpgw']->common->image('phpgwapi','left.gif').'"
border="0"></a>'
);
break;
case 'both':
$var = Array(
! 'prevmonth'
=> '<a href="'.$this->page('month','&date='.$month_ago).'"><img
src="'.$GLOBALS['phpgw']->common->image('phpgwapi','left.gif').'"
border="0"></a>',
! 'nextmonth'
=> '<a href="'.$this->page('month','&date='.$month_ahead).'"><img
src="'.$GLOBALS['phpgw']->common->image('phpgwapi','right.gif').'"
border="0"></a>'
);
break;
--- 208,223 ----
case 'right':
$var = Array(
! 'nextmonth'
=> '<a href="'.$this->page('month','&date='.$month_ahead).'"><img
src="'.$GLOBALS['phpgw']->common->image('phpgwapi','right').'" border="0"></a>'
);
break;
case 'left':
$var = Array(
! 'prevmonth'
=> '<a href="'.$this->page('month','&date='.$month_ago).'"><img
src="'.$GLOBALS['phpgw']->common->image('phpgwapi','left').'" border="0"></a>'
);
break;
case 'both':
$var = Array(
! 'prevmonth'
=> '<a href="'.$this->page('month','&date='.$month_ago).'"><img
src="'.$GLOBALS['phpgw']->common->image('phpgwapi','left').'" border="0"></a>',
! 'nextmonth'
=> '<a href="'.$this->page('month','&date='.$month_ahead).'"><img
src="'.$GLOBALS['phpgw']->common->image('phpgwapi','right').'" border="0"></a>'
);
break;
***************
*** 229,241 ****
break;
}
! $p->set_var($var);
! for($i=0;$i<7;$i++)
{
! $var = Array(
! 'dayname' => '<b>' .
substr(lang($GLOBALS['phpgw']->datetime->days[$i]['name']),0,2) . '</b>',
! 'day_image' => ''
! );
!
$this->output_template_array($p,'daynames','mini_day',$var);
}
$today =
date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
--- 230,245 ----
break;
}
! $mini_cal_tpl->set_var($var);
! if(!$mini_cal_tpl->get_var('daynames'))
{
! for($i=0;$i<7;$i++)
! {
! $var = Array(
! 'dayname' => '<b>' .
substr(lang($GLOBALS['phpgw']->datetime->days[$i]['name']),0,2) . '</b>',
! 'day_image' => ''
! );
!
$this->output_template_array($p,'daynames','mini_day',$var);
! }
}
$today =
date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
***************
*** 248,255 ****
while(list($date,$day_params) = each($daily))
{
! if($this->debug)
! {
! echo 'Mini-Cal Date : '.$date."<br>\n";
! }
$year = intval(substr($date,0,4));
$month = intval(substr($date,4,2));
--- 252,256 ----
while(list($date,$day_params) = each($daily))
{
! print_debug('Mini-Cal Date',$date);
$year = intval(substr($date,0,4));
$month = intval(substr($date,4,2));
***************
*** 279,291 ****
for($l=0;$l<count($var);$l++)
{
!
$this->output_template_array($p,'monthweek_day','mini_day',$var[$l]);
}
! $p->parse('display_monthweek','mini_week',True);
! $p->set_var('dayname','');
! $p->set_var('monthweek_day','');
}
! $return_value = $p->fp('out','mini_cal');
! unset($p);
return $return_value;
}
--- 280,292 ----
for($l=0;$l<count($var);$l++)
{
!
$this->output_template_array($mini_cal_tpl,'monthweek_day','mini_day',$var[$l]);
}
!
$mini_cal_tpl->parse('display_monthweek','mini_week',True);
! $mini_cal_tpl->set_var('dayname','');
! $mini_cal_tpl->set_var('monthweek_day','');
}
! $return_value = $mini_cal_tpl->fp('out','mini_cal');
! $mini_cal_tpl->set_var('display_monthweek','');
return $return_value;
}
***************
*** 2828,2832 ****
{
$new_event_link = '<a
href="'.$this->page('add','&date='.$date).'">'
! . '<img
src="'.$GLOBALS['phpgw']->common->image('calendar','new.gif').'" width="10"
height="10" alt="'.lang('New Entry').'" border="0" align="center">'
. '</a>';
$day_number = '<a
href="'.$this->page('day','&date='.$date).'">'.$day.'</a>';
--- 2829,2833 ----
{
$new_event_link = '<a
href="'.$this->page('add','&date='.$date).'">'
! . '<img
src="'.$GLOBALS['phpgw']->common->image('calendar','new').'" width="10"
height="10" alt="'.lang('New Entry').'" border="0" align="center">'
. '</a>';
$day_number = '<a
href="'.$this->page('day','&date='.$date).'">'.$day.'</a>';
***************
*** 3270,3274 ****
while(list($key,$alarm) = each($event['alarm']))
{
! $icon = '<img
src="'.$GLOBALS['phpgw']->common->image('calendar',($alarm['enabled']?'enabled.gif':'disabled.gif')).'"
width="13" height="13">';
$var = Array(
'field' =>
$icon.$GLOBALS['phpgw']->common->show_date($alarm['time']),
--- 3271,3275 ----
while(list($key,$alarm) = each($event['alarm']))
{
! $icon = '<img
src="'.$GLOBALS['phpgw']->common->image('calendar',($alarm['enabled']?'enabled':'disabled')).'"
width="13" height="13">';
$var = Array(
'field' =>
$icon.$GLOBALS['phpgw']->common->show_date($alarm['time']),
***************
*** 4069,4085 ****
for ($j=0,$datetime=$startdate;$j<7;$j++,$datetime +=
86400)
{
! $date = date('Ymd',$datetime);
! if($this->debug)
! {
! echo '<!-- set_week_array : Date :
'.$date.' -->'."\n";
! }
if($this->bo->cached_events[$date])
{
! if($this->debug)
! {
! echo '<!-- Date : '.$date.'
Appointments found : '.count($this->bo->cached_events[$date]).' -->'."\n";
! }
$appts = True;
}
--- 4070,4081 ----
for ($j=0,$datetime=$startdate;$j<7;$j++,$datetime +=
86400)
{
! $date = date('Ymd',$datetime + (60 * 60 * 2));
! print_debug('set_week_array:Date',$date);
if($this->bo->cached_events[$date])
{
! print_debug('Date',$date);
! print_debug('Appointments
Found',count($this->bo->cached_events[$date]));
$appts = True;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.84,1.85,
Mark A Peters <address@hidden> <=