Imported the new calendar from the ralfbecker branch and merged it with the bugfixes and improvments of the 1.0 branch.

All further development will be done now in HEAD
This commit is contained in:
Ralf Becker 2004-08-01 15:36:04 +00:00
parent 68a85e496f
commit 700c20b802
21 changed files with 2960 additions and 125 deletions

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,14 @@
/* $Id$ */
/**
* Depricated BO class of the calendar app.
*
* Note: All new code should only access the bocal class and NOT this class !!!
*
* If you need a function not already available in bocal, please ask RalfBecker@outdoor-training.de
*/
class bocalendar
{
var $public_functions = Array(
@ -234,7 +242,7 @@
$this->printer_friendly = ((int)$friendly == 1?True:False);
if(isset($_POST['filter'])) { $this->filter = $_POST['filter']; }
if(isset($_POST['sortby'])) { $this->sortby = $_POST['sortby']; }
if(isset($_REQUEST['sortby'])) { $this->sortby = $_REQUEST['sortby']; }
if(isset($_POST['cat_id'])) { $this->cat_id = $_POST['cat_id']; }
if(!isset($this->filter))
@ -1249,7 +1257,11 @@
{
if (!is_object($this->jscal))
{
$this->jscal = CreateObject('phpgwapi.jscalendar');
if (!is_object($GLOBALS['phpgw']->jscalendar))
{
$GLOBALS['phpgw']->jscalendar = CreateObject('phpgwapi.jscalendar');
}
$this->jscal = &$GLOBALS['phpgw']->jscalendar;
}
$time_param += $this->jscal->input2date($time_param['str'],False,'mday');
unset($time_param['str']);
@ -1757,6 +1769,10 @@
return $str;
}
/**
* Inserts $event in $this->cached_events, if its not already there, because of a recur-expection
* Note: It maintains the sorting after starttime in the cached_events !!!
*/
function sort_event($event,$date)
{
$inserted = False;
@ -1836,6 +1852,9 @@
}
}
/**
* Creates copies of each repeating event in $this->repeating_events in $this->cached_events (via sort_event)
*/
function check_repeating_events($datetime)
{
@reset($this->repeating_events);

View File

@ -28,7 +28,7 @@
var $filter;
var $cat_id;
function socalendar($param)
function socalendar($param=False)
{
$this->db = $GLOBALS['phpgw']->db;
if(!is_object($GLOBALS['phpgw']->datetime))
@ -75,11 +75,20 @@
//$extra .= ($this->cat_id?"AND phpgw_cal.category like '%".$this->cat_id."%' ":'');
if ($this->cat_id)
{
if (!is_object($GLOBALS['phpgw']->categories))
if (!is_array($this->cat_id) && !@$GLOBALS['phpgw_info']['user']['preferences']['common']['cats_no_subs'])
{
$GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories');
if (!is_object($GLOBALS['phpgw']->categories))
{
$GLOBALS['phpgw']->categories = CreateObject('phpgwapi.categories');
}
$cats = $GLOBALS['phpgw']->categories->return_all_children($this->cat_id);
}
$cats = $GLOBALS['phpgw']->categories->return_all_children($this->cat_id);
else
{
$cats = is_array($this->cat_id) ? $this->cat_id : array($this->cat_id);
}
array_walk($cats,create_function('&$val,$key','$val = (int) $val;'));
$extra .= "AND (phpgw_cal.category".(count($cats) > 1 ? ' IN ('.implode(',',$cats).')' : '='.(int)$this->cat_id);
foreach($cats as $cat)
{
@ -97,6 +106,12 @@
}
}
/**
* Returns the id's of all repeating events started after s{year,month,day} AND still running at e{year,month,day}
*
* The startdate of an repeating events is the regular event-startdate.
* Events are "still running" if no recur-enddate is set or its after e{year,month,day}
*/
function list_repeated_events($syear,$smonth,$sday,$eyear,$emonth,$eday,$owner_id=0)
{
if(!$owner_id)

View File

@ -52,6 +52,12 @@
$GLOBALS['phpgw']->html = CreateObject('phpgwapi.html');
}
$this->html = &$GLOBALS['phpgw']->html;
// jscalendar is needed by the new navigation-menu AND it need to be loaded befor the header !!!
if (!is_object($GLOBALS['phpgw']->jscalendar))
{
$GLOBALS['phpgw']->jscalendar = CreateObject('phpgwapi.jscalendar');
}
}
function prep_page()

View File

@ -0,0 +1,481 @@
<?php
/**************************************************************************\
* eGroupWare - Calendar - shared base-class of all calendar UserInterfaces *
* http://www.egroupware.org *
* Written and (c) 2004 by Ralf Becker <RalfBecker@outdoor-training.de> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
/**
* shared base-class of all calendar UserInterfaces
*
* It manages eg. the state of the controls in the UI and generated the calendar navigation (sidebox-menu)
*
* @package calendar
* @author RalfBecker@outdoor-training.de
* @license GPL
*/
class uical
{
/**
* @var $debug mixed integer level or string function-name
*/
var $debug=False;
/**
* @var $bo class bocal
*/
var $bo;
/**
* Constructor
*/
function uical()
{
foreach(array(
'bo' => 'calendar.bocal',
'jscal' => 'phpgwapi.jscalendar', // for the sidebox-menu
'html' => 'phpgwapi.html',
'datetime' => 'phpgwapi.datetime',
'cats' => 'phpgwapi.categories',
'accountsel' => 'phpgwapi.uiaccountsel',
) as $my => $app_class)
{
list(,$class) = explode('.',$app_class);
if (!is_object($GLOBALS['phpgw']->$class))
{
$GLOBALS['phpgw']->$class = CreateObject($app_class);
}
$this->$my = &$GLOBALS['phpgw']->$class;
}
$this->common_prefs = &$GLOBALS['phpgw_info']['user']['preferences']['common'];
$this->cal_prefs = &$GLOBALS['phpgw_info']['user']['preferences']['calendar'];
$this->wd_start = 60*$this->cal_prefs['workdaystarts'];
$this->wd_end = 60*$this->cal_prefs['workdayends'];
$this->interval_m = $this->cal_prefs['interval'];
$this->user = $GLOBALS['phpgw_info']['user']['account_id'];
$this->manage_states();
$GLOBALS['uical'] = &$this; // make us available for ExecMethod, else it creates a new instance
// calendar does not work with hidden sidebox atm.
unset($GLOBALS['phpgw_info']['user']['preferences']['common']['auto_hide_sidebox']);
}
/**
* Manages the states of certain controls in the UI: date shown, category selected, ...
*
* The state of all these controls is updated if they are set in $_REQUEST or $set_states and saved in the session.
* The following states are used:
* - date or year, month, day: the actual date of the period displayed
* - cat_id: the selected category
* - owner: the owner of the displayed calendar
* - save_owner: the overriden owner of the planner
* - filter: the used filter: no filter / all or only privat
* - num_month: number of month shown in the planner
* - sortby: category or user of planner
* - return_to: the view the dialogs should return to
* @param set_states array to manualy set / change one of the states, default NULL = use $_REQUEST
*/
function manage_states($set_states=NULL)
{
$states = $states_session = $GLOBALS['phpgw']->session->appsession('session_data','calendar');
if (is_null($set_states))
{
$set_states = $_REQUEST;
}
if (!$states['date'] && $states['year'] && $states['month'] && $states['day'])
{
$states['date'] = $this->bo->date2string($states);
}
foreach(array(
'date' => $this->bo->date2string($this->bo->now_su),
'cat_id' => 0,
'filter' => 'all',
'owner' => $this->user,
'num_month' => 1,
'save_owner' => 0,
'sortby' => 'category',
'multiple' => 0,
) as $state => $default)
{
if (isset($set_states[$state]))
{
$states[$state] = $set_states[$state];
}
elseif (!is_array($states) || !isset($states[$state]))
{
$states[$state] = $default;
}
if ($state == 'date')
{
$date_arr = $this->bo->date2array($states['date']);
foreach(array('year','month','day') as $name)
{
$this->$name = $states[$name] = $date_arr[$name];
}
}
$this->$state = $states[$state];
}
// set the actual view as return_to
list($app,$class,$func) = explode('.',$_GET['menuaction']);
if ($class == 'uiviews' && $func)
{
$states['return_to'] = $_GET['menuaction'];
}
// deal with group-owners
if (substr($this->owner,0,2) == 'g_' || $GLOBALS['phpgw']->accounts->get_type($this->owner) == 'g')
{
$this->set_owner_to_group($this->owner);
$states['owner'] = $this->owner;
}
$states['multiple'] = $this->multiple = $_GET['multiple'] || count(explode(',',$this->owner)) > 1;
if ($this->debug > 0 || $this->debug == 'menage_states') $this->bo->debug_message('uical::manage_states(%1) session was %2, states now %3, is_group=%4, g_owner=%5',True,$set_states,$states_session,$states,$this->is_group,$this->g_owner);
// save the states in the session
$GLOBALS['phpgw']->session->appsession('session_data','calendar',$states);
}
/**
* Sets a group as owner (of the events to show)
*
* It set $this->is_group and $this->g_owner - array with user-id's of the group-members who gave read-grants
* @param group-id or 'g_'+group-id
*/
function set_owner_to_group($owner)
{
$this->owner = (int) (substr($owner,0,2) == 'g_' ? substr($owner,2) : $owner);
$this->is_group = True;
$this->g_owner = Array();
$members = $GLOBALS['phpgw']->accounts->member($this->owner);
if (is_array($members))
{
foreach($members as $user)
{
// use only members which gave the user a read-grant
if ($this->bo->check_perms(PHPGW_ACL_READ,0,$user['account_id']))
{
$this->g_owner[] = $user['account_id'];
}
}
}
if ($this->debug > 2 || $this->debug == 'set_owner_to_group') $this->bo->debug_message('uical::set_owner_to_group(%1): owner=%2, g_owner=%3',True,$owner,$this->owner,$this->g_owner);
}
/**
* gets the icons displayed for a given event
*
* @param $event array
* @return array of 'img' / 'title' pairs
*/
function event_icons($event)
{
$is_private = !$event['public'] && !$this->bo->check_perms(PHPGW_ACL_READ,$event);
$viewable = !$this->bo->printer_friendly && $this->bo->check_perms(PHPGW_ACL_READ,$event);
if (!$is_private)
{
if($event['priority'] == 3)
{
$icons[] = $this->html->image('calendar','high',lang('high priority'));
}
if($event['recur_type'] == MCAL_RECUR_NONE)
{
//$icons[] = $this->html->image('calendar','circle',lang('single event'));
}
else
{
$icons[] = $this->html->image('calendar','recur',lang('recurring event'));
}
$icons[] = $this->html->image('calendar',count($event['participants']) > 1 ? 'multi_3' : 'single',
implode(",\n",$this->bo->participants($event['participants'])));
}
if($event['public'] == 0)
{
$icons[] = $this->html->image('calendar','private',lang('private'));
}
if(isset($event['alarm']) && count($event['alarm']) >= 1 && !$is_private)
{
$icons[] = $this->html->image('calendar','alarm',lang('alarm'));
}
return $icons;
}
/**
* Create a select-box item in the sidebox-menu
* @privat used only by sidebox_menu !
*/
function _select_box($title,$name,$options,$baseurl='')
{
if ($baseurl) // we append the value to the baseurl
{
$baseurl .= strstr($baseurl,'?') === False ? '?' : '&';
$onchange="location='$baseurl'+this.value;";
}
else // we add $name=value to the actual location
{
$onchange="location=location+(location.search.length ? '&' : '?')+'".$name."='+this.value;";
}
$select = ' <select style="width: 100%;" name="'.$name.'" onchange="'.$onchange.'" title="'.
lang('Select a %1',lang($title)).'">'.
$options."</select>\n";
return array(
'text' => $select,
'no_lang' => True,
'link' => False
);
}
/**
* creates the content for the sidebox-menu, called as hook
*/
function sidebox_menu()
{
$base_hidden_vars = $link_vars = array();
if (@$_POST['keywords'])
{
$base_hidden_vars['keywords'] = $_POST['keywords'];
}
$n = 0; // index for file-array
// Toolbar with the views
$views = '<table style="width: 100%;"><tr>'."\n";
foreach(array(
'add' => array('icon'=>'new3','text'=>'add','menuaction'=>'calendar.uicalendar.add'),
'day' => array('icon'=>'today','text'=>'Today','menuaction' => 'calendar.uiviews.day'),
'week' => array('icon'=>'week','text'=>'This week','menuaction' => 'calendar.uiviews.week'),
'month' => array('icon'=>'month','text'=>'This month','menuaction' => 'calendar.uiviews.month'),
'year' => array('icon'=>'year','text'=>'This year','menuaction' => 'calendar.uicalendar.year'),
'planner' => array('icon'=>'planner','text'=>'Group Planner','menuaction' => 'calendar.uicalendar.planner'),
'matrixselect' => array('icon'=>'view','text'=>'Daily Matrix View','menuaction' => 'calendar.uicalendar.matrixselect'),
) as $view => $data)
{
$vars = $link_vars;
$vars['menuaction'] = $data['menuaction'];
if ($view == 'day')
{
$vars['date'] = $this->bo->date2string($this->bo->now_su); // go to today
}
$views .= '<td align="center"><a href="'.$GLOBALS['phpgw']->link('/index.php',$vars).'"><img src="'.
$GLOBALS['phpgw']->common->find_image('calendar',$data['icon']).
'" title="'.lang($data['text']).'"></a></td>'."\n";
}
$views .= "</tr></table>\n";
$file[++$n] = array('text' => $views,'no_lang' => True,'link' => False,'icon' => False);
// special views and view-options menu
$options = '';
foreach(array(
array(
'text' => lang('select one'),
'value' => '',
'selected' => False,
),
array(
'text' => lang('dayview'),
'value' => 'menuaction=calendar.uiviews.day',
'selected' => $_GET['menuaction'] == 'calendar.uiviews.day' && $_GET['days'] != 2,
),
/*array(
'text' => lang('two dayview'),
'value' => 'menuaction=calendar.uiviews.week&days=2',
'selected' => $_GET['menuaction'] == 'calendar.uiviews.day' && $_GET['days'] == 2,
),*/
array(
'text' => lang('weekview'),
'value' => 'menuaction=calendar.uiviews.week&days=7',
'selected' => $_GET['menuaction'] == 'calendar.uiviews.week' && $this->cal_prefs['days_in_weekview'] != 5,
),
array(
'text' => lang('weekview without weekend'),
'value' => 'menuaction=calendar.uiviews.week&days=5',
'selected' => $_GET['menuaction'] == 'calendar.uiviews.week' && $this->cal_prefs['days_in_weekview'] == 5,
),
array(
'text' => lang('monthview'),
'value' => 'menuaction=calendar.uiviews.month',
'selected' => $_GET['menuaction'] == 'calendar.uiviews.month',
),
array(
'text' => lang('yearview'),
'value' => 'menuaction=calendar.uicalendar.year',
'selected' => $_GET['menuaction'] == 'calendar.uicalendar.year',
),
array(
'text' => lang('planner by category'),
'value' => 'menuaction=calendar.uicalendar.planner&sortby=category',
'selected' => $_GET['menuaction'] == 'calendar.uicalendar.planner' && $this->sort_by != 'user',
),
array(
'text' => lang('planner by user'),
'value' => 'menuaction=calendar.uicalendar.planner&sortby=user',
'selected' => $_GET['menuaction'] == 'calendar.uicalendar.planner' && $this->sort_by == 'user',
),
array(
'text' => lang('matrixview'),
'value' => 'menuaction=calendar.uicalendar.matrixselect',
'selected' => $_GET['menuaction'] == 'calendar.uicalendar.matrixselect' ||
$_GET['menuaction'] == 'calendar.uicalendar.viewmatrix',
),
) as $data)
{
$options .= '<option value="'.$data['value'].'"'.($data['selected'] ? ' selected="1"' : '').'>'.$this->html->htmlspecialchars($data['text'])."</option>\n";
}
$file[++$n] = $this->_select_box('displayed view','view',$options,$GLOBALS['phpgw']->link('/index.php'));
// Search
$blur = addslashes($this->html->htmlspecialchars(lang('Search').'...'));
$value = @$_POST['keywords'] ? $_POST['keywords'] : $blur;
$file[++$n] = array(
'text' => $this->html->form('<input name="keywords" value="'.$value.'" style="width: 100%;"'.
' onFocus="if(this.value==\''.$blur.'\') this.value=\'\';"'.
' onBlur="if(this.value==\'\') this.value=\''.$blur.'\';" title="'.lang('Search').'">',
$base_hidden_vars,'/index.php',array('menuaction'=>'calendar.uicalendar.search')),
'no_lang' => True,
'link' => False,
);
// Minicalendar
foreach(array(
'day'=>'calendar.uiviews.day',
'week'=>'calendar.uiviews.week',
'month'=>'calendar.uiviews.month') as $view => $menuaction)
{
$link_vars['menuaction'] = $view == 'month' && $_GET['menuaction'] == 'calendar.uicalendar.planner' ?
'calendar.uicalendar.planner' : $menuaction; // stay in the planner
unset($link_vars['date']); // gets set in jscal
$link[$view] = $GLOBALS['phpgw']->link('/index.php',$link_vars);
}
$jscalendar = $GLOBALS['phpgw']->jscalendar->flat($link['day'],$this->date,
$link['week'],lang('show this week'),$link['month'],lang('show this month'));
$file[++$n] = array('text' => $jscalendar,'no_lang' => True,'link' => False,'icon' => False);
// Category Selection
$file[++$n] = $this->_select_box('Category','cat_id',
'<option value="0">'.lang('All categories').'</option>'.
$this->cats->formated_list('select','all',$this->cat_id,'True'));
// we need a form for the select-boxes => insert it in the first selectbox
$file[$n]['text'] = $this->html->form(False,$base_hidden_vars,'/index.php',array('menuaction' => $_GET['menuaction'])) .
$file[$n]['text'];
// Filter all or private
if($this->bo->check_perms(PHPGW_ACL_PRIVATE,0,$this->owner))
{
$file[] = $this->_select_box('Filter','filter',
'<option value=" all "'.($this->filter==' all '?' selected="1"':'').'>'.lang('No filter').'</option>'."\n".
'<option value=" private "'.($this->filter==' private '?' selected="1"':'').'>'.lang('Private Only').'</option>'."\n");
}
// Calendarselection: User or Group
if(count($this->bo->grants) > 0 && (!isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) ||
!$GLOBALS['phpgw_info']['server']['deny_user_grants_access']))
{
$grants = array();
foreach($this->bo->list_cals() as $grant)
{
$grants[] = $grant['grantor'];
}
if ($this->multiple)
{
$file[] = array(
'text' => "
<script type=\"text/javascript\">
function load_cal(url,id) {
selectBox = document.getElementById(id);
owner='';
for(i=0; i < selectBox.length; ++i) {
if (selectBox.options[i].selected) {
owner += (owner ? ',' : '') + selectBox.options[i].value;
}
}
if (owner) {
location=url+'&owner='+owner;
}
}
</script>
".
$this->accountsel->selection('owner','uical_select_owner',$this->owner,'calendar+',3,False,
' style="width: 85%;" title="'.lang('select a %1',lang('user')).'"','',$grants).
$this->html->submit_button('go','>>',"load_cal('".$GLOBALS['phpgw']->link('/index.php',array(
'menuaction' => $_GET['menuaction'],
'date' => $this->date,
))."','uical_select_owner'); return false;",True,' title="'.lang('Go!').'"'),
'no_lang' => True,
'link' => False
);
}
else
{
$file[] = array(
'text' => $this->accountsel->selection('owner','uical_select_owner',$this->owner,'calendar+',0,False,
' style="width: 85%;" title="'.lang('select a %1',lang('user')).'"',
"location=location+(location.search.length ? '&' : '?')+'owner='+this.value;",$grants).
$this->html->a_href($this->html->image('phpgwapi','users',lang('show the calendar of multiple users')),array(
'menuaction' => $_GET['menuaction'],
'multiple' => 1,
'date' => $this->date,
)),
'no_lang' => True,
'link' => False
);
}
}
// Import & Export
$file['Export'] = $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.export');
$file['Import'] = $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiicalendar.import');
// we need to set the sidebox-width a bit wider, as idots.css sets it to 147, to small for the jscal
// setting it to auto, uses the smallest possible size, but IE kills the jscal if the width is set to auto !!!
echo '<style>
.divSidebox
{
width: '.($this->html->user_agent=='msie'?'180px':'auto').';
max-width: 180px;
}
</style>'."\n";
$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu');
display_sidebox($appname,$menu_title,$file);
echo "</form>\n";
if ($GLOBALS['phpgw_info']['user']['apps']['preferences'])
{
$menu_title = lang('Preferences');
$file = Array(
'Calendar preferences'=>$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=calendar'),
'Grant Access'=>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=calendar'),
'Edit Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=calendar&cats_level=True&global_cats=True'),
);
display_sidebox($appname,$menu_title,$file);
}
if ($GLOBALS['phpgw_info']['user']['apps']['admin'])
{
$menu_title = lang('Administration');
$file = Array(
'Configuration'=>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=calendar'),
'Custom Fields'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicustom_fields.index'),
'Holiday Management'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiholiday.admin'),
'Import CSV-File' => $GLOBALS['phpgw']->link('/calendar/csv_import.php'),
'Global Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=calendar'),
);
display_sidebox($appname,$menu_title,$file);
}
}
}

View File

@ -139,6 +139,13 @@
$GLOBALS['phpgw']->html = CreateObject('phpgwapi.html');
}
$this->html = &$GLOBALS['phpgw']->html;
// jscalendar is needed by the new navigation-menu AND it need to be loaded befor the header !!!
if (!is_object($GLOBALS['phpgw']->jscalendar))
{
$GLOBALS['phpgw']->jscalendar = CreateObject('phpgwapi.jscalendar');
}
$this->jscal = &$GLOBALS['phpgw']->jscalendar;
}
/* Public functions */
@ -2288,7 +2295,12 @@
{
$this->index();
}
$participants = $_POST['participants'];
$participants = get_var("participants", array("GET", "POST"));
$date["year"] = get_var("year", array("GET", "POST"));
$date["month"] = get_var("month", array("GET", "POST"));
$date["day"] = get_var("day", array("GET", "POST"));
$parts = Array();
$acct = CreateObject('phpgwapi.accounts',$this->bo->owner);
@ -2330,18 +2342,26 @@
if ($this->always_app_header) $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Matrixview');
$GLOBALS['phpgw']->common->phpgw_header();
switch($_POST['matrixtype'])
switch( get_var("matrixtype", array("GET", "POST")) )
{
case 'free/busy':
$freetime = $GLOBALS['phpgw']->datetime->gmtdate(mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year));
echo '<br>'.$this->timematrix(
Array(
'date' => $freetime,
'starttime' => $this->bo->splittime('000000',False),
'endtime' => 0,
'participants' => $parts
)
);
if( get_var("sevendays", array("GET", "POST")) )
{
$_f_daysend=7;
}
for($_f_days=0; $_f_days<=$_f_daysend; $_f_days++)
{
$freetime = $GLOBALS['phpgw']->datetime->gmtdate(mktime(0,0,0,$date["month"],( $date["day"] + $_f_days ),$date["year"]));
echo '<br>'.$this->timematrix(
Array(
'date' => $freetime,
'starttime' => $this->bo->splittime('000000',False),
'endtime' => 0,
'participants' => $parts
)
);
}
break;
case 'weekly':
echo '<br>'.$this->display_weekly(
@ -2355,10 +2375,10 @@
}
echo "\n<br>\n".'<form action="'.$this->page('viewmatrix').'" method="post" name="matrixform">'."\n";
echo ' <table cellpadding="5"><tr><td>'."\n";
echo ' <input type="hidden" name="year" value="'.$this->bo->year.'">'."\n";
echo ' <input type="hidden" name="month" value="'.$this->bo->month.'">'."\n";
echo ' <input type="hidden" name="day" value="'.$this->bo->day.'">'."\n";
echo ' <input type="hidden" name="matrixtype" value="'.$_POST['matrixtype'].'">'."\n";
echo ' <input type="hidden" name="year" value="'.$date["year"].'">'."\n";
echo ' <input type="hidden" name="month" value="'.$date["month"] .'">'."\n";
echo ' <input type="hidden" name="day" value="'.$date["day"].'">'."\n";
echo ' <input type="hidden" name="matrixtype" value="'.get_var("matrixtype", array("POST", "GET")).'">'."\n";
foreach($participants as $part)
{
echo ' <input type="hidden" name="participants[]" value="'.$part.'">'."\n";
@ -2366,6 +2386,17 @@
echo ' <input type="submit" name="refresh" value="'.lang('Refresh').'">'."\n";
echo ' </td><td>'."\n";
echo ' <input type="submit" name="cancel" value="'.lang('Cancel').'">'."\n";
echo ' </td><td>'."\n";
// Seven days
if( get_var("matrixtype", array("GET", "POST")) == "free/busy" )
{
if( !get_var("sevendays", array("GET", "POST")) )
echo ' <input type="submit" name="sevendays" value="'.lang('Show next seven days').'">'."\n";
else
echo ' <input type="submit" name="oneday" value="'.lang('Show only one day').'">'."\n";
}
echo ' </td></tr></table>'."\n";
echo '</form>'."\n";
}
@ -2534,19 +2565,22 @@
{
$page_app = $GLOBALS['phpgw_info']['flags']['currentapp'];
}
if (is_array($params))
{
$params['menuaction'] = $page_app.'.ui'.$page_app.'.'.$_page;
}
else
{
$params = 'menuaction='.$page_app.'.ui'.$page_app.'.'.$_page.$params;
$page_class = $_page == 'day' || $_page == 'week' || $_page == 'month' ? 'uiviews' : 'uicalendar';
if (is_array($params))
{
$params['menuaction'] = $page_app.'.'.$page_class.'.'.$_page;
}
else
{
$params = 'menuaction='.$page_app.'.'.$page_class.'.'.$_page.$params;
}
return $GLOBALS['phpgw']->link('/index.php',$params);
}
function header()
{
return;
$cols = 8;
if($this->bo->check_perms(PHPGW_ACL_PRIVATE) == True)
{
@ -2568,6 +2602,7 @@
function footer()
{
return;
$menuaction = $_GET['menuaction'];
list(,,$method) = explode('.',$menuaction);
@ -3714,7 +3749,7 @@
{
$participants[$part] = $GLOBALS['phpgw']->common->grab_owner_name($part);
// Much better for processor :)
$participants_id[] .= $part;
$participants_id[] = $part;
}
uasort($participants,'strnatcasecmp'); // sort them after their fullname
@ -3726,27 +3761,74 @@
}
$increment = $this->bo->prefs['calendar']['interval'];
$interval = (int)(60 / $increment);
$colspan = $this->bo->prefs['calendar']['workdayends'] - $this->bo->prefs['calendar']['workdaystarts'];
$pix = $GLOBALS['phpgw']->common->image('calendar','pix');
$str = '<center>'.lang($GLOBALS['phpgw']->common->show_date($date['raw'],'l'))
. ', '.$this->bo->long_date($date).'<br>'
. '<table width="85%" border="0" cellspacing="0" cellpadding="0" cols="'.((24 * $interval) + 1).'">'
. '<tr><td height="1" colspan="'.((24 * $interval) + 1).'" bgcolor="black"><img src="'.$pix.'"></td></tr>'
. '<tr><td width="15%"><font color="'.$this->theme['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'.lang('Participant').'</font></td>';
for($i=0;$i<24;$i++)
/* Make link */
$url_parts = "&participants[]=" . implode("&participants[]=", array_keys($param["participants"]));
if( get_var("sevendays", array("GET", "POST") ) )
$sevendays = "&sevendays=yes";
$_f_date = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0, $date["month"], ( $date["day"] - 1 ),$date["year"]);
$url_prevday = $GLOBALS['phpgw']->link('/index.php',
"menuaction=calendar.uicalendar.viewmatrix"
. "&year=" . $_f_date["year"]
. "&month=" . $_f_date["month"]
. "&day=" . $_f_date["day"]
. "&matrixtype=" . get_var("matrixtype", array("POST", "GET"))
. $url_parts
. $sevendays
);
$_f_date = $GLOBALS['phpgw']->datetime->makegmttime(0,0,0, $date["month"], ( $date["day"] + 1 ),$date["year"]);
$url_nextday = $GLOBALS['phpgw']->link('/index.php',
"menuaction=calendar.uicalendar.viewmatrix"
. "&year=" . $_f_date["year"]
. "&month=" . $_f_date["month"]
. "&day=" . $_f_date["day"]
. "&matrixtype=" . get_var("matrixtype", array("POST", "GET"))
. $url_parts
. $sevendays
);
$str = '<table border="0" align="center" width="90%">'
. '<tr>'
. ' <td align="left"><a href="' . $url_prevday . '"><< ' . lang('previous day') . '</a></td>'
. ' <td align="center">' . lang($GLOBALS['phpgw']->common->show_date($date['raw'],'l'))
. ', '.$this->bo->long_date($date)
. ' </td>'
. ' <td align="right"><a href="' . $url_nextday . '">' . lang('next day') . ' >></a></td>'
. '</tr>'
. '</table>'
. '<table width="90%" align="center" border="0" cellspacing="0" cellpadding="0" cols="'.((24 * $interval) + 1).'">'
. '<tr><td colspan="'. (($colspan * $interval) + 1) .'"><hr noshade></td></tr>'
. '<tr><td bgcolor="' . $this->theme['bg02'] . '">'
. '<font color="'.$this->theme['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'
. lang('Participant').'</font>'
. '</td>';
// Destroy old variable
unset($_f_date);
unset($url_parts);
unset($url_prevday);
unset($url_nextday);
// Show TimeMatrix
for( $i=$this->bo->prefs['calendar']['workdaystarts'];
$i<$this->bo->prefs['calendar']['workdayends'];
$i++ )
{
for($j=0;$j<$interval;$j++)
{
$k = ($j == 0 ? sprintf('%02d',$i).'<br>':'').sprintf('%02d',$j*$increment);
$str .= '<td align="left" bgcolor="'.$this->theme['bg_color'].'"><font color="'.$phpgw_info['theme']['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'
$str .= '<td align="left" bgcolor="'.$this->theme['bg02'].'"><font color="'.$phpgw_info['theme']['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'
. '<a href="'.$this->page('add','&date='.$date['full'].'&hour='.$i.'&minute='.($increment * $j))."\" onMouseOver=\"window.status='".$i.':'.(($increment * $j)<=9?'0':'').($increment * $j)."'; return true;\">"
. $k."</a>&nbsp;</font></td>\n";
}
}
$str .= '</tr>'
. '<tr><td height="1" colspan="'.((24 * $interval) + 1).'" bgcolor="black"><img src="'.$pix.'"></td></tr>';
. '<tr><td colspan="'.(($colspan * $interval) + 1).'"><hr noshade></td></tr>';
if(!$endtime)
{
$endtime = $starttime;
@ -3755,7 +3837,7 @@
foreach($participants as $part => $fullname)
{
$str .= '<tr align="center">'
. '<td width="15%" align="left"><font color="'.$this->theme['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'.$fullname.'</font></td>';
. '<td width="15%" align="left" bgcolor="'.$this->theme['th_bg'].'"><font color="'.$this->theme['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'.$fullname.'</font></td>';
$this->bo->cached_events = Array();
$this->bo->so->owner = $part;
@ -3773,7 +3855,9 @@
if(!$this->bo->cached_events[$date['full']])
{
for($j=0;$j<24;$j++)
for( $j=$this->bo->prefs['calendar']['workdaystarts'];
$j<$this->bo->prefs['calendar']['workdayends'];
$j++ )
{
for($k=0;$k<$interval;$k++)
{
@ -3785,7 +3869,9 @@
else
{
$time_slice = $this->bo->prepare_matrix($interval,$increment,$part,$date['full']);
for($h=0;$h<24;$h++)
for( $h=$this->bo->prefs['calendar']['workdaystarts'];
$h<$this->bo->prefs['calendar']['workdayends'];
$h++ )
{
$hour = $h * 10000;
for($m=0;$m<$interval;$m++)
@ -3809,7 +3895,7 @@
}
}
$str .= '</tr>'
. '<tr><td height="1" colspan="'.((24 * $interval) + 1).'" bgcolor="#999999"><img src="'.$pix.'"></td></tr>';
. '<tr><td colspan="'.(($colspan * $interval) + 1).'"><hr noshade></td></tr>';
}
$this->bo->owner = $owner;
$this->bo->so->owner = $owner;
@ -3877,7 +3963,6 @@
// $sb = CreateObject('phpgwapi.sbox');
$sb = CreateObject('phpgwapi.sbox2');
$jscal = CreateObject('phpgwapi.jscalendar'); // before phpgw_header() !!!
unset($GLOBALS['phpgw_info']['flags']['noheader']);
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
@ -3999,7 +4084,7 @@
$sb->getDays('start[mday]',(int)$GLOBALS['phpgw']->common->show_date($start,'d'))
)
*/
'data' => $jscal->input('start[str]',$start)
'data' => $this->jscal->input('start[str]',$start)
);
// Time
@ -4024,7 +4109,7 @@
$sb->getDays('end[mday]',(int)$GLOBALS['phpgw']->common->show_date($end,'d'))
)
*/
'data' => $jscal->input('end[str]',$end)
'data' => $this->jscal->input('end[str]',$end)
);
// End Time
@ -4211,7 +4296,7 @@
$sb->getDays('recur_enddate[mday]',(int)$GLOBALS['phpgw']->common->show_date($recur_end,'d'))
)
*/
$jscal->input('recur_enddate[str]',$recur_end)
$this->jscal->input('recur_enddate[str]',$recur_end)
);
$i = 0; $boxes = '';

View File

@ -36,6 +36,12 @@
$GLOBALS['phpgw']->html = CreateObject('phpgwapi.html');
}
$this->html = &$GLOBALS['phpgw']->html;
// jscalendar is needed by the new navigation-menu AND it need to be loaded befor the header !!!
if (!is_object($GLOBALS['phpgw']->jscalendar))
{
$GLOBALS['phpgw']->jscalendar = CreateObject('phpgwapi.jscalendar');
}
}
function index($error='')

View File

@ -43,6 +43,11 @@
$this->template_dir = $GLOBALS['phpgw']->common->get_tpl_dir('calendar');
$this->sb = CreateObject('phpgwapi.sbox');
// jscalendar is needed by the new navigation-menu AND it need to be loaded befor the header !!!
if (!is_object($GLOBALS['phpgw']->jscalendar))
{
$GLOBALS['phpgw']->jscalendar = CreateObject('phpgwapi.jscalendar');
}
$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Holiday Management');
}

View File

@ -31,6 +31,12 @@
$this->bo = CreateObject('calendar.boicalendar');
$this->template = $GLOBALS['phpgw']->template;
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Calendar - [iv]Cal Importer');
// jscalendar is needed by the new navigation-menu AND it need to be loaded befor the header !!!
if (!is_object($GLOBALS['phpgw']->jscalendar))
{
$GLOBALS['phpgw']->jscalendar = CreateObject('phpgwapi.jscalendar');
}
}
function print_test($val,$title,$x_pre='')

View File

@ -0,0 +1,707 @@
<?php
/**************************************************************************\
* eGroupWare - Calendar - Views and Widgets *
* http://www.egroupware.org *
* Written and (c) 2004 by Ralf Becker <RalfBecker@outdoor-training.de> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
include_once(PHPGW_INCLUDE_ROOT . '/calendar/inc/class.uical.inc.php');
/**
* Class to generate the calendar views and the necesary widgets
*
* @package calendar
* @author RalfBecker@outdoor-training.de
* @license GPL
*/
class uiviews extends uical
{
var $public_functions = array(
'day' => True,
'week' => True,
'month' => True,
'test' => True,
);
/**
* @var $debug mixed integer level or string function- or widget-name
*/
var $debug=False;
/**
* @var minimum width for an event
*/
var $eventCol_min_width = 80;
var $timeRow_width = 40;
/**
* Constructor
*/
function uiviews()
{
$this->width = $this->establish_width();
$this->uical(); // call the parent's constructor
$GLOBALS['phpgw_info']['flags']['nonavbar'] = False;
$app_header = array(
'calendar.uiviews.day' => lang('Dayview'),
'calendar.uiviews.week' => lang('Weekview'),
'calendar.uiviews.month' => lang('Monthview'),
);
$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].
(isset($app_header[$_GET['menuaction']]) ? ' - '.$app_header[$_GET['menuaction']] : '');
// standard params for calling bocal::search for all views
$this->search_params = array(
'start' => $this->date,
'cat_id' => $this->cat_id,
'users' => $this->is_group ? $this->g_owner : explode(',',$this->owner),
'filter' => $this->filter,
'daywise' => True,
);
$this->holidays = $this->bo->read_holidays($this->year);
}
/**
* Displays the monthview or a multiple week-view
*/
function month($weeks=0)
{
if ($this->debug > 0) $this->bo->debug_message('uiviews::month(weeks=%1) date=%2',True,$weeks,$this->date);
$first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day=1);
if ($weeks)
{
$last = $first + $weeks * 7 * DAY_s - 1;
}
else
{
$last = $this->datetime->get_weekday_start($this->year,$this->month,
$days_in_month=$this->datetime->days_in_month($this->month,$this->year));
$last += WEEK_s - 1;
}
if ($this->debug > 0)$this->bo->debug_message('uiviews::month(%1) date=%2: first=%3, last=%4',False,$weeks,$this->date,$this->bo->date2string($first),$this->bo->date2string($last));
$GLOBALS['phpgw_info']['flags']['app_header'] .= ': '.lang(date('F',$this->bo->date2ts($this->date))).' '.$this->year;
$GLOBALS['phpgw']->common->phpgw_header();
$search_params = $this->search_params;
$days = $this->bo->search(array(
'start' => $first,
'end' => $last,
)+$this->search_params);
for ($week_start = $first; $week_start < $last; $week_start += WEEK_s)
{
$week = array();
for ($i = 0; $i < 7; ++$i)
{
$day_ymd = $this->bo->date2string($week_start+$i*DAY_s);
$week[$day_ymd] = array_shift($days);
}
$week_view = array(
'menuaction' => 'calendar.uiviews.week',
'date' => $this->bo->date2string($week_start),
);
$title = lang('Wk').' '.date('W',$week_start);
$title = $this->html->a_href($title,$week_view,'',' title="'.lang('Weekview').'"');
echo $this->timeGridWidget($week,max($this->width,7*$this->eventCol_min_width+$this->timeRow_width),60,5,'',$title);
}
}
/**
* Displays the weekview, with 5 or 7 days
*/
function week($days=0)
{
if (!$days)
{
$days = isset($_GET['days']) ? $_GET['days'] : $this->cal_prefs['days_in_weekview'];
if ($days != 5) $days = 7;
if ($days != $this->cal_prefs['days_in_weekview']) // save the preference
{
$GLOBALS['phpgw']->preferences->add('calendar','days_in_weekview',$days);
$GLOBALS['phpgw']->preferences->save_repository();
$this->cal_prefs['days_in_weekview'] = $days;
}
}
if ($this->debug > 0) $this->bo->debug_message('uiviews::week(days=%1) date=%2',True,$days,$this->date);
$wd_start = $first = $this->datetime->get_weekday_start($this->year,$this->month,$this->day);
if ($days == 5) // no weekend-days
{
switch($this->cal_prefs['weekdaystarts'])
{
case 'Saturday':
$first += DAY_s;
// fall through
case 'Sunday':
$first += DAY_s;
break;
}
}
//echo "<p>weekdaystarts='".$this->cal_prefs['weekdaystarts']."', get_weekday_start($this->year,$this->month,$this->day)=".date('l Y-m-d',$wd_start).", first=".date('l Y-m-d',$first)."</p>\n";
$last = $first + $days * DAY_s - 1;
$GLOBALS['phpgw_info']['flags']['app_header'] .= ': '.lang('Wk').' '.date('W',$first).
': '.$this->bo->long_date($first,$last);
$GLOBALS['phpgw']->common->phpgw_header();
$search_params = $this->search_params;
echo $this->timeGridWidget($this->bo->search(array(
'start' => $first,
'end' => $last,
)+$this->search_params),max($this->width,$days*$this->eventCol_min_width+$this->timeRow_width));
}
/**
* Displays the dayview
*/
function day()
{
if ($this->debug > 0) $this->bo->debug_message('uiviews::day() date=%1',True,$this->date);
$ts = $this->bo->date2ts((string)$this->date);
$GLOBALS['phpgw_info']['flags']['app_header'] .= ': '.lang(date('l',$ts)).', '.$this->bo->long_date($ts);
$GLOBALS['phpgw']->common->phpgw_header();
$todos = $this->get_todos(&$todo_label);
echo $this->html->table(array(0 => array(
$this->timeGridWidget($this->bo->search($this->search_params),$this->width-250,$this->cal_prefs['interval'],1.5),
$this->html->div(
$this->html->div($todo_label,'','calDayTodosHeader th')."\n".
$this->html->div($todos,'','calDayTodosTable'),
'','calDayTodos')
),'.0' => 'valign="top"'),'width="100%"');
}
/**
* Query the open ToDo's via a hook from InfoLog or any other 'calendar_include_todos' provider
*
* @param $todo_label array/string label for the todo-box or array with 2 values: the label and a boolean show_all
* On return $todo_label contains the label for the todo-box
* @return string html with a table of open todo's
*/
function get_todos(&$todo_label)
{
$todos_from_hook = $GLOBALS['phpgw']->hooks->process(array(
'location' => 'calendar_include_todos',
'year' => $this->year,
'month' => $this->month,
'day' => $this->day,
'owner' => $this->owner // num. id of the user, not necessary current user
));
if(is_array($todo_label))
{
list($label,$showall)=$todo_label;
}
else
{
$label=$todo_label;
$showall=true;
}
$maxshow = (int)$GLOBALS['phpgw_info']['user']['preferences']['infolog']['mainscreen_maxshow'];
if($maxshow <= 0)
{
$maxshow=10;
}
//print_debug("get_todos(): label=$label; showall=$showall; max=$maxshow");
$content = $todo_label = '';
if (is_array($todos_from_hook) && count($todos_from_hook))
{
$todo_label = !empty($label) ? $label : lang("open ToDo's:");
foreach($todos_from_hook as $todos)
{
$i = 0;
if (is_array($todos) && count($todos))
{
foreach($todos as $todo)
{
if(!$showall && ($i++ > $maxshow))
{
break;
}
$icons = '';
foreach($todo['icons'] as $name => $app)
{
$icons .= ($icons?' ':'').$GLOBALS['phpgw']->html->image($app,$name,lang($name),'border="0" width="15" height="15"');
}
$class = $class == 'row_on' ? 'row_off' : 'row_on';
$content .= " <tr class=\"$class\">\n <td valign=\"top\" width=\"15%\" nowrap>".
($this->bo->printer_friendly?$icons:$GLOBALS['phpgw']->html->a_href($icons,$todo['view'])).
"</td>\n <td>".($this->printer_friendly?$todo['title']:
$GLOBALS['phpgw']->html->a_href($todo['title'],$todo['view']))."</td>\n </tr>\n";
}
}
}
}
if (!empty($content))
{
return "<table border=\"0\" width=\"100%\">\n$content</table>\n";
}
return False;
}
/**
* Calculates the vertical position based on the time
*
* workday start- and end-time, is taken into account, as well as timeGrids px_m - minutes per pixel param
*/
function time2pos($time)
{
// time before workday => condensed in the first row
if ($this->wd_start > 0 && $time < $this->wd_start)
{
$pos = round($time / $this->px_m / $this->wd_start);
}
// time after workday => condensed in the last row
elseif ($this->wd_end < 24*60 && $time > $this->wd_end+2*$this->granularity_m)
{
$pos = $this->time2pos($this->wd_end+2*$this->granularity_m) +
round(($time - ($this->wd_end+2*$this->granularity_m)) / $this->px_m /
(24*60 - ($this->wd_end+2*$this->granularity_m)));
}
// time during the workday => 2. row on (= + granularity)
else
{
$pos = round(($time - $this->wd_start + $this->granularity_m) / $this->px_m);
}
if ($this->debug > 3) $this->bo->debug_message('uiviews::time2pos(%1)=%2',False,$time,$pos);
return $pos;
}
/**
* Calculates the height of a differenc between 2 times
*
* workday start- and end-time, is taken into account, as well as timeGrids px_m - minutes per pixel param
*/
function times2height($start,$end,$minimum=0)
{
$height = $this->time2pos($end) - $this->time2pos($start);
if ($this->debug > 3) $this->bo->debug_message('uiviews::times2height(%1,%2,min=%3)=%4',False,$start,$end,$minimum,$height);
return $height >= $minimum ? $height : $minimum;
}
/**
* Creates a grid with rows for the time, columns for (multiple) days containing events
*
* Uses the dayColWidget to display each day.
*
* @param $daysEvents array with subarrays of events for each day to show, day as YYYYMMDD as key
* @param $width int width of the widget
* @param $granularity int granularity in minutes of the rows
* @param $px_m param int/float minutes per pixel - pixel in minutest ;-)
*/
function timeGridWidget($daysEvents,$width,$granularity_m=30,$px_m=1.7,$indent='',$title='')
{
if ($this->debug > 1 || $this->debug==='timeGridWidget') $this->bo->debug_message('uiviews::timeGridWidget(events=%1,width=%2,granularity_m=%3,px_m=%4,)',True,$daysEvents,$width,$granularity_m,$px_m);
$this->px_m = $px_m; // for time2pos()
$this->granularity_m = $granularity_m;
$html = $indent.'<div class="calTimeGrid" style="width: '.$width.'px;">'."\n";
if ($title)
{
$html .= $indent."\t".'<div class="calGridHeader">'.$title."</div>\n";
}
$off = True; // Off-row means a different bgcolor
for ($t = 0; $t < 24*60; $t += $inc)
{
$inc = $granularity_m;
if (!$t)
{
$inc = $this->wd_start;
}
elseif ($t > $this->wd_end)
{
$inc = 24*60 - $this->wd_end;
}
$html .= $indent."\t".'<div class="calTimeRowOff'.($off ? ' row_off' : ' row_on').
'" style="height: '.($this->times2height($t,$t + $inc)).'px;">'."\n";
$add_links = count($daysEvents) == 1 && $this->bo->check_perms(PHPGW_ACL_ADD,0,$this->owner);
$add = array(
'menuaction' => 'calendar.uicalendar.add',
'date' => $this->date,
);
if ($t >= $this->wd_start && $t <= $this->wd_end)
{
$time = $GLOBALS['phpgw']->common->formattime(sprintf('%02d',$t/60),sprintf('%02d',$t%60));
if ($add_links)
{
$add['hour'] = (int) ($t/60);
$add['minute'] = $t%60;
$time = $this->html->a_href($time,$add,'',' title="'.lang('Add').'"');
}
$html .= $indent."\t\t".'<div class="calTimeRowTime">'.$time."</div>\n";
}
$html .= $indent."\t</div>\n"; // calTimeRow
$off = !$off;
}
if (is_array($daysEvents) && count($daysEvents))
{
$dayCols_width = $width - $this->timeRow_width - 1;
$html .= $indent."\t".'<div class="calDayCols" style="left: '.$this->timeRow_width.'px; width: '.$dayCols_width.'px;">'."\n";
$dayCol_width = $dayCols_width / count($daysEvents);
$n = 0;
foreach($daysEvents as $day => $events)
{
$html .= $this->dayColWidget($day,$events,(int)($n*$dayCol_width),(int)$dayCol_width,$indent."\t\t",count($daysEvents) != 1,++$on_off & 1);
++$n;
}
$html .= $indent."\t</div>\n"; // calDayCols
}
$html .= $indent."</div>\n"; // calTimeGrid
return $html;
}
/**
* Creates (if necessary multiple) columns for the events of a day
*
* Uses the eventColWidget to display each column.
*
* @param $day_ymd string/int date as Ymd
* @param $events array of events to show
* @param $left int start of the widget
* @param $width int width of the widget
* @param $short_title boolean should we add a label (weekday, day) with link to the day-view above each day
*/
function dayColWidget($day_ymd,$events,$left,$width,$indent,$short_title=True,$on_off=False)
{
if ($this->debug > 1 || $this->debug==='dayColWidget') $this->bo->debug_message('uiviews::dayColWidget(%1,%2,left=%3,width=%4,)',False,$day_ymd,$events,$left,$width);
$day_start = $this->bo->date2ts((string)$day_ymd);
// sorting the event into columns with none-overlapping events, the events are already sorted by start-time
$eventCols = $col_ends = array();
foreach($events as $event)
{
$event['multiday'] = False;
$event['start_m'] = ($this->bo->date2ts($event['start']) - $day_start) / 60;
if ($event['start_m'] < 0)
{
$event['start_m'] = 0;
$event['multiday'] = True;
}
$event['end_m'] = ($this->bo->date2ts($event['end']) - $day_start) / 60;
if ($event['end_m'] >= 24*60)
{
$event['end_m'] = 24*60-1;
$event['multiday'] = True;
}
for($c = 0; $event['start_m'] < $col_ends[$c]; ++$c);
$eventCols[$c][] = $event;
$col_ends[$c] = $event['end_m'];
}
if (count($eventCols))
{
$eventCol_dist = $eventCol_width = round($width / count($eventCols));
$eventCol_min_width = 80;
if ($eventCol_width < $eventCol_min_width)
{
$eventCol_width = $eventCol_dist = $eventCol_min_width;
if (count($eventCols) > 1)
{
$eventCol_dist = round(($width - $eventCol_min_width) / (count($eventCols)-1));
}
}
}
$html = $indent.'<div class="calDayCol" style="left: '.$left.'px; width: '.$width.'px;">'."\n";
// Creation of the header-column with date, evtl. holiday-names and a matching background-color
$ts = $this->bo->date2ts((string)$day_ymd);
$title = lang(date('l',$ts)).', '.($short_title ? date('d.',$ts) : $this->bo->long_date($ts));
$day_view = array(
'menuaction' => 'calendar.uiviews.day',
'date' => $day_ymd,
);
if ($short_title)
{
$title = $this->html->a_href($title,$day_view,'',
!isset($this->holidays[$day_ymd])?' title="'.lang('Dayview').'"':'');
}
if (isset($this->holidays[$day_ymd]))
{
$class = 'calHoliday';
foreach($this->holidays[$day_ymd] as $holiday)
{
$holidays[] = $holiday['name'];
}
$holidays = implode(', ',$holidays);
}
elseif ($day_ymd == $this->bo->date2string($this->bo->now_su))
{
$class = 'calToday';
}
else
{
$class = $on_off ? 'row_on' : 'row_off';
}
$html .= $indent."\t".'<div class="calDayColHeader '.$class.'"'.($holidays ? ' title="'.$holidays.'"':'').'>'.
$title.(!$short_title && $holidays ? ': '.$holidays : '')."</div>\n";
foreach($eventCols as $n => $eventCol)
{
$html .= $this->eventColWidget($eventCol,$n*$eventCol_dist,$eventCol_width,$indent."\t");
}
$html .= $indent."</div>\n"; // calDayCol
return $html;
}
/**
* Creates colunm for non-overlaping (!) events
*
* Uses the eventWidget to display each event.
*
* @param $events array of events to show
* @param $left int start of the widget
* @param $width int width of the widget
*/
function eventColWidget($events,$left,$width,$indent)
{
if ($this->debug > 1 || $this->debug==='eventColWidget') $this->bo->debug_message('uiviews::eventColWidget(%1,left=%2,width=%3,)',False,$events,$left,$width);
$html = $indent.'<div class="calEventCol" style="left: '.((int)$left).'px; width: '.((int)$width).'px;">'."\n";
foreach($events as $event)
{
$html .= $this->eventWidget($event,$width,$indent."\t");
}
$html .= $indent."</div>\n";
return $html;
}
/**
* Shows one event
*
* @param $event array with the data of event to show
* @param $width int width of the widget
*/
function eventWidget($event,$width,$indent)
{
if ($this->debug > 1 || $this->debug==='eventWidget') $this->bo->debug_message('uiviews::eventWidget(%1)',False,$event);
static $tpl = False;
if (!$tpl)
{
$tpl = $GLOBALS['phpgw']->template;
$tpl->set_file('event_widget_t','event_widget.tpl');
$tpl->set_block('event_widget_t','event_widget');
$tpl->set_block('event_widget_t','event_tooltip');
}
if ($event['start_m'] == 0 && $event['end_m'] == 24*60-1)
{
$timespan = lang('all day');
}
else
{
foreach(array($event['start_m'],$event['end_m']) as $minutes)
{
$timespan[] = $GLOBALS['phpgw']->common->formattime(sprintf('%02d',$minutes/60),sprintf('%02d',$minutes%60));
}
$timespan = implode(' - ',$timespan);
}
$icons = $this->event_icons($event);
$cats = $this->bo->categories($event['category'],$color);
// these values control varius aspects of the geometry of the eventWidget
$small_trigger_width = 120 + 20*count($icons);
$corner_radius=$width > $small_trigger_width ? 10 : 5;
$header_height=$width > $small_trigger_width ? 19 : 12; // multi_3 icon has a height of 19=16+2*1padding+1border !
$height = $this->times2height($event['start_m'],$event['end_m'],$header_height);
$body_height = max(0,$height - $header_height - $corner_radius);
$border=1;
$headerbgcolor = $color ? $color : '#808080';
// the body-colors (gradient) are calculated from the headercolor, which depends on the cat of an event
$bodybgcolor1 = $this->brighter($headerbgcolor,170);
$bodybgcolor2 = $this->brighter($headerbgcolor,220);
$tpl->set_var(array(
// event-content, some of it displays only if it really has content or is needed
'header_icons' => $width > $small_trigger_width ? implode("",$icons) : '',
'body_icons' => $width > $small_trigger_width ? '' : implode("\n",$icons).'<br>',
'icons' => implode("\n",$icons),
'header' => $timespan,
'title' => $this->html->htmlspecialchars($event['title']),
'description' => nl2br($this->html->htmlspecialchars($event['description'])),
'location' => $this->add_nonempty($event['location'],lang('Location')),
'participants' => count($event['participants']) == 1 && isset($event['participants'][$this->user]) ? '' :
$this->add_nonempty($this->bo->participants($event['participants']),lang('Participants'),True),
'multidaytimes' => !$event['multiday'] ? '' :
$this->add_nonempty($GLOBALS['phpgw']->common->show_date($this->bo->date2ts($event['start'])),lang('Start Date/Time')).
$this->add_nonempty($GLOBALS['phpgw']->common->show_date($this->bo->date2ts($event['end'])),lang('End Date/Time')),
'category' => $this->add_nonempty($cats,lang('Category')),
// the tooltip is based on the content of the actual widget, this way it takes no extra bandwidth/volum
// 'tooltip' => $this->html->tooltip(False,False,array('BorderWidth'=>0,'Padding'=>0)),
// various aspects of the geometry or style
'corner_radius' => $corner_radius.'px',
'header_height' => $header_height.'px',
'body_height' => $body_height.'px',
'height' => $height,
'width' => ($width-20).'px',
'border' => $border,
'bordercolor' => $headerbgcolor,
'headerbgcolor' => $headerbgcolor,
'bodybackground' => 'url('.$GLOBALS['phpgw_info']['server']['webserver_url'].
'/calendar/inc/gradient.php?color1='.urlencode($bodybgcolor1).'&color2='.urlencode($bodybgcolor2).
'&width='.$width.') repeat-y '.$bodybgcolor2,
'Small' => $width > $small_trigger_width ? '' : 'Small', // to use in css class-names
));
foreach(array(
'upper_left'=>array('width'=>-$corner_radius,'height'=>$header_height,'border'=>0,'bgcolor'=>$headerbgcolor),
'upper_right'=>array('width'=>$corner_radius,'height'=>$header_height,'border'=>0,'bgcolor'=>$headerbgcolor),
'lower_left'=>array('width'=>-$corner_radius,'height'=>-$corner_radius,'border'=>$border,'color'=>$headerbgcolor,'bgcolor'=>$bodybgcolor1),
'lower_right'=>array('width'=>$corner_radius,'height'=>-$corner_radius,'border'=>$border,'color'=>$headerbgcolor,'bgcolor'=>$bodybgcolor2),
) as $name => $data)
{
$tpl->set_var($name.'_corner',$GLOBALS['phpgw_info']['server']['webserver_url'].
'/calendar/inc/round_corners.php?width='.$data['width'].'&height='.$data['height'].
'&bgcolor='.urlencode($data['bgcolor']).
(isset($data['color']) ? '&color='.urlencode($data['color']) : '').
(isset($data['border']) ? '&border='.urlencode($data['border']) : ''));
}
$tooltip = $tpl->fp('tooltip','event_tooltip');
$tpl->set_var('tooltip',$this->html->tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)));
$html = $tpl->fp('out','event_widget');
$view_link = $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'calendar.uicalendar.view','cal_id'=>$event['id'],'date'=>$event['start']['full']));
return $indent.'<div class="calEvent" style="top: '.$this->time2pos($event['start_m']).'px; height: '.
$height.'px;" onclick="document.location=\''.$view_link.'\';">'."\n".
$html.$indent."</div>\n";
}
function add_nonempty($content,$label,$one_per_line=False)
{
if (is_array($content))
{
$content = implode($one_per_line ? ",\n" : ', ',$content);
}
if (!empty($content))
{
return '<span class="calEventLabel">'.$label.'</span>:'.
($one_per_line ? '<br>' : ' ').
nl2br($this->html->htmlspecialchars($content)).'<br>';
}
return '';
}
/**
* Calculates a brighter color for a given color
*
* @param $rgb string color as #rrggbb value
* @param $decr int value to add to each component, default 64
* @return string the brighter color
*/
function brighter($rgb,$decr=64)
{
if (!preg_match('/^#?([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$/',$rgb,$components))
{
return '#ffffff';
}
$brighter = '#';
for ($i = 1; $i <=3; ++$i)
{
$val = hexdec($components[$i]) + $decr;
if ($val > 255) $val = 255;
$brighter .= sprintf('%02x',$val);
}
//echo "brighter($rgb=".print_r($components,True).")=$brighter</p>\n";
return $brighter;
}
/**
* trys to figure out the inner window width from the browser and installs an onResize handler
*
* If no $_REQUEST[windowInnerWidth] is present, the pages get reloaded with some javascript, which sets
* the width in the URL. If a width could be determined, an onResize handler gets installed, which refreshes
* the page, with the new width set in the URL.
* If we are allowed to set cookies, we additionaly set a cookie with the width, to save the additonal reload.
* An onLoad handler checks if we operate with the correct width, or reloads the page if not.
*/
function establish_width()
{
if (!isset($_REQUEST['windowInnerWidth'])) // we neither have a cookie nor an url-var, get one ...
{
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $GLOBALS['phpgw']->translation->charset(); ?>">
<meta http-equiv="refresh" content="1; URL=<?php echo $_SERVER['PHP_SELF'].'?'.($_SERVER['QUERY_STRING'] ? $_SERVER['QUERY_STRING'].'&':'').'windowInnerWidth=Off'; ?>">
</head>
<body onLoad="location = location + (location.search.length ? '&' : '?') + 'windowInnerWidth=' + (window.innerWidth ? window.innerWidth : document.body.offsetWidth);">
<noscript>
<p><?php echo lang('Determining window width ...'); ?></p>
<p><?php echo lang('Needs javascript to be enabled !!!'); ?></p>
</noscript>
</body>
</html>
<?php
$GLOBALS['phpgw']->common->phpgw_exit();
}
$width = (int) $_GET['windowInnerWidth'] ? $_GET['windowInnerWidth'] : $_COOKIE['windowInnerWidth'];
if ($GLOBALS['phpgw_info']['server']['usecookies'])
{
$GLOBALS['phpgw']->session->phpgw_setcookie('windowInnerWidth',$width);
}
if ($width)
{
$GLOBALS['phpgw_info']['flags']['java_script'] = '
<script type="text/javascript">
function reload_inner_width() {
var width = window.innerWidth ? window.innerWidth : document.body.offsetWidth;
if (location.search.indexOf("windowInnerWidth=") < 0)
{
location = location+(location.search.length ? "&" : "?")+"windowInnerWidth="+width;
}
else
{
var loc = location.toString();
location = loc.replace(/^(.*windowInnerWidth=)[0-9]*(.*)$/,"$1"+width+"$2");
}
}
</script>
';
if (!is_object($GLOBALS['phpgw']->js))
{
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
}
$GLOBALS['phpgw']->js->set_onresize('reload_inner_width();');
$GLOBALS['phpgw']->js->set_onload('if ('.$width.'!=(window.innerWidth ? window.innerWidth : document.body.offsetWidth)) reload_inner_width();');
}
else
{
$width = 1000; // default, if the browser does not report it
}
return $width - 250; // 180 for sidebox-menu, TODO: this need to come from the template
}
}

84
calendar/inc/gradient.php Normal file
View File

@ -0,0 +1,84 @@
<?php
/**************************************************************************\
* eGroupWare - calendar: rounded corners *
* http://www.egroupware.org *
* Written by RalfBecker@outdoor-training.de *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
// some constanst for pre php4.3
if (!defined('PHP_SHLIB_SUFFIX'))
{
define('PHP_SHLIB_SUFFIX',strtoupper(substr(PHP_OS, 0,3)) == 'WIN' ? 'dll' : 'so');
}
if (!defined('PHP_SHLIB_PREFIX'))
{
define('PHP_SHLIB_PREFIX',PHP_SHLIB_SUFFIX == 'dll' ? 'php_' : '');
}
if (!extension_loaded('gd') && !@dl(PHP_SHLIB_PREFIX.'gd.'.PHP_SHLIB_SUFFIX))
{
die("Can't load the needed php-extension 'gd' !!!");
}
foreach(array('width'=>1,'height'=>1,'color1'=>'000080','color2'=>'ffffff') as $name => $default)
{
$$name = isset($_GET[$name]) ? $_GET[$name] : $default;
}
foreach(array('color1','color2') as $name)
{
preg_match('/^#?([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$/',$$name,$rgb) or
die("Wrong value '".$$name."' for $name, should be something like #80FFFF' !!!");
$$name = array('r'=>hexdec($rgb[1]),'g'=>hexdec($rgb[2]),'b'=>hexdec($rgb[3]));
}
$image = @imagecreate(abs($width),abs($height))
or die("Cannot Initialize new GD image stream");
$length = max($width,$height);
$dist = $length / 256;
if ($dist < 1) $dist = 1;
$anz = round($length / $dist);
foreach ($color1 as $c => $val)
{
$c_step[$c] = ($color2[$c] - $val) / $anz;
}
$rgb = $color1;
for ($l = 0; $l < $length; $l += $dist)
{
$color = imagecolorallocate($image,(int)$rgb['r'],(int)$rgb['g'],(int)$rgb['b']);
foreach($rgb as $c => $val)
{
$rgb[$c] += $c_step[$c];
}
if ($width > $height)
{
imagefilledrectangle($image,(int)$l,0,(int) ($l+$dist),$height-1,$color);
}
else
{
imagefilledrectangle($image,0,(int)$l,$width-1,(int) ($l+$dist),$color);
}
}
session_cache_limiter('public'); // allow caching
if (function_exists('imagegif'))
{
header("Content-type: image/gif");
imagegif($image);
}
else
{
header("Content-type: image/png");
imagepng($image);
}
imagedestroy($image);
?>

View File

@ -28,6 +28,15 @@
create_select_box('default calendar view','defaultcalendar',$default,
'Which of calendar view do you want to see, when you start calendar ?');
/* Select list with number of day by week */
$week_view = array(
'5' => lang('Weekview without weekend'),
'7' => lang('Weekview including weekend'),
);
create_select_box('default week view', 'days_in_weekview', $week_view, 'Do you want a weekview with or without weekend?');
/* Selection of list for home page is different from default calendar,
since the decision for the front page is different for the decision
for the main calendar page. But the list could be added to the
@ -184,7 +193,7 @@
$freebusy_url = ($_SERVER['HTTPS'] ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$freebusy_url;
}
$freebusy_help = lang('Should not loged in persons be able to see your freebusy information? You can set an extra password, different from your normal password, to protect this informations. The freebusy information is in iCal format and only include the times when you are busy. It does not include the event-name, description or locations. The URL to your freebusy information is %1.','<a href="'.$freebusy_url.'" target="_blank">'.$freebusy_url.'</a>');
create_check_box('Make freebusy information availible to not loged in persons?','freebusy',
create_check_box('Make freebusy information available to not loged in persons?','freebusy',
$freebusy_help,'',False);
create_input_box('Password for not loged in users to your freebusy information?','freebusy_pw',
'If you dont set a password here, the information is availible to everyone, who knows the URL!!!');
'If you dont set a password here, the information is available to everyone, who knows the URL!!!');

View File

@ -1,65 +1,29 @@
<?php
/**************************************************************************\
* eGroupWare - Calendar's Sidebox-Menu for idots-template *
* http://www.egroupware.org *
* Written by Pim Snel <pim@lingewoud.nl> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/**************************************************************************\
* eGroupWare - Calendar's Sidebox-Menu for idots-template *
* http://www.egroupware.org *
* Written by Pim Snel <pim@lingewoud.nl> *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
/* $Id$ */
/**
* File is depricated, the hook moved into the class uical !!!
*/
// register the new hooks, if the admin missed it ;-)
if (!is_object($GLOBALS['phpgw']->hooks))
{
/*
This hookfile is for generating an app-specific side menu used in the idots
template set.
$menu_title speaks for itself
$file is the array with link to app functions
display_sidebox can be called as much as you like
*/
$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu');
$file = Array(
'New Entry' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.add'),
'_NewLine_', // give a newline
'Today'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.day'),
'This week'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.week'),
'This month'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.month'),
'This year'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.year'),
'Group Planner'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.planner'),
'Daily Matrix View'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.matrixselect'),
'Export'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.export'),
'Import'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiicalendar.import')
);
display_sidebox($appname,$menu_title,$file);
if ($GLOBALS['phpgw_info']['user']['apps']['preferences'])
{
$menu_title = lang('Preferences');
$file = Array(
'Calendar preferences'=>$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=calendar'),
'Grant Access'=>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=calendar'),
'Edit Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=calendar&cats_level=True&global_cats=True'),
);
display_sidebox($appname,$menu_title,$file);
}
if ($GLOBALS['phpgw_info']['user']['apps']['admin'])
{
$menu_title = lang('Administration');
$file = Array(
'Configuration'=>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=calendar'),
'Custom Fields'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicustom_fields.index'),
'Holiday Management'=>$GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiholiday.admin'),
'Import CSV-File' => $GLOBALS['phpgw']->link('/calendar/csv_import.php'),
'Global Categories' =>$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname=calendar'),
);
display_sidebox($appname,$menu_title,$file);
}
$GLOBALS['phpgw']->hooks = CreateObject('phpgwapi.hooks');
}
?>
include(PHPGW_INCLUDE_ROOT . '/calendar/setup/setup.inc.php');
$GLOBALS['phpgw']->hooks->register_hooks('calendar',$setup_info['calendar']['hooks']);
ExecMethod($setup_info['calendar']['hooks']['sidebox_menu']);

View File

@ -0,0 +1,88 @@
<?php
/**************************************************************************\
* eGroupWare - calendar: rounded corners *
* http://www.egroupware.org *
* Written by RalfBecker@outdoor-training.de *
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
// some constanst for pre php4.3
if (!defined('PHP_SHLIB_SUFFIX'))
{
define('PHP_SHLIB_SUFFIX',strtoupper(substr(PHP_OS, 0,3)) == 'WIN' ? 'dll' : 'so');
}
if (!defined('PHP_SHLIB_PREFIX'))
{
define('PHP_SHLIB_PREFIX',PHP_SHLIB_SUFFIX == 'dll' ? 'php_' : '');
}
if (!extension_loaded('gd') && !@dl(PHP_SHLIB_PREFIX.'gd.'.PHP_SHLIB_SUFFIX))
{
die("Can't load the needed php-extension 'gd' !!!");
}
foreach(array('width'=>-20,'height'=>40,'border'=>1,'color'=>'000080','bgcolor'=>'0000FF') as $name => $default)
{
$$name = isset($_GET[$name]) ? $_GET[$name] : $default;
}
$image = @imagecreate(abs($width),abs($height))
or die("Cannot Initialize new GD image stream");
$white = imagecolorallocate($image, 254, 254, 254);
imagecolortransparent($image, $white);
foreach(array('color','bgcolor') as $name)
{
preg_match('/^#?([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$/',$$name,$rgb) or
die("Wrong value '".$$name."' for $name, should be something like #80FFFF' !!!");
$$name = imagecolorallocate($image,hexdec($rgb[1]),hexdec($rgb[2]),hexdec($rgb[3]));
}
$radius = min(abs($width),abs($height));
$center_x = $width > 0 ? abs($width)-$radius-1 : $radius;
$center_y = $height < 0 ? abs($height)-$radius-1 : $radius;
//echo "width=$width, height=$height => radius=$radius: center_x=$center_x, center_y=$center_y";
if ($border) imagefilledellipse($image,$center_x,$center_y,2*$radius,2*$radius,$color);
imagefilledellipse($image,$center_x,$center_y,2*($radius-$border),2*($radius-$border),$bgcolor);
if (abs($height) > abs($width))
{
if ($height < 0) // lower corners
{
$y1 = 0;
$y2 = abs($height)-$radius-1;
}
else
{
$y1 = $radius;
$y2 = abs($height)-1;
}
imagefilledrectangle($image,0,$y1,abs($width),$y2,$bgcolor);
if ($border)
{
$x1 = $width < 0 ? 0 : abs($width)-$border;
$x2 = $width < 0 ? $border-1 : abs($width)-1;
imagefilledrectangle($image,$x1,$y1,$x2,$y2,$color);
}
}
session_cache_limiter('public'); // allow caching
if (function_exists('imagegif'))
{
header("Content-type: image/gif");
imagegif($image);
}
else
{
header("Content-type: image/png");
imagepng($image);
}
imagedestroy($image);
?>

View File

@ -20,6 +20,7 @@ alarm for %1 at %2 in %3 calendar de Alarm f
alarm management calendar de Alarm Management
alarm-management calendar de Alarm Management
alarms calendar de Alarme
all categories calendar de Alle Kategorien
all day calendar de ganztägig
are you sure you want to delete this country ? calendar de Sind Sie sicher, dass Sie dieses Land löschen wollen ?
are you sure you want to delete this holiday ? calendar de Sind Sie sicher, dass Sie diesen Feiertag löschen wollen ?
@ -68,6 +69,7 @@ default calendar filter calendar de Standard-Filter des Kalenders
default calendar view calendar de Standard-Ansicht des Kalenders
default length of newly created events. the length is in minutes, eg. 60 for 1 hour. calendar de Vorgabe für die Länge von neuen Kalendareinträgen. Die Länge ist in Minuten, zb. 60 für 1 Stunde.
default view of appointments calendar de Standard-Ansicht der Termine
default week view calendar de Vorgabe Wochenansicht
defines the size in minutes of the lines in the day view. calendar de Bestimmt die Zeitskala in Minuten der Tagesansicht des Kalendars.
delete a single entry by passing the id. calendar de Lösche einen einzelnen Eintrag über seine Id.
delete an entire users calendar. calendar de Lösche den kompletten Kalender eines Benutzers.
@ -76,12 +78,15 @@ delete series calendar de Serie l
delete single calendar de Einzelevent löschen
deleted calendar de Abgesagt
description calendar de Beschreibung
determining window width ... calendar de Bestimme die Fensterbreite ...
disable calendar de Ausschalten
disabled calendar de ausgeschaltet
display interval in day view calendar de Intervall der Tagesansicht
display mini calendars when printing calendar de zeige einen kleinen Kalender beim drucken
display status of events calendar de Status von Terminen anzeigen
displayed view calendar de Ansicht
displays your default calendar view on the startpage (page you get when you enter egroupware or click on the homepage icon)? calendar de Zeigt Ihre Standard-Kalendar-Ansicht auf der Startseite angezeigt werden (die Seite die sich nach dem Login öffnet oder wenn Sie auf Home klicken)?
do you want a weekview with or without weekend? calendar de Wollen Sie eine Wochenansicht mit oder ohne Wochenende?
do you want to be notified about new or changed appointments? you be notified about changes you make yourself.<br>you can limit the notifications to certain changes only. each item includes all the notification listed above it. all changes include changes of title, description, participants and the acceptions and rejections of the appointment. calendar de Möchten Sie über neue oder geänderte Termine benachrichtigt werden? Sie werden benachrichtigt werden über Änderungen welche Sie selbst durchführen.<br> Sie können die benachrichtigungen beschränken auf bestimmte Änderungen. Jeder auszuwählende Punkt schließt auch die darüber aufgeführten Benachrichtigungen mit ein. Alle Änderungen beinhaltet Änderungen des Titels, der Beschreibung, Teilnehmer so wie Zusagen so wie Absagen von Terminen.
do you want to be notified about new or changed appointments? you be notified about changes you make yourself.<br>you can limit the notifications to certain changes only. each item includes all the notification listed above it. all modifications include changes of title, description, participants, but no participant responses. if the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too. calendar de Wollen Sie über neue oder geänderte Termine benachrichtigt werden? Sie werden nie über eigene Änderungen benachrichtig.<br>Sie können die Benachrichtigungen auf verschiedene Änderungen begrenzen. Jede Zeile enthält die Benachrichtigungen der darüberliegenden. Alle Änderungen umfasst den Title, die Beschreibung, Teilnehmer, aber keine Antworten der Teilnehmer. Wenn der Ersteller eines Event irgendeine Benachrichtigung will, erhält er automatisch auch die Antworten der Teilnehmer, wie Zusagen und Absagen.
do you want to receive a regulary summary of your appointsments via email?<br>the summary is sent to your standard email-address on the morning of that day or on monday for weekly summarys.<br>it is only sent when you have any appointments on that day or week. calendar de Möchten Sie eine regelmäßige Zusammenfassung Ihrer Termine via E-Mail erhalten?<br>Die Zusammenfassung wird täglich (jeden Morgen), oder für eine wöchentliche Zusammenfassung Montags an Ihre standard E-Mail Adresse gesendet.<br> Die Benachrichtigung wird nur versendet wenn Sie am nächsten Tag oder in der nächsten Woche auch einen Termin haben.
@ -167,8 +172,11 @@ monthly calendar de Monatlich
monthly (by date) calendar de Monatlich (nach Datum)
monthly (by day) calendar de Monatlich (nach Wochentag)
monthview calendar de Monatsansicht
needs javascript to be enabled !!! calendar de Dafür muss Javascript aktiviert sein !!!
new entry calendar de Neuer Eintrag
new name must not exist and not be empty!!! calendar de Neuer Name darf nicht exisitieren und nicht leer sein!!!
next day calendar de nächster Tag
no filter calendar de Kein Filter
no matches found calendar de Keine Treffer gefunden
no matches found. calendar de Keine Treffer gefunden.
no response calendar de Keine Antwort
@ -210,6 +218,7 @@ planner by user calendar de Planer nach Benutzern
please confirm,accept,reject or examine changes in the corresponding entry in your calendar calendar de Bitte den entsprechenden Eintrag im Ihrem Kalendar bestätigen, Zusagen, Absagen oder die Änderungen beachten
please enter a filename !!! calendar de Bitte geben Sie einen Dateinamen an !!!
preselected group for entering the planner calendar de vorausgewählte Gruppe beim Planeraufruf
previous day calendar de vorheriger Tag
print calendars in black & white calendar de Kalender in schwarz und weiß drucken
print the mini calendars calendar de Mini- Kalender drucken
printer friendly calendar de Drucker-freundlich
@ -242,6 +251,7 @@ sa calendar de Sa
sat calendar de Sa
scheduling conflict calendar de Terminüberschneidung
search results calendar de Suchergebnisse
select a %1 calendar de %1 auswählen
selected contacts (%1) calendar de Ausgewählte Kontakte (%1)
send updates via email common de Updates via E-Mail senden
send/receive updates via email calendar de Senden/Empfangen von Aktualisierungen via EMail
@ -258,6 +268,11 @@ show default view on main screen calendar de Standardansicht auf der Startseite
show high priority events on main screen calendar de Termine mit hoher Priorität auf der Startseite anzeigen
show invitations you rejected calendar de Zeige Einladungen welche abgelehnt wurden an
show list of upcoming events calendar de Zeige eine Liste der kommenden Termine
show next seven days calendar de Nächsten sieben Tage anzeigen
show only one day calendar de Nur einen Tag anzeigen
show the calendar of multiple users calendar de Kalender von mehreren Benutzeren anzeigen
show this month calendar de Diesen Monat anzeigen
show this week calendar de Diese Woche anzeigen
single event calendar de Einzelner Termin
sorry, the owner has just deleted this event calendar de Der Eigentümer hat diesen Termin gerade gelöscht
sorry, this event does not exist calendar de Dieser Termin existiert nicht
@ -305,6 +320,7 @@ today calendar de Heute
translation calendar de Übersetzung
tu calendar de Di
tue calendar de Di
two dayview calendar de Zweitagesansicht
update a single entry by passing the fields. calendar de Einen einzelnen Termin über seine Felder updaten.
updated calendar de Aktualisiert
use end date calendar de Enddatum benutzen
@ -315,15 +331,18 @@ week calendar de Woche
weekday starts on calendar de Arbeitswoche beginnt am
weekly calendar de Wöchentlich
weekview calendar de Wochenansicht
weekview including weekend calendar de Wochenansicht mit Wochenende
weekview without weekend calendar de Wochenansicht ohne Wochenende
when creating new events default set to private calendar de neue Termine sind privat
which events do you want to see when you enter the calendar. calendar de Welche Termine möchten Sie angezeigt bekommen wenn Sie den Kalender öffnen?
which of calendar view do you want to see, when you start calendar ? calendar de Welche der möglichen Ansichten des Kalenders möchten Sie als Standard sehen wenn der Kalender geöffnet wird?
wk calendar de KW
work day ends on calendar de Arbeitstag endet um
work day starts on calendar de Arbeitstag beginnt um
workdayends calendar de Arbeitstag endet
year calendar de Jahr
yearly calendar de Jährlich
yearview calendar de Jährliche Ansicht
yearview calendar de Jahresansicht
you can either set a year or a occurence, not both !!! calendar de Sie können nur entweder das Jahr oder die Wiederholung angeben, nicht beides!
you can only set a year or a occurence !!! calendar de Sie können nur ein Jahr oder eine Wiederholung angeben !
you do not have permission to add alarms to this event !!! calendar de Sie haben keine Berechtigung Alarme zu diesem Termin zuzufügen !!!

View File

@ -20,6 +20,7 @@ alarm for %1 at %2 in %3 calendar en Alarm for %1 at %2 in %3
alarm management calendar en Alarm Management
alarm-management calendar en Alarm-Management
alarms calendar en Alarms
all categories calendar en All categories
all day calendar en All Day
are you sure you want to delete this country ? calendar en Are you sure you want to delete this Country ?
are you sure you want to delete this holiday ? calendar en Are you sure you want to delete this holiday ?
@ -61,6 +62,7 @@ default appointment length (in minutes) calendar en default appointment length (
default calendar filter calendar en Default calendar filter
default calendar view calendar en Default calendar view
default length of newly created events. the length is in minutes, eg. 60 for 1 hour. calendar en Default length of newly created events. The length is in minutes, eg. 60 for 1 hour.
default week view calendar en Default week view
defines the size in minutes of the lines in the day view. calendar en Defines the size in minutes of the lines in the day view.
delete a single entry by passing the id. calendar en Delete a single entry by passing the id.
delete an entire users calendar. calendar en Delete an entire users calendar.
@ -69,12 +71,15 @@ delete series calendar en Delete Series
delete single calendar en Delete Single
deleted calendar en Deleted
description calendar en Description
determining window width ... calendar en Determining window width ...
disable calendar en Disable
disabled calendar en disabled
display interval in day view calendar en Display interval in Day View
display mini calendars when printing calendar en Display mini calendars when printing
display status of events calendar en Display Status of Events
displayed view calendar en displayed view
displays your default calendar view on the startpage (page you get when you enter egroupware or click on the homepage icon)? calendar en Displays your default calendar view on the startpage (page you get when you enter eGroupWare or click on the homepage icon)?
do you want a weekview with or without weekend? calendar en Do you want a weekview with or without weekend?
do you want to be notified about new or changed appointments? you be notified about changes you make yourself.<br>you can limit the notifications to certain changes only. each item includes all the notification listed above it. all modifications include changes of title, description, participants, but no participant responses. if the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too. calendar en Do you want to be notified about new or changed appointments? You be notified about changes you make yourself.<br>You can limit the notifications to certain changes only. Each item includes all the notification listed above it. All modifications include changes of title, description, participants, but no participant responses. If the owner of an event requested any notifcations, he will always get the participant responses like acceptions and rejections too.
do you want to receive a regulary summary of your appointsments via email?<br>the summary is sent to your standard email-address on the morning of that day or on monday for weekly summarys.<br>it is only sent when you have any appointments on that day or week. calendar en Do you want to receive a regulary summary of your appointsments via email?<br>The summary is sent to your standard email-address on the morning of that day or on Monday for weekly summarys.<br>It is only sent when you have any appointments on that day or week.
do you wish to autoload calendar holidays files dynamically? admin en Do you wish to autoload calendar holidays files dynamically?
@ -157,8 +162,11 @@ monthly calendar en Monthly
monthly (by date) calendar en Monthly (by date)
monthly (by day) calendar en Monthly (by day)
monthview calendar en Month View
needs javascript to be enabled !!! calendar en Needs javascript to be enabled !!!
new entry calendar en New Entry
new name must not exist and not be empty!!! calendar en New name must not exist and not be empty!!!
next day calendar en next day
no filter calendar en No filter
no matches found calendar en No matches found
no response calendar en No Response
notification messages for added events calendar en Notification messages for added events
@ -195,6 +203,7 @@ planner by user calendar en Planner by user
please confirm,accept,reject or examine changes in the corresponding entry in your calendar calendar en Please confirm, accept, reject or examine changes in the corresponding entry in your calendar
please enter a filename !!! calendar en please enter a filename !!!
preselected group for entering the planner calendar en Preselected group for entering the planner
previous day calendar en previous day
print calendars in black & white calendar en Print calendars in black & white
print the mini calendars calendar en Print the mini calendars
printer friendly calendar en Printer Friendly
@ -225,6 +234,7 @@ sa calendar en Sa
sat calendar en Sat
scheduling conflict calendar en Scheduling Conflict
search results calendar en Search Results
select a %1 calendar en Select a %1
selected contacts (%1) calendar en Selected contacts (%1)
send updates via email common en Send updates via EMail
send/receive updates via email calendar en Send/Receive updates via EMail
@ -241,6 +251,11 @@ show default view on main screen calendar en Show default view on main screen
show high priority events on main screen calendar en Show high priority events on main screen
show invitations you rejected calendar en Show invitations you rejected
show list of upcoming events calendar en Show list of upcoming events
show next seven days calendar en Show next seven days
show only one day calendar en Show only one day
show the calendar of multiple users calendar en show the calendar of multiple users
show this month calendar en show this month
show this week calendar en show this week
single event calendar en single event
sorry, the owner has just deleted this event calendar en Sorry, the owner has just deleted this event
sorry, this event does not exist calendar en Sorry, this event does not exist
@ -286,6 +301,7 @@ today calendar en Today
translation calendar en Translation
tu calendar en T
tue calendar en Tue
two dayview calendar en two dayview
update a single entry by passing the fields. calendar en Update a single entry by passing the fields.
updated calendar en Updated
use end date calendar en Use End date
@ -296,9 +312,12 @@ week calendar en Week
weekday starts on calendar en Weekday starts on
weekly calendar en Weekly
weekview calendar en Week View
weekview including weekend calendar en Weekview including weekend
weekview without weekend calendar en weekview without weekend
when creating new events default set to private calendar en When creating new events default set to private
which events do you want to see when you enter the calendar. calendar en Which events do you want to see when you enter the calendar.
which of calendar view do you want to see, when you start calendar ? calendar en Which of calendar view do you want to see when you start calendar ?
wk calendar en Wk
work day ends on calendar en Work day ends on
work day starts on calendar en Work day starts on
workdayends calendar en workdayends

View File

@ -106,7 +106,7 @@ firstname of person to notify calendar fr Pr
format of event updates calendar fr Format des mises à jour d'événement
fr calendar fr V
free/busy calendar fr Libre/occupé
freebusy: unknow user '%1', wrong password or not availible to not loged in users !!! calendar fr
freebusy: unknow user '%1', wrong password or not available to not loged in users !!! calendar fr
frequency calendar fr Fréquence
fri calendar fr Ven
full description calendar fr Description complète
@ -129,7 +129,7 @@ hours calendar fr Heures
i participate calendar fr Je participe
ical / rfc2445 calendar fr iCal / rfc2445
if checked holidays falling on a weekend, are taken on the monday after. calendar fr Si activé les vacances tombant sur un Week-End, sont prises sur le lundi d'après.
if you dont set a password here, the information is availible to everyone, who knows the url!!! calendar fr Si vous ne mettez pas de mot de passe ici, l'information sera accessible par n'importe quelle personne connaissant l'URL!
if you dont set a password here, the information is available to everyone, who knows the url!!! calendar fr Si vous ne mettez pas de mot de passe ici, l'information sera accessible par n'importe quelle personne connaissant l'URL!
ignore conflict calendar fr Ignorer le conflit
import calendar fr Import
import csv-file common fr Importer un fichier CSV
@ -148,7 +148,6 @@ list all categories. calendar fr Lister toutes les cat
load [iv]cal calendar fr Charger [iv]Cal
location calendar fr Emplacement
location to autoload from admin fr Emplacement depuis lequel auto-charger
make freebusy information availible to not loged in persons? calendar fr
matrixview calendar fr Vue matricielle
minutes calendar fr minutes
mo calendar fr L
@ -194,7 +193,7 @@ password for not loged in users to your freebusy information? calendar fr
people holiday calendar fr Vacances des personnes
permission denied calendar fr Permission refusée
planner calendar fr Planificateur
planner by category calendar fr Planificateur par catégrie
planner by category calendar fr Planificateur par catégorie
planner by user calendar fr Planificateur par utilisateur
please confirm,accept,reject or examine changes in the corresponding entry in your calendar calendar fr SVP confirmez, acceptez, rejetez ou examinez les modifications dans l'entrée correspondante de votre calendrier
please enter a filename !!! calendar fr veuillez entrer un nom de fichier !!!
@ -329,3 +328,18 @@ you need to set either a day or a occurence !!! calendar fr Vous devez r
your meeting scheduled for %1 has been canceled calendar fr Votre réunion planifiée pour %1 a été annulée
your meeting that had been scheduled for %1 has been rescheduled to %2 calendar fr Votre réunion qui avait été planifiée pour %1 a été replanifiée pour %2
your suggested time of <b> %1 - %2 </b> conflicts with the following existing calendar entries: calendar fr L'heure que vous avez suggéré <B> %1 - %2 </B> entre en conflit avec les entrés suivantes du calendrier:
weekview without weekend calendar fr Vue par semaine sans Week-end
No filter calendar fr Pas de filtre
All categories calendar fr Pas de catégories
default week view calendar fr Vue par défaut pour les semaines
How much day do you want to see per week ? calendar fr Combien de jour voulez-vous afficher par semaine ?
previous day calendar fr précédent jour
next day calendar fr suivant jour
show next seven days calendar fr Voir les 7 prochains jours
show only one day calendar fr Voir un seul jour
show this week calendar fr Voir cette semaine
show the calendar of multiple users calendar fr Montrer le calendrier en multi-utilisateurs
make freebusy information available to not loged in persons? calendar fr Rends l'information de disponibilité accessible aux personnes non loggées
should not loged in persons be able to see your freebusy information? You can set an extra password, different from your normal password, to protect this informations. The freebusy information is in iCal format and only include the times when you are busy. It does not include the event-name, description or locations. The URL to your freebusy information is %1. calendar fr Permet aux personnes non connectés de disposer des informations de disponibilités. Vous pouvez définir un « extra password » différent de votre mot de passe habituel, afin de protéger cette information. Les informations disposées sont aux format iCal et inclus le temps ou vous êtes occupés. Il n'include pas le nom de l'évènement en lui-même, ni même sa description et ni sa localisation. Le lien pour voir cette information est celui ci : %1
password for not loged in users to your freebusy information? calendar fr Le mot de passe « informations de disponibilité » pour les utilisateurs non-loggués
if you dont set a password here, the information is available to everyone, who knows the url!!! calendar fr Si vous ne définissez pas de mot de passe ici, vos informations de disponibilitées seront accessibles par tous connaissant l'adresse !!!

View File

@ -47,7 +47,7 @@
$setup_info['calendar']['hooks'][] = 'manual';
$setup_info['calendar']['hooks'][] = 'preferences';
$setup_info['calendar']['hooks'][] = 'settings';
$setup_info['calendar']['hooks'][] = 'sidebox_menu';
$setup_info['calendar']['hooks']['sidebox_menu'] = 'calendar.uical.sidebox_menu';
/* Dependencies for this app to work */
$setup_info['calendar']['depends'][] = array(

View File

@ -1,5 +1,212 @@
/* CSS Document */
/*
* CSS settings for the new uiviews code
*/
/* timeGridWidget, contains timeRow's and dayCol's
*/
.calTimeGrid{
position: relative;
top: 0px;
left: 0px;
border:1px solid gray;
margin-top: 20px; /* contains the dayColHeader */
/* set via inline style on runtime:
* width:
*/
}
/* single row in the time-line, always used in conjunction with row_{on|off}, you dont need to set a bgcolor, but you can
*/
.calTimeRow,.calTimeRowOff{
position: relative;
width: 100%;
/* set via inline style on runtime:
* height:
*/
}
.calTimeRow{
/* background-color: silver; */
}
/* time in a timeRow
*/
.calTimeRowTime{
padding-left: 5px;
height: 100%;
}
/* contains (multiple) dayCol's
*/
.calDayCols{
position: absolute;
top: 0px;
height: 100%;
/* set via inline style on runtime:
* left: width(calTimeRowTime)
* width: 100% - width(calTimeRowTime)
*/
}
/* contains (multiple) eventCol's
*/
.calDayCol{
position: absolute;
top: 0px;
height: 100%;
/* set via inline style on runtime:
* left:
* width:
*/
border-left: 1px solid gray;
}
/* header for the dayCol
*/
.calDayColHeader,.calGridHeader{
position: absolute;
top: -20px;
width: 100%;
text-align: center;
font-size: 100%;
white-space: nowrap;
border: 1px solid gray;
height: 16px;
left: -1px;
padding-top: 2px;
}
.calToday{
background: #ffffcc;
}
.calHoliday{
background: #dac0c0;
}
.calViewUserNameBox {
position: absolute;
top: -1px;
width: 95%;
text-align: left;
font-size: 120%;
white-space: nowrap;
border: 1px solid gray;
height: 17px;
left: -1px;
padding-top: 0px;
padding-left: 10px;
background: #dac0c0;
}
.calViewUserName {
font-weight: normal;
}
.calViewUserName:first-letter {
text-transform:uppercase;
}
.calViewUserNameFirst {
}
.calViewUserNameFirst:after {
content: ", ";
}
/* header of the time-grid, eg. for the weeks in the month-view (leftmost of the day-col-headers)
*/
.calGridHeader{
text-align: left;
padding-left: 3px;
}
/* contains (multiple) events's
*/
.calEventCol{
position: absolute;
top: 0px;
height: 100%;
/* set via inline style on runtime:
* left:
* width:
*/
/* border: 1px dotted red; */
}
/* contains one event: header-row & -body
*/
.calEvent,.calEvent:hover{
position: absolute;
/* background-color: #ffffC0;*/
left: 0px;
width: 100%;
overflow: hidden;
/* set via inline style on runtime:
* top: depending on startime
* top: depending on length
*/
}
.calEvent:hover{
/* background-color: #ffff80;*/
cursor: pointer;
cursor: hand;
}
/* header-row of the event
*/
.calEventHeader,.calEventHeaderSmall{
font-weight: bold;
font-size: 14px;
background-color: #0000ff;
color: white;
text-align: center;
white-space: nowrap;
}
.calEventHeaderSmall{
font-size: 10px;
}
/* body of the event
*/
.calEventBody,.calEventBodySmall{
padding: 0px 3px 0px;
}
.calEventBodySmall{
font-size: 95%;
}
.calEventLabel
{
font-weight: bold;
font-size: 90%;
}
.calEventTitle
{
font-weight: bold;
font-size: 110%;
}
/* cal day-view's todo column
*/
.calDayToDos {
width: 250px;
text-align: center;
}
/* header row
*/
.calDayTodos .calDayTodosHeader {
margin: 0px;
padding: 2px;
font-weight: bold;
}
/* div containing the table with the ToDo's
*/
.calDayTodos .calDayTodosTable {
overflow: auto;
max-height: 400px;
}
/*
* From here on, settings for the "old" uicalendar code
*/
.to_continue
{
font-size: 9px;
@ -17,7 +224,7 @@ A.bminicalendar
color: #336699;
font-style: italic;
font-weight: bold;
font-size: 9px;
font-size: 9px;
}
A.minicalendargrey
@ -31,7 +238,7 @@ A.bminicalendargrey
{
color: #336699;
font-style: italic;
font-size:10px;
font-size:10px;
}
A.minicalhol
@ -40,7 +247,7 @@ A.minicalhol
padding-right:3px;
background: #dab0b0;
color: #000000;
font-size: 10px;
font-size: 10px;
}
A.bminicalhol
@ -49,7 +256,7 @@ A.bminicalhol
padding-right:3px;
background: #dab0b0;
color: #336699;
font-size: 10px;
font-size: 10px;
}
A.minicalgreyhol
@ -58,7 +265,7 @@ A.minicalgreyhol
padding-right:3px;
background: #dab0b0;
color: #999999;
font-size: 10px;
font-size: 10px;
}
A.bminicalgreyhol
@ -67,7 +274,7 @@ A.bminicalgreyhol
padding-right:3px;
background: #dab0b0;
color: #999999;
font-size: 10px;
font-size: 10px;
}
@ -259,4 +466,4 @@ A.event_entry
font-size: 10px;
font-weight: bold;
font-style: italic;
}
}

View File

@ -0,0 +1,47 @@
<!-- BEGIN event_widget -->
<table style="width: 99%; margin: 0px; padding: 0px;" cellpadding="0" cellspacing="0" border="0" align="center" {tooltip}>
<tr style="height: {header_height};" valign="top">
<td style="width: {corner_radius}; background: url({upper_left_corner}) no-repeat;"></td>
<td valign="middle" class="calEventHeader{Small}" style="height: {header_height}; border-top: {border} px solid {bordercolor}; background-color: {headerbgcolor};">{header_icons} {header}</td>
<td style="width: {corner_radius}; background: url({upper_right_corner}) no-repeat;"></td>
</tr>
<tr valign="top" style="height: {body_height};">
<td colspan="3" class="calEventBody{Small}" style="background: {bodybackground}; border-left: {border}px solid {bordercolor}; border-right: {border}px solid {bordercolor};">
<p style="margin: 0px;">{body_icons}
<span class="calEventTitle">{title}</span>
</td>
</tr>
<tr style="height: {corner_radius};">
<td style="width: {corner_radius}; background: url({lower_left_corner}) no-repeat;"></td>
<td style="border-bottom: {border}px solid {bordercolor}; background: {bodybackground};"></td>
<td style="width: {corner_radius}; background: url({lower_right_corner}) no-repeat"></td>
</tr>
</table>
<!-- END event_widget -->
<!-- BEGIN event_tooltip -->
<table style="width: 99%; margin: 0px; padding: 0px;" cellpadding="0" cellspacing="0" border="0" align="center">
<tr style="height: {header_height};" valign="top">
<td style="width: {corner_radius}; background: url({upper_left_corner}) no-repeat;"></td>
<td valign="middle" class="calEventHeader{Small}" style="height: {header_height}; border-top: {border} px solid {bordercolor}; background-color: {headerbgcolor};">{header_icons} {header}</td>
<td style="width: {corner_radius}; background: url({upper_right_corner}) no-repeat;"></td>
</tr>
<tr valign="top">
<td colspan="3" class="calEventBody{Small}" style="background: {bodybackground}; border-left: {border}px solid {bordercolor}; border-right: {border}px solid {bordercolor};">
<p style="margin: 0px;">{body_icons}
<span class="calEventTitle">{title}</span><br>
{description}</p>
<p style="margin: 2px 0px;">{multidaytimes}
{location}
{category}
{participants}</p>
</td>
</tr>
<tr style="height: {corner_radius};">
<td style="width: {corner_radius}; background: url({lower_left_corner}) no-repeat;"></td>
<td style="border-bottom: {border}px solid {bordercolor}; background: {bodybackground};"></td>
<td style="width: {corner_radius}; background: url({lower_right_corner}) no-repeat"></td>
</tr>
</table>
<!-- END event_tooltip -->

View File

@ -35,7 +35,7 @@
$tpl->set_block('head_tpl','head_table','head_table');
$tpl->set_block('head_tpl','head_col','head_col');
$tpl->set_block('form_button_script','form_button');
return;
if(floor(phpversion()) >= 4)
{
$tpl->set_var('cols',8);
@ -131,7 +131,7 @@
$form_options = '<option value="user"'.($this->bo->sortby=='user'?' selected':'').'>'.lang('User').'</option>'."\n";
$form_options .= ' <option value="category"'.((!isset($this->bo->sortby) || !$this->bo->sortby) || $this->bo->sortby=='category'?' selected':'').'>'.lang('Category').'</option>'."\n";
$var = Array(
'form_width' => '28',
'form_link' => $this->page($referrer),
@ -151,7 +151,7 @@
$remainder -= 28;
$form_options = '<option value=" all "'.($this->bo->filter==' all '?' selected':'').'>'.lang('All').'</option>'."\n";
$form_options .= ' <option value=" private "'.((!isset($this->bo->filter) || !$this->bo->filter) || $this->bo->filter==' private '?' selected':'').'>'.lang('Private Only').'</option>'."\n";
$var = Array(
'form_width' => '28',
'form_link' => $this->page($referrer),
@ -174,7 +174,7 @@
{
$form_options .= ' <option value="'.$grant['value'].'"'.($grant['grantor']==$this->bo->owner?' selected':'').'>'.$grant['name'].'</option>'."\n";
}
$var = Array(
'form_width' => $remainder,
'form_link' => $this->page($referrer),