[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.14,
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.14,1.71.2.15 class.uicalendar.inc.php,1.66.2.23,1.66.2.24 class.uipreferences.inc.php,1.2.2.3,1.2.2.4 class.bopreferences.inc.php,1.2.2.1,1.2.2.2 |
Date: |
Thu, 19 Sep 2002 19:45:06 -0400 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv32264
Modified Files:
Tag: Version-0_9_14-branch
class.bocalendar.inc.php class.uicalendar.inc.php
class.uipreferences.inc.php class.bopreferences.inc.php
Log Message:
GNU Patch #528.
Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.71.2.14
retrieving revision 1.71.2.15
diff -C2 -r1.71.2.14 -r1.71.2.15
*** class.bocalendar.inc.php 17 Sep 2002 21:58:10 -0000 1.71.2.14
--- class.bocalendar.inc.php 19 Sep 2002 23:45:04 -0000 1.71.2.15
***************
*** 145,157 ****
while(list($grantor,$rights) =
each($this->grants))
{
! echo '<!-- Grantor: '.$grantor.'
Rights: '.$rights.' -->'."\n";
}
@reset($this->grants);
}
! if($this->debug)
! {
! echo '<!-- Read Use_Session : ('.$session.')
-->'."\n";
! }
if($session)
--- 145,155 ----
while(list($grantor,$rights) =
each($this->grants))
{
! print_debug('Grantor',$grantor);
! print_debug('Rights',$rights);
}
@reset($this->grants);
}
! print_debug('Read use_session',$session);
if($session)
***************
*** 161,169 ****
}
! if($this->debug)
! {
! echo '<!-- BO Filter : ('.$this->filter.')
-->'."\n";
! echo '<!-- Owner : '.$this->owner.' -->'."\n";
! }
$owner =
(isset($GLOBALS['owner'])?$GLOBALS['owner']:'');
--- 159,166 ----
}
! print_debug('BO Filter',$this->filter);
! print_debug('Owner',$this->owner);
!
! $this->prefs['calendar'] =
$GLOBALS['phpgw_info']['user']['preferences']['calendar'];
$owner =
(isset($GLOBALS['owner'])?$GLOBALS['owner']:'');
***************
*** 171,174 ****
--- 168,179 ----
$owner = ($owner=='' &&
isset($GLOBALS['HTTP_POST_VARS']['owner'])?$GLOBALS['HTTP_POST_VARS']['owner']:$owner);
+ if ((!isset($owner) || $owner == '')
+ && $GLOBALS['HTTP_GET_VARS']['menuaction'] ==
'calendar.uicalendar.planner'
+ && $GLOBALS['HTTP_POST_VARS']['from'] !=
'calendar.uicalendar.planner'
+ &&
$this->prefs['calendar']['planner_start_with_group'] != '-1')
+ {
+ $owner =
$this->prefs['calendar']['planner_start_with_group'];
+ }
+
if(isset($owner) && $owner!='' && substr($owner,0,2) ==
'g_')
{
***************
*** 189,193 ****
$this->prefs['common'] =
$GLOBALS['phpgw_info']['user']['preferences']['common'];
- $this->prefs['calendar'] =
$GLOBALS['phpgw_info']['user']['preferences']['calendar'];
if ($this->prefs['common']['timeformat'] == '12')
--- 194,197 ----
***************
*** 216,219 ****
--- 220,232 ----
}
+ if(!isset($this->sortby))
+ {
+ $default_calender =
$this->prefs['calendar']['defaultcalendar'];
+ if ($default_calender == 'planner_cat' ||
$default_calender == 'planner_user')
+ {
+ $this->sortby = ($default_calender ==
'planner_cat' ? 'category' : 'user');
+ }
+ }
+
if($GLOBALS['phpgw']->accounts->get_type($this->owner)=='g')
{
***************
*** 279,287 ****
$this->day = date('d',$localtime);
}
- }
-
- if(!isset($this->sortby) || $this->sortby == '')
- {
- $this->sortby = 'category';
}
--- 292,295 ----
Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.66.2.23
retrieving revision 1.66.2.24
diff -C2 -r1.66.2.23 -r1.66.2.24
*** class.uicalendar.inc.php 19 Sep 2002 02:14:25 -0000 1.66.2.23
--- class.uicalendar.inc.php 19 Sep 2002 23:45:04 -0000 1.66.2.24
***************
*** 1386,1389 ****
--- 1386,1400 ----
$hdr[2][\'.\'.$index] =
\'colspan="\'.$intervals_per_day.\'" align="center"\';
+
+ // highlight saturdays
and sundays using bgcolor
+ // FIXME: what about
holidays?
+ //
+ $dow =
$GLOBALS[\'phpgw\']->datetime->day_of_week($y,$m,$d);
+ if ($dow == 0 || $dow
== 6)
+ {
+
$hdr[2][\'.\'.$index] .= \'" bgcolor=\';
+
$hdr[2][\'.\'.$index] .= $dow == 0 ? \'"#ff8866"\' : \'"#ffcccc"\';
+ }
+
$hdr[2][$index] = \'<a
href="\'.$this->planner_html->link(\'/index.php\',
array(
***************
*** 2202,2206 ****
$page_ =
explode('.',$this->bo->prefs['calendar']['defaultcalendar']);
$_page = $page_[0];
! if ($_page=='index' || ($_page != 'day' &&
$_page != 'week' && $_page != 'month' && $_page != 'year' && $_page !=
'planner'))
{
$_page = 'month';
--- 2213,2222 ----
$page_ =
explode('.',$this->bo->prefs['calendar']['defaultcalendar']);
$_page = $page_[0];
!
! if ($_page=='planner_cat' ||
$_page=='planner_user')
! {
! $_page = 'planner';
! }
! elseif ($_page=='index' || ($_page != 'day' &&
$_page != 'week' && $_page != 'month' && $_page != 'year' && $_page !=
'planner'))
{
$_page = 'month';
***************
*** 2239,2243 ****
function footer()
{
! list(,,$method) =
explode('.',$GLOBALS['HTTP_GET_VARS']['menuaction']);
if (@$this->bo->printer_friendly)
--- 2255,2260 ----
function footer()
{
! $menuaction = $GLOBALS['HTTP_GET_VARS']['menuaction'];
! list(,,$method) = explode('.',$menuaction);
if (@$this->bo->printer_friendly)
***************
*** 2278,2285 ****
--- 2295,2305 ----
}
+ $hidden_vars = ' <input type="hidden" name="from"
value="'.$menuaction.'">'."\n";
+
$var = Array(
'action_url' => $this->page($method,''),
'form_name' => 'SelectMonth',
'label' => lang('Month'),
+ 'hidden_vars' => $hidden_vars,
'form_label' => 'date',
'form_onchange' =>
'document.SelectMonth.submit()',
***************
*** 2289,2293 ****
$this->output_template_array($p,'table_row','footer_row',$var);
! if($GLOBALS['HTTP_GET_VARS']['menuaction'] ==
'calendar.uicalendar.week')
{
unset($thisdate);
--- 2309,2313 ----
$this->output_template_array($p,'table_row','footer_row',$var);
! if($menuaction == 'calendar.uicalendar.week')
{
unset($thisdate);
***************
*** 2309,2312 ****
--- 2329,2333 ----
'form_name' => 'SelectWeek',
'label' => lang('Week'),
+ 'hidden_vars' => $hidden_vars,
'form_label' => 'date',
'form_onchange' =>
'document.SelectWeek.submit()',
***************
*** 2328,2331 ****
--- 2349,2353 ----
'form_name' => 'SelectYear',
'label' => lang('Year'),
+ 'hidden_vars' => $hidden_vars,
'form_label' => 'year',
'form_onchange' =>
'document.SelectYear.submit()',
***************
*** 2335,2339 ****
$this->output_template_array($p,'table_row','footer_row',$var);
! if($GLOBALS['HTTP_GET_VARS']['menuaction'] ==
'calendar.uicalendar.planner')
{
$str = '';
--- 2357,2361 ----
$this->output_template_array($p,'table_row','footer_row',$var);
! if($menuaction == 'calendar.uicalendar.planner')
{
$str = '';
***************
*** 2353,2361 ****
}
$var = Array(
'action_url' =>
$this->page($method,''),
'form_name' =>
'SelectNumberOfMonths',
'label' => lang('Number of
Months'),
! 'hidden_vars' => $date_str,
'form_label' => 'num_months',
'form_onchange' =>
'document.SelectNumberOfMonths.submit()',
--- 2375,2385 ----
}
+ $hidden_vars .= $date_str;
+
$var = Array(
'action_url' =>
$this->page($method,''),
'form_name' =>
'SelectNumberOfMonths',
'label' => lang('Number of
Months'),
! 'hidden_vars' => $hidden_vars,
'form_label' => 'num_months',
'form_onchange' =>
'document.SelectNumberOfMonths.submit()',
***************
*** 2410,2414 ****
function no_edit()
{
! if(!$isset($GLOBALS['phpgw_info']['flags']['noheader']))
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
--- 2434,2438 ----
function no_edit()
{
! if(!isset($GLOBALS['phpgw_info']['flags']['noheader']))
{
unset($GLOBALS['phpgw_info']['flags']['noheader']);
Index: class.uipreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uipreferences.inc.php,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -C2 -r1.2.2.3 -r1.2.2.4
*** class.uipreferences.inc.php 17 Sep 2002 02:24:44 -0000 1.2.2.3
--- class.uipreferences.inc.php 19 Sep 2002 23:45:04 -0000 1.2.2.4
***************
*** 106,110 ****
}
$str = '<select name="prefs[defaultcalendar]">'
! . '<option
value="planner"'.$selected['planner'].'>'.lang('Planner').'</option>'
. '<option
value="year"'.$selected['year'].'>'.lang('Yearly').'</option>'
. '<option
value="month"'.$selected['month'].'>'.lang('Monthly').'</option>'
--- 106,111 ----
}
$str = '<select name="prefs[defaultcalendar]">'
! . '<option
value="planner_cat"'.$selected['planner_cat'].'>'.lang('Planner by
category').'</option>'
! . '<option
value="planner_user"'.$selected['planner_user'].'>'.lang('Planner by
user').'</option>'
. '<option
value="year"'.$selected['year'].'>'.lang('Yearly').'</option>'
. '<option
value="month"'.$selected['month'].'>'.lang('Monthly').'</option>'
***************
*** 114,117 ****
--- 115,127 ----
$this->display_item(lang('default calendar view'),$str);
+ $user = $GLOBALS['phpgw_info']['user']['account_id'];
+ $groups =
$GLOBALS['phpgw']->accounts->membership($user);
+ $str = '<option
value="-1"'.(intval($this->bo->prefs['calendar']['planner_start_with__group'])==-1?'
selected':'').'>none</option>'."\n";
+ while (list($key,$group) = each($groups))
+ {
+ $str .= '<option
value="'.$key.'"'.(intval($this->bo->prefs['calendar']['planner_start_with_group'])==$key?'
selected':'').'>'.$GLOBALS['phpgw']->common->grab_owner_name($group['account_id']).'</option>'."\n";
+ }
+ $this->display_item(lang('Preselected group for
entering the planner'),'<select
name="prefs[planner_start_with_group]">'."\n".$str.'</select>'."\n");
+
$selected = array();
$selected[$this->bo->prefs['calendar']['defaultfilter']] = ' selected';
***************
*** 192,194 ****
$this->output_template_array('row','pref_list',$var);
}
! }
\ No newline at end of file
--- 202,204 ----
$this->output_template_array('row','pref_list',$var);
}
! }
Index: class.bopreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bopreferences.inc.php,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -C2 -r1.2.2.1 -r1.2.2.2
*** class.bopreferences.inc.php 17 Sep 2002 02:24:44 -0000 1.2.2.1
--- class.bopreferences.inc.php 19 Sep 2002 23:45:04 -0000 1.2.2.2
***************
*** 42,45 ****
--- 42,46 ----
$GLOBALS['phpgw']->preferences->add('calendar','interval',intval($GLOBALS['HTTP_POST_VARS']['prefs']['interval']));
$GLOBALS['phpgw']->preferences->add('calendar','planner_intervals_per_day',intval($GLOBALS['HTTP_POST_VARS']['prefs']['planner_intervals_per_day']));
+
$GLOBALS['phpgw']->preferences->add('calendar','planner_start_with_group',intval($GLOBALS['HTTP_POST_VARS']['prefs']['planner_start_with_group']));
if
($GLOBALS['HTTP_POST_VARS']['prefs']['mainscreen_showevents'] == True)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.14,1.71.2.15 class.uicalendar.inc.php,1.66.2.23,1.66.2.24 class.uipreferences.inc.php,1.2.2.3,1.2.2.4 class.bopreferences.inc.php,1.2.2.1,1.2.2.2,
Mark A Peters <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: property add_workorder.php,1.5,1.6 index.php,1.3,1.4 list_property_value.php,1.2,1.3 search_tenant.php,1.1.1.1,1.2 add_project.php,1.1,1.2 edit_project.php,1.1,1.2 list_project.php,1.1,1.2
- Next by Date:
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.82,1.83 class.uicalendar.inc.php,1.85,1.86 class.uipreferences.inc.php,1.5,1.6 class.bopreferences.inc.php,1.4,1.5
- Previous by thread:
[Phpgroupware-cvs] CVS: property add_workorder.php,1.5,1.6 index.php,1.3,1.4 list_property_value.php,1.2,1.3 search_tenant.php,1.1.1.1,1.2 add_project.php,1.1,1.2 edit_project.php,1.1,1.2 list_project.php,1.1,1.2
- Next by thread:
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.82,1.83 class.uicalendar.inc.php,1.85,1.86 class.uipreferences.inc.php,1.5,1.6 class.bopreferences.inc.php,1.4,1.5
- Index(es):