phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.73,1.74


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.73,1.74 class.uipreferences.inc.php,1.3,1.4 class.bopreferences.inc.php,1.2,1.3
Date: Wed, 17 Apr 2002 19:43:32 -0400

Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv30617/calendar/inc

Modified Files:
        class.uicalendar.inc.php class.uipreferences.inc.php 
        class.bopreferences.inc.php 
Log Message:
Added GNU Feature Request #100744.

Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -r1.73 -r1.74
*** class.uicalendar.inc.php    17 Apr 2002 00:42:53 -0000      1.73
--- class.uicalendar.inc.php    17 Apr 2002 23:43:29 -0000      1.74
***************
*** 207,211 ****
                        {
                                $var = Array(
!                                       'dayname'       => '<b>' . 
substr(lang($this->datetime->days[$i]),0,2) . '</b>',
                                        'day_image'     => ''
                                );
--- 207,211 ----
                        {
                                $var = Array(
!                                       'dayname'       => '<b>' . 
substr(lang($this->datetime->days[$i]['name']),0,2) . '</b>',
                                        'day_image'     => ''
                                );
***************
*** 374,383 ****
                function week()
                {
-                       if (!$this->bo->printer_friendly)
-                       {
-                               
unset($GLOBALS['phpgw_info']['flags']['noheader']);
-                               
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
-                               $GLOBALS['phpgw']->common->phpgw_header();
-                       }
                        echo $this->printer_friendly($this->get_week());
                }
--- 374,377 ----
***************
*** 547,560 ****
                function year()
                {
-                       if(!$this->bo->printer_friendly)
-                       {
-                               
unset($GLOBALS['phpgw_info']['flags']['noheader']);
-                               
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
-                               $GLOBALS['phpgw']->common->phpgw_header();
-                       }
-                       else
-                       {
-                               $GLOBALS['phpgw_info']['flags']['nofooter'] = 
True;
-                       }
                        echo $this->printer_friendly($this->get_year());
                }
--- 541,544 ----
***************
*** 1157,1163 ****
                        if (!$this->bo->printer_friendly)
                        {
-                               
unset($GLOBALS['phpgw_info']['flags']['noheader']);
-                               
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
-                               $GLOBALS['phpgw']->common->phpgw_header();
                                $printer = '';
                                $param = 
'&date='.sprintf("%04d%02d%02d",$this->bo->year,$this->bo->month,$this->bo->day).'&friendly=1';
--- 1141,1144 ----
***************
*** 1964,1972 ****
                                . '  A.minicalgreyhol { background: 
'.$this->holiday_color.'; color: #999999; font: xx-small 
'.$this->theme['font'].' }'."\n"
                                . '  A.bminicalgreyhol { background: 
'.$this->holiday_color.'; color: #999999; font: italic bold xx-small 
'.$this->theme['font'].' }'."\n"
!                               . '  .event-on { background: 
'.$this->theme['row_on'].'; color: '.$this->theme['bg_text'].'; font: 100 
80%/110% '.$this->theme['font'].'; vertical-align: middle; }'."\n"
!                               . '  .event-off { background: 
'.$this->theme['row_off'].'; color: '.$this->theme['bg_text'].'; font: 100 
80%/110% '.$this->theme['font'].'; vertical-align: middle; }'."\n"
!                               . '  .event-holiday { background: 
'.$this->theme['bg04'].'; color: '.$this->theme['bg_text'].'; font: 100 
80%/110% '.$this->theme['font'].'; vertical-align: middle; }'."\n"
                                . '  .time { background: 
'.$this->theme['navbar_bg'].'; color: '.$this->theme['bg_text'].'; font: 
65%/100% '.$this->theme['font'].'; width: '.$time_width.'%; border: 1px 
'.$this->theme['navbar_text'].'; vertical-align: middle; }'."\n"
!                               . '  .tablecell { width: 80px; height: 80px 
}'."\n";
                }
  
--- 1945,1953 ----
                                . '  A.minicalgreyhol { background: 
'.$this->holiday_color.'; color: #999999; font: xx-small 
'.$this->theme['font'].' }'."\n"
                                . '  A.bminicalgreyhol { background: 
'.$this->holiday_color.'; color: #999999; font: italic bold xx-small 
'.$this->theme['font'].' }'."\n"
!                               . '  .event-on { background: 
'.$this->theme['row_on'].'; color: '.$this->theme['bg_text'].'; font: 100 
80%/110% '.$this->theme['font'].'; vertical-align: middle }'."\n"
!                               . '  .event-off { background: 
'.$this->theme['row_off'].'; color: '.$this->theme['bg_text'].'; font: 100 
80%/110% '.$this->theme['font'].'; vertical-align: middle }'."\n"
!                               . '  .event-holiday { background: 
'.$this->theme['bg04'].'; color: '.$this->theme['bg_text'].'; font: 100 
80%/110% '.$this->theme['font'].'; vertical-align: middle }'."\n"
                                . '  .time { background: 
'.$this->theme['navbar_bg'].'; color: '.$this->theme['bg_text'].'; font: 
65%/100% '.$this->theme['font'].'; width: '.$time_width.'%; border: 1px 
'.$this->theme['navbar_text'].'; vertical-align: middle; }'."\n"
!                               . '  .tablecell { width: 80px; height: 80px }';
                }
  
***************
*** 2157,2161 ****
                        for($i=0;$i<count($overlapping_events);$i++)
                        {
!                               $overlapped_event = 
$this->bo->read_entry($overlapping_events[$i])
                                $overlap .= '<li> 
['.$GLOBALS['phpgw']->common->grab_owner_name($overlapped_event['owner']).'] 
'.$this->link_to_entry($overlapped_event,$month,$mday,$year);
                        }
--- 2138,2142 ----
                        for($i=0;$i<count($overlapping_events);$i++)
                        {
!                               $overlapped_event = 
$this->bo->read_entry($overlapping_events[$i]);
                                $overlap .= '<li> 
['.$GLOBALS['phpgw']->common->grab_owner_name($overlapped_event['owner']).'] 
'.$this->link_to_entry($overlapped_event,$month,$mday,$year);
                        }
***************
*** 2281,2285 ****
                        }
                        $p->set_var($var);
!               
                        $p->set_var('col_width','14');
                        if($display_name == True)
--- 2262,2267 ----
                        }
                        $p->set_var($var);
! 
!                       $col_width = 14;
                        $p->set_var('col_width','14');
                        if($display_name == True)
***************
*** 2287,2297 ****
                                $p->set_var('col_title',lang('name'));
                                $p->parse('column_header','column_title',True);
!                               $p->set_var('col_width','12');
                        }
  
                        for($i=0;$i<7;$i++)
                        {
!                               
$p->set_var('col_title',lang($this->datetime->days[$i]));
!                               $p->parse('column_header','column_title',True);
                        }
                        return $p->fp('out','monthly_header');
--- 2269,2297 ----
                                $p->set_var('col_title',lang('name'));
                                $p->parse('column_header','column_title',True);
!                               $col_width = 12;
!                       }
! 
!                       if($this->datetime->days[$i]['weekday'])
!                       {
!                               switch($col_width)
!                               {
!                                       case 12:
!                                               $col_width = 16;
!                                               break;
!                                       case 14:
!                                               $col_width = 20;
!                                               break;
!                               }
                        }
+                       
+                       $p->set_var('col_width',$col_width);
  
                        for($i=0;$i<7;$i++)
                        {
!                               
if($this->bo->prefs['calendar']['weekdays_only'] && 
$this->datetime->days[$i]['weekday'])
!                               {
!                                       
$p->set_var('col_title',lang($this->datetime->days[$i]['name']));
!                                       
$p->parse('column_header','column_title',True);
!                               }
                        }
                        return $p->fp('out','monthly_header');
***************
*** 2300,2304 ****
                function 
display_week($startdate,$weekly,$cellcolor,$display_name = 
False,$owner=0,$monthstart=0,$monthend=0)
                {
!                       if($owner == 0) { $owner = 
$GLOBALS['phpgw_info']['user']['account_id']; }
  
                        $temp_owner = $this->bo->owner;
--- 2300,2307 ----
                function 
display_week($startdate,$weekly,$cellcolor,$display_name = 
False,$owner=0,$monthstart=0,$monthend=0)
                {
!                       if($owner == 0)
!                       {
!                               $owner = 
$GLOBALS['phpgw_info']['user']['account_id'];
!                       }
  
                        $temp_owner = $this->bo->owner;
***************
*** 2337,2340 ****
--- 2340,2348 ----
                                $month = intval(substr($date,4,2));
                                $day = intval(substr($date,6,2));
+                               $dow = 
$this->datetime->day_of_week($year,$month,$day);
+                               
if($this->bo->prefs['calendar']['weekdays_only'] && ($dow == 0 || $dow == 6))
+                               {
+                                       continue;
+                               }
                                $var = Array(
                                        'column_data'   => '',
***************
*** 2515,2518 ****
--- 2523,2530 ----
                                $owners_array[0] = $owners;
                                $cols = 7;
+                       }
+                       if($this->bo->prefs['calendar']['weekdays_only'])
+                       {
+                               $cols -= 2;
                        }
                        $var = Array(

Index: class.uipreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uipreferences.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.uipreferences.inc.php 17 Apr 2002 01:34:08 -0000      1.3
--- class.uipreferences.inc.php 17 Apr 2002 23:43:29 -0000      1.4
***************
*** 145,157 ****
                        $this->display_item(lang('Display interval in Day 
View'),'<select name="prefs[interval]">'."\n".$str.'</select>'."\n");
  
!                       $this->display_item(lang('Send/receive updates via 
email'),'<input type="checkbox" name="prefs[send_updates]" 
value="True"'.(@$this->bo->prefs['calendar']['send_updates']?' 
checked':'').'>'."\n");
  
!                       $this->display_item(lang('Display status of 
events'),'<input type="checkbox" name="prefs[display_status]" 
value="True"'.(@$this->bo->prefs['calendar']['display_status']?' 
checked':'').'>'."\n");
! 
!                       $this->display_item(lang('When creating new events 
default set to private'),'<input type="checkbox" name="prefs[default_private]" 
value="True"'.(@$this->bo->prefs['calendar']['default_private']?' 
checked':'').'>'."\n");
! 
!                       $this->display_item(lang('Display mini calendars when 
printing'),'<input type="checkbox" name="prefs[display_minicals]" 
value="True"'.(@$this->bo->prefs['calendar']['display_minicals']?' 
checked':'').'>'."\n");
! 
!                       $this->display_item(lang('Print calendars in black & 
white'),'<input type="checkbox" name="prefs[print_black_white]" 
value="True"'.(@$this->bo->prefs['calendar']['print_black_white']?' 
checked':'').'>'."\n");
  
                        $this->template->pparse('out','pref');
--- 145,161 ----
                        $this->display_item(lang('Display interval in Day 
View'),'<select name="prefs[interval]">'."\n".$str.'</select>'."\n");
  
!                       $checkboxes = Array(
!                               'send_updates'  => lang('Send/receive updates 
via email'),
!                               'weekdays_only' => lang('Display week days only 
in Month/Week View'),
!                               'display_status'        => lang('Display status 
of events'),
!                               'default_private'       => lang('When creating 
new events default set to private'),
!                               'display_minicals'      => lang('Display mini 
calendars when printing'),
!                               'print_black_white'     => lang('Print 
calendars in black & white')
!                       );
  
!                       while(list($pref_var,$desc) = each($checkboxes))
!                       {
!                               $this->display_item($desc,'<input 
type="checkbox" name="prefs['.$pref_var.']" 
value="True"'.(@$this->bo->prefs['calendar'][$pref_var]?' 
checked':'').'>'."\n");
!                       }
  
                        $this->template->pparse('out','pref');

Index: class.bopreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bopreferences.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.bopreferences.inc.php 6 Nov 2001 01:49:16 -0000       1.2
--- class.bopreferences.inc.php 17 Apr 2002 23:43:29 -0000      1.3
***************
*** 35,95 ****
                        {
                                
$GLOBALS['phpgw']->preferences->read_repository();
!                               
$GLOBALS['phpgw']->preferences->add('calendar','weekdaystarts',$GLOBALS['HTTP_POST_VARS']['prefs']['weekdaystarts']);
!                               
$GLOBALS['phpgw']->preferences->add('calendar','workdaystarts',intval($GLOBALS['HTTP_POST_VARS']['prefs']['workdaystarts']));
!                               
$GLOBALS['phpgw']->preferences->add('calendar','workdayends',intval($GLOBALS['HTTP_POST_VARS']['prefs']['workdayends']));
!                               
$GLOBALS['phpgw']->preferences->add('calendar','defaultcalendar',$GLOBALS['HTTP_POST_VARS']['prefs']['defaultcalendar']);
!                               
$GLOBALS['phpgw']->preferences->add('calendar','defaultfilter',$GLOBALS['HTTP_POST_VARS']['prefs']['defaultfilter']);
!                               
$GLOBALS['phpgw']->preferences->add('calendar','interval',intval($GLOBALS['HTTP_POST_VARS']['prefs']['interval']));
!                               if 
($GLOBALS['HTTP_POST_VARS']['prefs']['mainscreen_showevents'] == True)
!                               {
!                                       
$GLOBALS['phpgw']->preferences->add('calendar','mainscreen_showevents',$GLOBALS['HTTP_POST_VARS']['prefs']['mainscreen_showevents']);
!                               }
!                               else
!                               {
!                                       
$GLOBALS['phpgw']->preferences->delete('calendar','mainscreen_showevents');
!                               }
!                               if 
($GLOBALS['HTTP_POST_VARS']['prefs']['send_updates'] == True)
!                               {
!                                       
$GLOBALS['phpgw']->preferences->add('calendar','send_updates',$GLOBALS['HTTP_POST_VARS']['prefs']['send_updates']);
!                               }
!                               else
!                               {
!                                       
$GLOBALS['phpgw']->preferences->delete('calendar','send_updates');
!                               }
!               
!                               if 
($GLOBALS['HTTP_POST_VARS']['prefs']['display_status'] == True)
!                               {
!                                       
$GLOBALS['phpgw']->preferences->add('calendar','display_status',$GLOBALS['HTTP_POST_VARS']['prefs']['display_status']);
!                               }
!                               else
!                               {
!                                       
$GLOBALS['phpgw']->preferences->delete('calendar','display_status');
!                               }
! 
!                               if 
($GLOBALS['HTTP_POST_VARS']['prefs']['default_private'] == True)
!                               {
!                                       
$GLOBALS['phpgw']->preferences->add('calendar','default_private',$GLOBALS['HTTP_POST_VARS']['prefs']['default_private']);
!                               }
!                               else
!                               {
!                                       
$GLOBALS['phpgw']->preferences->delete('calendar','default_private');
!                               }
! 
!                               if 
($GLOBALS['HTTP_POST_VARS']['prefs']['display_minicals'] == True)
!                               {
!                                       
$GLOBALS['phpgw']->preferences->add('calendar','display_minicals',$GLOBALS['HTTP_POST_VARS']['prefs']['display_minicals']);
!                               }
!                               else
!                               {
!                                       
$GLOBALS['phpgw']->preferences->delete('calendar','display_minicals');
!                               }
! 
!                               if 
($GLOBALS['HTTP_POST_VARS']['prefs']['print_black_white'] == True)
!                               {
!                                       
$GLOBALS['phpgw']->preferences->add('calendar','print_black_white',$GLOBALS['HTTP_POST_VARS']['prefs']['print_black_white']);
!                               }
!                               else
!                               {
!                                       
$GLOBALS['phpgw']->preferences->delete('calendar','print_black_white');
                                }
  
--- 35,73 ----
                        {
                                
$GLOBALS['phpgw']->preferences->read_repository();
!                               
!                               $pref_list = Array(
!                                       'weekdaystarts',
!                                       'workdaystarts',
!                                       'workdayends',
!                                       'defaultcalendar',
!                                       'defaultfilter',
!                                       'interval'
!                               );
! 
!                               for($i=0;$i<count($pref_list);$i++)
!                               {
!                                       
$GLOBALS['phpgw']->preferences->add('calendar',$pref_list[$i],$GLOBALS['HTTP_POST_VARS']['prefs'][$pref_list[$i]]);
!                               }
! 
!                               $pref_list = Array(
!                                       'mainscreen_showevents',
!                                       'send_updates',
!                                       'display_status',
!                                       'default_private',
!                                       'display_minicals',
!                                       'print_black_white',
!                                       'weekdays_only'
!                               );
! 
!                               for($i=0;$i<count($pref_list);$i++)
!                               {
!                                       if 
($GLOBALS['HTTP_POST_VARS']['prefs'][$pref_list[$i]] == True)
!                                       {
!                                               
$GLOBALS['phpgw']->preferences->add('calendar',$pref_list[$i],$GLOBALS['HTTP_POST_VARS']['prefs'][$pref_list[$i]]);
!                                       }
!                                       else
!                                       {
!                                               
$GLOBALS['phpgw']->preferences->delete('calendar',$pref_list[$i]);
!                                       }
                                }
  
***************
*** 101,103 ****
                }
        }
! 
--- 79,81 ----
                }
        }
! ?>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]