new class naming schema

This commit is contained in:
Ralf Becker 2008-06-07 17:45:33 +00:00
parent d85ed846fe
commit ef700b0061
32 changed files with 4170 additions and 4806 deletions

View File

@ -366,7 +366,7 @@ class addressbook_bo extends addressbook_so
if (!$data['freebusy_uri'] && !$data['owner'] && $data['account_id'] && !is_object($GLOBALS['egw_setup']))
{
static $fb_url;
if (!$fb_url && @is_dir(EGW_SERVER_ROOT.'/calendar/inc')) $fb_url = ExecMethod('calendar.bocal.freebusy_url','');
if (!$fb_url && @is_dir(EGW_SERVER_ROOT.'/calendar/inc')) $fb_url = calendar_bo::freebusy_url('');
if ($fb_url) $data['freebusy_uri'] = $fb_url.urlencode($GLOBALS['egw']->accounts->id2name($data['account_id']));
}
return $data;
@ -944,8 +944,7 @@ class addressbook_bo extends addressbook_so
}
if (!$uids) return array();
include_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.bocal.inc.php');
$bocal = new bocal;
$bocal = new calendar_bo();
$events = $bocal->search(array(
'users' => $uids,
'enum_recuring' => true,

View File

@ -37,7 +37,7 @@
$GLOBALS['egw']->redirect_link('/admin/index.php');
}
$GLOBALS['egw_info']['flags']['app_header'] = $GLOBALS['egw_info']['apps']['calendar']['title'].' - '.lang('Import CSV-File');
$cal =& CreateObject('calendar.uical',true);
$cal = new calendar_ui(true);
$GLOBALS['egw']->common->egw_header();
$GLOBALS['egw']->template->set_file(array('import_t' => 'csv_import.tpl'));
@ -62,7 +62,7 @@
function addr_id( $n_family,$n_given,$org_name )
{ // find in Addressbook, at least n_family AND (n_given OR org_name) have to match
$contacts =& CreateObject('phpgwapi.contacts');
$contacts = new contacts();
$addrs = $contacts->read(0,0,array('id'),'',"n_family=$n_family,n_given=$n_given,org_name=$org_name");
if(!count($addrs))

View File

@ -1,16 +1,14 @@
<?php
/**************************************************************************\
* eGroupWare - freebusy times as iCals *
* 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$ */
/**
* iCal import and export via Horde iCalendar classes
*
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package calendar
* @subpackage export
* @version $Id$
*/
$GLOBALS['egw_info'] = array(
'flags' => array(
@ -73,4 +71,4 @@
{
ExecMethod2('phpgwapi.browser.content_header','freebusy.ifb','text/calendar');
}
echo ExecMethod2('calendar.boical.freebusy',$user,$_GET['end']);
echo ExecMethod2('calendar.calendar_ical.freebusy',$user,$_GET['end']);

View File

@ -103,7 +103,7 @@ class import_events_csv implements iface_import_plugin {
$this->dry_run = isset( $_definition->plugin_options['dry_run'] ) ? $_definition->plugin_options['dry_run'] : false;
// fetch the calendar bo
$this->bocalupdate = CreateObject('calendar.bocalupdate');
$this->bocalupdate = new calendar_boupdate();
// set FieldMapping.
$import_csv->mapping = $_definition->plugin_options['field_mapping'];
@ -123,8 +123,8 @@ class import_events_csv implements iface_import_plugin {
// trash_users_records ?
if ( $_definition->plugin_options['trash_users_records'] === true ) {
if ( !$_definition->plugin_options['dry_run'] ) {
$socal = CreateObject( 'calendar.socal' );
$socal->change_delete_user( $_definition->plugin_options['events_owner'], false );
$socal = new calendar_socal();
$this->bocalupdate->so->deleteaccount( $_definition->plugin_options['events_owner']);
unset( $socal );
} else {
$lid = $GLOBALS['egw']->accounts->id2name( $_definition->plugin_options['events_owner'] );

View File

@ -2,16 +2,16 @@
/**
* eGroupWare - Calendar's XMLRPC or SOAP access
*
* Please note: dont use addressbook_... naming convention, as it would break the existing xmlrpc clients
*
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2005-7 by RalfBecker-At-outdoor-training.de
* @copyright (c) 2005-8 by RalfBecker-At-outdoor-training.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.bocalupdate.inc.php');
/**
* Class to access AND manipulate calendar data via XMLRPC or SOAP
*
@ -33,9 +33,9 @@ class bocalendar
'list_methods' => True,
);
function bocalendar()
function __construct()
{
$this->cal =& new bocalupdate();
$this->cal =& new calendar_boupdate();
if (is_object($GLOBALS['server']) && $GLOBALS['server']->simpledate)
{

File diff suppressed because it is too large Load Diff

View File

@ -10,29 +10,21 @@
* @version $Id: class.ajaxcalendar.inc.php 22777 2006-11-26 20:55:00Z jaytraxx $
*/
require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.bocalupdate.inc.php');
/**
* General object of the calendar ajax class
*
* @package calendar
* @author Christian Binder <christian.binder@freakmail.de>
* @copyright (c) 2006 by Christian Binder <christian.binder@freakmail.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
*/
class ajaxcalendar {
class calendar_ajax {
/**
* calendar object to handle events
*
* @var bocalupdate
* @var calendar_boupdate
*/
var $calendar;
function ajaxcalendar()
function __construct()
{
$this->calendar = new bocalupdate;
$this->calendar = new calendar_boupdate();
}
/**
@ -63,13 +55,13 @@ class ajaxcalendar {
$response =& new xajaxResponse();
if(!is_array($conflicts))
{
$response->addRedirect($PHP_SELF);
$response->addRedirect('');
}
else
{
$response->addScriptCall(
'egw_openWindowCentered2',
$GLOBALS['egw_info']['server']['webserver_url'].'/index.php?menuaction=calendar.uiforms.edit
$GLOBALS['egw_info']['server']['webserver_url'].'/index.php?menuaction=calendar.calendar_uiforms.edit
&cal_id='.$event['id']
.'&start='.$event['start']
.'&end='.$event['end']

View File

@ -5,13 +5,11 @@
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2004-7 by RalfBecker-At-outdoor-training.de
* @copyright (c) 2004-8 by RalfBecker-At-outdoor-training.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.socal.inc.php');
if (!defined('ACL_TYPE_IDENTIFER')) // used to mark ACL-values for the debug_message methode
{
define('ACL_TYPE_IDENTIFER','***ACL***');
@ -27,8 +25,6 @@ define('WEEK_s',7*DAY_s);
*/
define('EGW_ACL_READ_FOR_PARTICIPANTS',EGW_ACL_CUSTOM_1);
require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.socal.inc.php');
/**
* Class to access all calendar data
*
@ -47,7 +43,7 @@ require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.socal.inc.php');
*
* All permanent debug messages of the calendar-code should done via the debug-message method of this class !!!
*/
class bocal
class calendar_bo
{
/**
* @var int $debug name of method to debug or level of debug-messages:
@ -152,11 +148,11 @@ class bocal
/**
* Constructor
*/
function bocal()
function __construct()
{
if ($this->debug > 0) $this->debug_message('bocal::bocal() started',True,$param);
$this->so = new socal();
$this->so = new calendar_so();
$this->datetime = $GLOBALS['egw']->datetime;
$this->common_prefs =& $GLOBALS['egw_info']['user']['preferences']['common'];
@ -1737,31 +1733,6 @@ class bocal
return $result;
}
/**
* Hook called by link-class to include calendar in the appregistry of the linkage
*
* @param array/string $location location and other parameters (not used)
* @return array with method-names
*/
function search_link($location)
{
return array(
'query' => 'calendar.bocal.link_query',
'title' => 'calendar.bocal.link_title',
'view' => array(
'menuaction' => 'calendar.uiforms.edit',
),
'view_id' => 'cal_id',
'view_popup' => '750x400',
'add' => array(
'menuaction' => 'calendar.uiforms.edit',
),
'add_app' => 'link_app',
'add_id' => 'link_id',
'add_popup' => '750x400',
);
}
/**
* sets the default prefs, if they are not already set (on a per pref. basis)
*
@ -1826,7 +1797,7 @@ class bocal
* @param int/string $user account_id or account_lid
* @param string $pw=null password
*/
function freebusy_url($user,$pw=null)
static function freebusy_url($user,$pw=null)
{
if (is_numeric($user)) $user = $GLOBALS['egw']->accounts->id2name($user);
@ -1836,20 +1807,3 @@ class bocal
($pw ? '&password='.urlencode($pw) : '');
}
}
if (!function_exists('array_intersect_key')) // php5.1 function
{
function array_intersect_key($array1,$array2)
{
$intersection = $keys = array();
foreach(func_get_args() as $arr)
{
$keys[] = array_keys((array)$arr);
}
foreach(call_user_func_array('array_intersect',$keys) as $key)
{
$intersection[$key] = $array1[$key];
}
return $intersection;
}
}

View File

@ -5,13 +5,11 @@
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2005-7 by RalfBecker-At-outdoor-training.de
* @copyright (c) 2005-8 by RalfBecker-At-outdoor-training.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.bocal.inc.php');
// types of messsages send by bocalupdate::send_update
define('MSG_DELETED',0);
define('MSG_MODIFIED',1);
@ -39,7 +37,7 @@ define('MSG_DISINVITE',7);
* All permanent debug messages of the calendar-code should done via the debug-message method of the bocal class !!!
*/
class bocalupdate extends bocal
class calendar_boupdate extends calendar_bo
{
/**
* name of method to debug or level of debug-messages:
@ -60,11 +58,11 @@ class bocalupdate extends bocal
/**
* Constructor
*/
function bocalupdate()
function __construct()
{
if ($this->debug > 0) $this->debug_message('bocalupdate::bocalupdate() started',True);
$this->bocal(); // calling the parent constructor
parent::__construct(); // calling the parent constructor
if ($this->debug > 0) $this->debug_message('bocalupdate::bocalupdate() finished',True);
}

View File

@ -1,33 +1,26 @@
<?php
/**************************************************************************\
* eGroupWare - ProjectManager - DataSource for InfoLog *
* http://www.egroupware.org *
* Written and (c) 2005 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$ */
/**
* DataSource for the Calendar
*
* @link http://www.egroupware.org
* @package calendar
* @author RalfBecker-AT-outdoor-training.de
* @copyright (c) 2005-8 by RalfBecker-AT-outdoor-training.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
include_once(EGW_INCLUDE_ROOT.'/projectmanager/inc/class.datasource.inc.php');
/**
* DataSource for the Calendar
*
* @package calendar
* @author RalfBecker-AT-outdoor-training.de
* @copyright (c) 2005 by RalfBecker-AT-outdoor-training.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
*/
class datasource_calendar extends datasource
class calendar_datasource extends datasource
{
/**
* Constructor
*/
function datasource_calendar()
function __construct()
{
$this->datasource('calendar');
@ -42,15 +35,16 @@ class datasource_calendar extends datasource
*/
function get($data_id)
{
// we use $GLOBALS['bocal'] as an already running instance is availible there
if (!is_object($GLOBALS['bocal']))
// we use $cal as an already running instance is availible there
if (!is_object($GLOBALS['calendar_bo']))
{
include_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.bocal.inc.php');
$GLOBALS['bocal'] =& new bocal();
$GLOBALS['calendar_bo'] = new calendar_bo();
}
$cal = $GLOBALS['calendar_bo'];
if (!is_array($data_id))
{
if (!(int) $data_id || !($data = $GLOBALS['bocal']->read((int) $data_id)))
if (!(int) $data_id || !($data = $cal->read((int) $data_id)))
{
return false;
}
@ -60,9 +54,9 @@ class datasource_calendar extends datasource
$data =& $data_id;
}
$ds = array(
'pe_title' => $GLOBALS['bocal']->link_title($data),
'pe_planned_start' => $GLOBALS['bocal']->date2ts($data['start']),
'pe_planned_end' => $GLOBALS['bocal']->date2ts($data['end']),
'pe_title' => $cal->link_title($data),
'pe_planned_start' => $cal->date2ts($data['start']),
'pe_planned_end' => $cal->date2ts($data['end']),
'pe_resources' => array(),
'pe_details' => $data['description'] ? nl2br($data['description']) : '',
);
@ -74,11 +68,11 @@ class datasource_calendar extends datasource
{
foreach(array('start','end') as $name)
{
$$name = $GLOBALS['bocal']->date2array($ds['pe_planned_'.$name]);
$$name = $cal->date2array($ds['pe_planned_'.$name]);
${$name}['hour'] = 12;
${$name}['minute'] = ${$name}['second'] = 0;
unset(${$name}['raw']);
$$name = $GLOBALS['bocal']->date2ts($$name);
$$name = $cal->date2ts($$name);
}
$nights = round(($end - $start) / DAY_s);

View File

@ -11,8 +11,6 @@
* @version $Id$
*/
require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.bocalupdate.inc.php');
/**
* eGroupWare: GroupDAV access: calendar handler
*/
@ -21,7 +19,7 @@ class calendar_groupdav extends groupdav_handler
/**
* bo class of the application
*
* @var bocalupdate
* @var calendar_boupdate
*/
var $bo;
@ -49,7 +47,7 @@ class calendar_groupdav extends groupdav_handler
{
parent::__construct($app,$debug,$base_uri);
$this->bo =& new bocalupdate();
$this->bo =& new calendar_boupdate();
}
/**

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,503 @@
<?php
/**
* eGroupWare calendar - SIF Parser for SyncML
*
* @link http://www.egroupware.org
* @author Lars Kneschke <lkneschke@egroupware.org>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package calendar
* @subpackage export
* @version $Id$
*/
require_once EGW_SERVER_ROOT.'/phpgwapi/inc/horde/Horde/iCalendar.php';
/**
* SIF Parser for SyncML
*/
class sifcalendar extends calendar_boupdate
{
var $sifMapping = array(
'Start' => 'start',
'End' => 'end',
'AllDayEvent' => 'alldayevent',
'BillingInformation' => '',
'Body' => 'description',
'BusyStatus' => '',
'Categories' => 'category',
'Companies' => '',
'Importance' => 'priority',
'IsRecurring' => 'isrecurring',
'Location' => 'location',
'MeetingStatus' => '',
'Mileage' => '',
'ReminderMinutesBeforeStart' => 'reminderstart',
'ReminderSet' => 'reminderset',
'ReplyTime' => '',
'Sensitivity' => 'public',
'Subject' => 'title',
'RecurrenceType' => 'recur_type',
'Interval' => 'recur_interval',
'MonthOfYear' => '',
'DayOfMonth' => '',
'DayOfWeekMask' => 'recur_weekmask',
'Instance' => '',
'PatternStartDate' => '',
'NoEndDate' => 'recur_noenddate',
'PatternEndDate' => 'recur_enddate',
'Occurrences' => '',
);
// the calendar event array
var $event;
// constants for recurence type
const olRecursDaily = 0;
const olRecursWeekly = 1;
const olRecursMonthly = 2;
const olRecursMonthNth = 3;
const olRecursYearly = 5;
const olRecursYearNth = 6;
// constants for weekdays
const olSunday = 1;
const olMonday = 2;
const olTuesday = 4;
const olWednesday = 8;
const olThursday = 16;
const olFriday = 32;
const olSaturday = 64;
function startElement($_parser, $_tag, $_attributes) {
}
function endElement($_parser, $_tag) {
//error_log('endElem: ' . $_tag .' => '. trim($this->sifData));
if(!empty($this->sifMapping[$_tag])) {
$this->event[$this->sifMapping[$_tag]] = trim($this->sifData);
}
unset($this->sifData);
}
function characterData($_parser, $_data) {
$this->sifData .= $_data;
}
function siftoegw($_sifdata) {
$vcal = &new Horde_iCalendar;
$finalEvent = array();
$sysCharSet = $GLOBALS['egw']->translation->charset();
$sifData = base64_decode($_sifdata);
#error_log($sifData);
$tmpfname = tempnam('/tmp/sync/contents','sife_');
$handle = fopen($tmpfname, "w");
fwrite($handle, $sifData);
fclose($handle);
$this->xml_parser = xml_parser_create('UTF-8');
xml_set_object($this->xml_parser, $this);
xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, false);
xml_set_element_handler($this->xml_parser, "startElement", "endElement");
xml_set_character_data_handler($this->xml_parser, "characterData");
$this->strXmlData = xml_parse($this->xml_parser, $sifData);
if(!$this->strXmlData) {
error_log(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($this->xml_parser)),
xml_get_current_line_number($this->xml_parser)));
return false;
}
#error_log(print_r($this->event, true));
foreach($this->event as $key => $value) {
$value = $GLOBALS['egw']->translation->convert($value, 'utf-8', $sysCharSet);
#error_log("$key => $value");
switch($key) {
case 'alldayevent':
if($value == 1) {
$startParts = explode('-',$this->event['start']);
$finalEvent['start'] = mktime(0, 0, 0, $startParts[1], $startParts[2], $startParts[0]);
$endParts = explode('-',$this->event['end']);
$finalEvent['end'] = mktime(23, 59, 59, $endParts[1], $endParts[2], $endParts[0]);
}
break;
case 'public':
$finalEvent[$key] = ((int)$value > 0) ? 0 : 1;
break;
case 'category':
if(!empty($value)) {
$finalEvent[$key] = implode(',',$this->find_or_add_categories(explode(';', $value)));
}
break;
case 'end':
case 'start':
if($this->event['alldayevent'] < 1) {
$finalEvent[$key] = $vcal->_parseDateTime($value);
error_log("event ".$key." val=".$value.", parsed=".$finalEvent[$key]);
}
break;
case 'isrecurring':
if($value == 1) {
$finalEvent['recur_interval'] = $this->event['recur_interval'];
if($this->event['recur_noenddate'] == 0) {
$finalEvent['recur_enddate'] = $vcal->_parseDateTime($this->event['recur_enddate']);
}
switch($this->event['recur_type']) {
case self::olRecursDaily:
$finalEvent['recur_type'] = MCAL_RECUR_DAILY;
break;
case self::olRecursWeekly:
$finalEvent['recur_type'] = MCAL_RECUR_WEEKLY;
$finalEvent['recur_data'] = $this->event['recur_weekmask'];
break;
case self::olRecursMonthly:
$finalEvent['recur_type'] = MCAL_RECUR_MONTHLY_MDAY;
break;
case self::olRecursMonthNth:
$finalEvent['recur_type'] = MCAL_RECUR_MONTHLY_WDAY;
break;
case self::olRecursYearly:
$finalEvent['recur_type'] = MCAL_RECUR_YEARLY;
$finalEvent['recur_interval'] = 1;
break;
}
}
break;
case 'priority':
$finalEvent[$key] = $value+1;
break;
case 'reminderset':
if($value == 1) {
$finalEvent['alarm'] = $this->event['reminderstart'];
}
break;
case 'recur_type':
case 'recur_enddate':
case 'recur_interval':
case 'recur_weekmask':
case 'reminderstart':
// do nothing, get's handled in isrecuring clause
break;
default:
$finalEvent[$key] = $value;
break;
}
}
#$middleName = ($finalEvent['n_middle']) ? ' '.trim($finalEvent['n_middle']) : '';
#$finalEvent['fn'] = trim($finalEvent['n_given']. $middleName .' '. $finalEvent['n_family']);
#error_log(print_r($finalEvent, true));
return $finalEvent;
}
function search($_sifdata) {
if(!$event = $this->siftoegw($_sifdata)) {
return false;
}
$query = array(
'cal_start='.$this->date2ts($event['start'],true), // true = Server-time
'cal_end='.$this->date2ts($event['end'],true),
);
#foreach(array('title','location','priority','public','non_blocking') as $name) {
foreach(array('title','location','public','non_blocking') as $name) {
if (isset($event[$name])) $query['cal_'.$name] = $event[$name];
}
if($foundEvents = parent::search(array(
'user' => $this->user,
'query' => $query,
))) {
if(is_array($foundEvents)) {
$event = array_shift($foundEvents);
return $event['id'];
}
}
return false;
$search['start'] = $event['start'];
$search['end'] = $event['end'];
unset($event['description']);
unset($event['start']);
unset($event['end']);
foreach($event as $key => $value) {
if (substr($key,0,6) != 'recur_' && substr($key,0,5) != 'alarm') {
$search['query']['cal_'.$key] = $value;
} else {
#$search['query'][$key] = $value;
}
}
if($foundEvents = parent::search($search)) {
if(is_array($foundEvents)) {
$event = array_shift($foundEvents);
return $event['id'];
}
}
return false;
}
/**
* @return int contact id
* @param string $_vcard the vcard
* @param int $_abID the internal addressbook id
* @desc import a vard into addressbook
*/
function addSIF($_sifdata, $_calID)
{
$calID = false;
#error_log('ABID: '.$_abID);
#error_log(base64_decode($_sifdata));
if(!$event = $this->siftoegw($_sifdata)) {
return false;
}
if(isset($event['alarm'])) {
$alarm = $event['alarm'];
unset($event['alarm']);
}
if($_calID > 0)
{
// update entry
$event['id'] = $_calID;
}
if($eventID = $this->update($event, TRUE)) {
$updatedEvent = $this->read($eventID);
foreach($updatedEvent['alarm'] as $alarmID => $alarmData)
{
$this->delete_alarm($alarmID);
}
if(isset($alarm)) {
$alarmData['time'] = $event['start'] - ($alarm*60);
$alarmData['offset'] = $alarm*60;
$alarmData['all'] = 1;
$alarmData['owner'] = $GLOBALS['egw_info']['user']['account_id'];
$this->save_alarm($eventID, $alarmData);
}
}
return $eventID;
}
/**
* return a vcard
*
* @param int $_id the id of the contact
* @param int $_vcardProfile profile id for mapping from vcard values to egw addressbook
* @return string containing the vcard
*/
function getSIF($_id)
{
$fields = array_unique(array_values($this->sifMapping));
sort($fields);
#$event = $this->read($_id,null,false,'server');
#error_log("FOUND EVENT: ". print_r($event, true));
if($event = $this->read($_id,null,false,'server')) {
$sysCharSet = $GLOBALS['egw']->translation->charset();
$vcal = &new Horde_iCalendar;
$sifEvent = '<appointment>';
foreach($this->sifMapping as $sifField => $egwField)
{
if(empty($egwField)) continue;
#error_log("$sifField => $egwField");
#error_log('VALUE1: '.$event[$egwField]);
$value = $GLOBALS['egw']->translation->convert($event[$egwField], $sysCharSet, 'utf-8');
#error_log('VALUE2: '.$value);
switch($sifField)
{
case 'Categories':
if(!empty($value)) {
$value = implode('; ', $this->get_categories(explode(',',$value)));
$value = $GLOBALS['egw']->translation->convert($value, $sysCharSet, 'utf-8');
}
$sifEvent .= "<$sifField>$value</$sifField>";
break;
case 'Importance':
$value = $value-1;
$sifEvent .= "<$sifField>$value</$sifField>";
break;
case 'RecurrenceType':
case 'Interval':
case 'PatternStartDate':
case 'NoEndDate':
case 'DayOfWeekMask':
case 'PatternEndDate':
break;
case 'IsRecurring':
switch($event['recur_type']) {
case MCAL_RECUR_NONE:
$sifEvent .= "<$sifField>0</$sifField>";
break;
case MCAL_RECUR_DAILY:
$eventInterval = ($event['recur_interval'] > 1 ? $event['recur_interval'] : 1);
$recurStartDate = mktime(0,0,0,date('m',$event['start']), date('d', $event['start']), date('Y', $event['start']));
$sifEvent .= "<$sifField>1</$sifField>";
$sifEvent .= '<RecurrenceType>'. self::olRecursDaily .'</RecurrenceType>';
$sifEvent .= '<Interval>'. $eventInterval .'</Interval>';
$sifEvent .= '<PatternStartDate>'. $vcal->_exportDateTime($recurStartDate) .'</PatternStartDate>';
if($event['recur_enddate'] == 0) {
$sifEvent .= '<NoEndDate>1</NoEndDate>';
} else {
$recurEndDate = mktime(24,0,0,date('m',$event['recur_enddate']), date('d', $event['recur_enddate']), date('Y', $event['recur_enddate']));
$sifEvent .= '<NoEndDate>0</NoEndDate>';
$sifEvent .= '<PatternEndDate>'. $vcal->_exportDateTime($recurEndDate) .'</PatternEndDate>';
$totalDays = ($recurEndDate - $recurStartDate) / 86400;
$occurrences = ceil($totalDays / $eventInterval);
$sifEvent .= '<Occurrences>'. $occurrences .'</Occurrences>';
}
break;
case MCAL_RECUR_WEEKLY:
$eventInterval = ($event['recur_interval'] > 1 ? $event['recur_interval'] : 1);
$recurStartDate = mktime(0,0,0,date('m',$event['start']), date('d', $event['start']), date('Y', $event['start']));
$sifEvent .= "<$sifField>1</$sifField>";
$sifEvent .= '<RecurrenceType>'. self::olRecursWeekly .'</RecurrenceType>';
$sifEvent .= '<Interval>'. $eventInterval .'</Interval>';
$sifEvent .= '<PatternStartDate>'. $vcal->_exportDateTime($recurStartDate) .'</PatternStartDate>';
$sifEvent .= '<DayOfWeekMask>'. $event['recur_data'] .'</DayOfWeekMask>';
if($event['recur_enddate'] == 0) {
$sifEvent .= '<NoEndDate>1</NoEndDate>';
} else {
$recurEndDate = mktime(24, 0, 0, date('m',$event['recur_enddate']), date('d', $event['recur_enddate']), date('Y', $event['recur_enddate']));
$daysPerWeek = substr_count(decbin($event['recur_data']),'1');
$sifEvent .= '<NoEndDate>0</NoEndDate>';
$sifEvent .= '<PatternEndDate>'. $vcal->_exportDateTime($recurEndDate) .'</PatternEndDate>';
$totalWeeks = floor(($recurEndDate - $recurStartDate) / (86400*7));
#error_log("AAA: $daysPerWeek $totalWeeks");
$occurrences = ($totalWeeks / $eventInterval) * $daysPerWeek;
for($i = $recurEndDate; $i > $recurStartDate + ($totalWeeks * 86400*7); $i = $i - 86400) {
switch(date('w', $i-1)) {
case 0:
if($event['recur_data'] & 1) $occurrences++;
break;
// monday
case 1:
if($event['recur_data'] & 2) $occurrences++;
break;
case 2:
if($event['recur_data'] & 4) $occurrences++;
break;
case 3:
if($event['recur_data'] & 8) $occurrences++;
break;
case 4:
if($event['recur_data'] & 16) $occurrences++;
break;
case 5:
if($event['recur_data'] & 32) $occurrences++;
break;
case 6:
if($event['recur_data'] & 64) $occurrences++;
break;
}
}
$sifEvent .= '<Occurrences>'. $occurrences .'</Occurrences>';
}
break;
}
break;
case 'Sensitivity':
$value = (!$value ? '2' : '0');
$sifEvent .= "<$sifField>$value</$sifField>";
break;
case 'Folder':
# skip currently. This is the folder where Outlook stores the contact.
#$sifEvent .= "<$sifField>/</$sifField>";
break;
case 'AllDayEvent':
case 'End':
// get's handled by Start clause
break;
case 'Start':
if($event['end'] - $event['start'] == 86399 && date('Y-m-d', $event['end']) == date('Y-m-d', $event['start'])) {
$value = date('Y-m-d', $event['start']);
$sifEvent .= "<Start>$value</Start>";
$sifEvent .= "<End>$value</End>";
$sifEvent .= "<AllDayEvent>1</AllDayEvent>";
} else {
$value = $vcal->_exportDateTime($event['start']);
$sifEvent .= "<Start>$value</Start>";
$value = $vcal->_exportDateTime($event['end']);
$sifEvent .= "<End>$value</End>";
$sifEvent .= "<AllDayEvent>0</AllDayEvent>";
}
break;
case 'ReminderMinutesBeforeStart':
break;
case 'ReminderSet':
if(count((array)$event['alarm']) > 0) {
$sifEvent .= "<$sifField>1</$sifField>";
foreach($event['alarm'] as $alarmID => $alarmData)
{
$sifEvent .= '<ReminderMinutesBeforeStart>'. $alarmData['offset']/60 .'</ReminderMinutesBeforeStart>';
// lets take only the first alarm
break;
}
} else {
$sifEvent .= "<$sifField>0</$sifField>";
}
break;
default:
$sifEvent .= "<$sifField>$value</$sifField>";
break;
}
}
$sifEvent .= '</appointment>';
return base64_encode($sifEvent);
}
if($this->xmlrpc)
{
$GLOBALS['server']->xmlrpc_error($GLOBALS['xmlrpcerr']['no_access'],$GLOBALS['xmlrpcstr']['no_access']);
}
return False;
}
}

View File

@ -58,7 +58,7 @@ define('ACCEPTED',3);
* BO's functions take and return user-time only (!), they convert internaly everything to servertime, because
* SO operates only on server-time
*/
class socal
class calendar_so
{
/**
* name of the main calendar table and prefix for all other calendar tables
@ -82,7 +82,7 @@ class socal
/**
* Constructor of the socal class
*/
function socal()
function __construct()
{
$this->async = $GLOBALS['egw']->asyncservice;
$this->db = $GLOBALS['egw']->db;
@ -1045,8 +1045,19 @@ ORDER BY cal_user_type, cal_usre_id
return $this->async->cancel_timer($id);
}
function change_delete_user($old_user,$new_user=false)
/**
* Delete account hook
*
* @param array|int $old_user integer old user or array with keys 'account_id' and 'new_owner' as the deleteaccount hook uses it
* @param int $new_user=null
*/
function deleteaccount($data)
{
if (is_array($old_user))
{
$new_user = $old_user['new_owner'];
$old_user = $old_user['account_id'];
}
if (!(int)$new_user)
{
$this->split_user($old_user,$user_type,$user_id);

View File

@ -22,7 +22,7 @@
*
* All permanent debug messages of the calendar-code should done via the debug-message method of the bocal class !!!
*/
class uical
class calendar_ui
{
/**
* @var $debug mixed integer level or string function-name
@ -31,7 +31,7 @@ class uical
/**
* instance of the bocal or bocalupdate class
*
* @var bocalupdate
* @var calendar_boupdate
*/
var $bo;
/**
@ -40,12 +40,6 @@ class uical
* @var jscalendar
*/
var $jscal;
/**
* Reference to global html class
*
* @var html
*/
var $html;
/**
* Reference to global datetime class
*
@ -129,14 +123,19 @@ class uical
/**
* Constructor
*
* @param boolean $use_bocalupdate use bocalupdate as parenent instead of bocal
* @param boolean $use_boupdate use bocalupdate as parenent instead of bocal
* @param array $set_states=null to manualy set / change one of the states, default NULL = use $_REQUEST
*/
function uical($use_bocalupdate=false,$set_states=NULL)
function __construct($use_boupdate=false,$set_states=NULL)
{
$bo_class = $use_bocalupdate ? 'bocalupdate' : 'bocal';
require_once(EGW_INCLUDE_ROOT.'/calendar/inc/class.'.$bo_class.'.inc.php');
$this->bo = new $bo_class();
if ($use_boupdate)
{
$this->bo = new calendar_boupdate();
}
else
{
$this->bo = new calendar_bo();
}
$this->jscal = $GLOBALS['egw']->jscalendar;
$this->datetime = $GLOBALS['egw']->datetime;
$this->accountsel = $GLOBALS['egw']->uiaccountsel;
@ -299,7 +298,7 @@ class uical
}
}
// for the uiforms class (eg. edit), dont store the (new) owner, as it might change the view
if (substr($_GET['menuaction'],0,16) == 'calendar.uiforms')
if (substr($_GET['menuaction'],0,16) == 'calendar.calendar_uiforms')
{
$this->owner = $set_states[$state];
continue;
@ -359,7 +358,7 @@ class uical
}
$this->view = $states['view'] = $func;
}
$this->view_menuaction = $this->view == 'listview' ? 'calendar.uilist.listview' : 'calendar.uiviews.'.$this->view;
$this->view_menuaction = $this->view == 'listview' ? 'calendar.calendar_uilist.listview' : 'calendar.calendar_uiviews.'.$this->view;
if ($this->debug > 0 || $this->debug == 'manage_states') $this->bo->debug_message('uical::manage_states(%1) session was %2, states now %3',True,$set_states,$states_session,$states);
// save the states in the session
@ -464,7 +463,7 @@ class uical
function add_link($content,$date=null,$hour=null,$minute=0)
{
$vars = array(
'menuaction'=>'calendar.uiforms.edit',
'menuaction'=>'calendar.calendar_uiforms.edit',
'date' => $date ? $date : $this->date,
);
if (!is_null($hour))
@ -537,11 +536,11 @@ class uical
$views = '<table style="width: 100%;"><tr>'."\n";
foreach(array(
'add' => array('icon'=>'new','text'=>'add'),
'day' => array('icon'=>'today','text'=>'Today','menuaction' => 'calendar.uiviews.day','date' => $this->bo->date2string($this->bo->now_su)),
'week' => array('icon'=>'week','text'=>'Weekview','menuaction' => 'calendar.uiviews.week'),
'month' => array('icon'=>'month','text'=>'Monthview','menuaction' => 'calendar.uiviews.month'),
'planner' => array('icon'=>'planner','text'=>'Group planner','menuaction' => 'calendar.uiviews.planner','sortby' => $this->sortby),
'list' => array('icon'=>'list','text'=>'Listview','menuaction'=>'calendar.uilist.listview'),
'day' => array('icon'=>'today','text'=>'Today','menuaction' => 'calendar.calendar_uiviews.day','date' => $this->bo->date2string($this->bo->now_su)),
'week' => array('icon'=>'week','text'=>'Weekview','menuaction' => 'calendar.calendar_uiviews.week'),
'month' => array('icon'=>'month','text'=>'Monthview','menuaction' => 'calendar.calendar_uiviews.month'),
'planner' => array('icon'=>'planner','text'=>'Group planner','menuaction' => 'calendar.calendar_uiviews.planner','sortby' => $this->sortby),
'list' => array('icon'=>'list','text'=>'Listview','menuaction'=>'calendar.calendar_uilist.listview'),
) as $view => $data)
{
$icon = array_shift($data);
@ -562,49 +561,49 @@ class uical
foreach(array(
array(
'text' => lang('dayview'),
'value' => 'menuaction=calendar.uiviews.day',
'value' => 'menuaction=calendar.calendar_uiviews.day',
'selected' => $this->view == 'day',
),
array(
'text' => lang('four days view'),
'value' => 'menuaction=calendar.uiviews.day4',
'value' => 'menuaction=calendar.calendar_uiviews.day4',
'selected' => $this->view == 'day4',
),
array(
'text' => lang('weekview with weekend'),
'value' => 'menuaction=calendar.uiviews.week&days=7',
'value' => 'menuaction=calendar.calendar_uiviews.week&days=7',
'selected' => $this->view == 'week' && $this->cal_prefs['days_in_weekview'] != 5,
),
array(
'text' => lang('weekview without weekend'),
'value' => 'menuaction=calendar.uiviews.week&days=5',
'value' => 'menuaction=calendar.calendar_uiviews.week&days=5',
'selected' => $this->view == 'week' && $this->cal_prefs['days_in_weekview'] == 5,
),
array(
'text' => lang('Multiple week view'),
'value' => 'menuaction=calendar.uiviews.weekN',
'value' => 'menuaction=calendar.calendar_uiviews.weekN',
'selected' => $this->view == 'weekN',
),
array(
'text' => lang('monthview'),
'value' => 'menuaction=calendar.uiviews.month',
'value' => 'menuaction=calendar.calendar_uiviews.month',
'selected' => $this->view == 'month',
),
array(
'text' => lang('planner by category'),
'value' => 'menuaction=calendar.uiviews.planner&sortby=category'.
'value' => 'menuaction=calendar.calendar_uiviews.planner&sortby=category'.
($planner_days_for_view !== false ? '&planner_days='.$planner_days_for_view : ''),
'selected' => $this->view == 'planner' && $this->sortby != 'user',
),
array(
'text' => lang('planner by user'),
'value' => 'menuaction=calendar.uiviews.planner&sortby=user'.
'value' => 'menuaction=calendar.calendar_uiviews.planner&sortby=user'.
($planner_days_for_view !== false ? '&planner_days='.$planner_days_for_view : ''),
'selected' => $this->view == 'planner' && $this->sortby == 'user',
),
array(
'text' => lang('listview'),
'value' => 'menuaction=calendar.uilist.listview',
'value' => 'menuaction=calendar.calendar_uilist.listview',
'selected' => $this->view == 'listview',
),
) as $data)
@ -620,16 +619,16 @@ class uical
'text' => html::form('<input name="keywords" value="'.$value.'" style="width: 185px;"'.
' onFocus="if(this.value==\''.$blur.'\') this.value=\'\';"'.
' onBlur="if(this.value==\'\') this.value=\''.$blur.'\';" title="'.lang('Search').'">',
'','/index.php',array('menuaction'=>'calendar.uilist.listview')),
'','/index.php',array('menuaction'=>'calendar.calendar_uilist.listview')),
'no_lang' => True,
'link' => False,
);
// Minicalendar
$link = array();
foreach(array(
'day' => 'calendar.uiviews.day',
'week' => 'calendar.uiviews.week',
'month' => 'calendar.uiviews.month') as $view => $menuaction)
'day' => 'calendar.calendar_uiviews.day',
'week' => 'calendar.calendar_uiviews.week',
'month' => 'calendar.calendar_uiviews.month') as $view => $menuaction)
{
if ($this->view == 'planner' || $this->view == 'listview')
{
@ -715,7 +714,7 @@ function load_cal(url,id) {
}
// Import & Export
$file[] = array(
'text' => lang('Export').': '.html::a_href(lang('iCal'),'calendar.uiforms.export',$this->first ? array(
'text' => lang('Export').': '.html::a_href(lang('iCal'),'calendar.calendar_uiforms.export',$this->first ? array(
'start' => $this->bo->date2string($this->first),
'end' => $this->bo->date2string($this->last),
) : false),
@ -723,15 +722,15 @@ function load_cal(url,id) {
'link' => False,
);
$file[] = array(
'text' => lang('Import').': '.html::a_href(lang('iCal'),'calendar.uiforms.import').
'text' => lang('Import').': '.html::a_href(lang('iCal'),'calendar.calendar_uiforms.import').
' &amp; '.html::a_href(lang('CSV'),'/calendar/csv_import.php'),
'no_lang' => True,
'link' => False,
);
/*
$print_functions = array(
'calendar.uiviews.day' => 'calendar.pdfcal.day',
'calendar.uiviews.week' => 'calendar.pdfcal.week',
'calendar.calendar_uiviews.day' => 'calendar.pdfcal.day',
'calendar.calendar_uiviews.week' => 'calendar.pdfcal.week',
);
if (isset($print_functions[$_GET['menuaction']]))
{

View File

@ -5,13 +5,11 @@
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2004-7 by RalfBecker-At-outdoor-training.de
* @copyright (c) 2004-8 by RalfBecker-At-outdoor-training.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
include_once(EGW_INCLUDE_ROOT . '/calendar/inc/class.uical.inc.php');
/**
* calendar UserInterface forms: view and edit events, freetime search
*
@ -24,7 +22,7 @@ include_once(EGW_INCLUDE_ROOT . '/calendar/inc/class.uical.inc.php');
*
* All permanent debug messages of the calendar-code should done via the debug-message method of the bocal class !!!
*/
class uiforms extends uical
class calendar_uiforms extends calendar_ui
{
var $public_functions = array(
'freetimesearch' => True,
@ -32,12 +30,6 @@ class uiforms extends uical
'export' => true,
'import' => true,
);
/**
* Reference to link-class of bocal
*
* @var bolink
*/
var $link;
/**
* Standard durations used in edit and freetime search
@ -63,11 +55,9 @@ class uiforms extends uical
/**
* Constructor
*/
function uiforms()
function __construct()
{
$this->uical(true); // call the parent's constructor
$this->link =& $this->bo->link;
parent::__construct(true); // call the parent's constructor
for ($n=15; $n <= 8*60; $n+=($n < 60 ? 15 : ($n < 240 ? 30 : 60)))
{
@ -436,7 +426,7 @@ class uiforms extends uical
$msg .= ($msg ? ', ' : '') .lang('Error: the entry has been updated since you opened it for editing!').'<br />'.
lang('Copy your changes to the clipboard, %1reload the entry%2 and merge them.','<a href="'.
htmlspecialchars($GLOBALS['egw']->link('/index.php',array(
'menuaction' => 'calendar.uiforms.edit',
'menuaction' => 'calendar.calendar_uiforms.edit',
'cal_id' => $content['id'],
'referer' => $referer,
))).'">','</a>');
@ -745,7 +735,7 @@ class uiforms extends uical
elseif(egw_vfs::lock($lock_path,$preserv['lock_token'],$locktime,$lock_owner,$scope='shared',$type='write',false,false))
{
// install ajax handler to unlock the entry again, if the window get's closed by the user
$GLOBALS['egw']->js->set_onunload("xajax_doXMLHTTP('calendar.uiforms.ajax_unlock',$event[id],'$preserv[lock_token]');");
$GLOBALS['egw']->js->set_onunload("xajax_doXMLHTTP('calendar.calendar_uiforms.ajax_unlock',$event[id],'$preserv[lock_token]');");
}
else
{
@ -952,7 +942,7 @@ class uiforms extends uical
}
else
{
$etpl->exec('calendar.uiforms.process_edit',$content,$sel_options,$readonlys,$preserv,$preserv['no_popup'] ? 0 : 2);
$etpl->exec('calendar.calendar_uiforms.process_edit',$content,$sel_options,$readonlys,$preserv,$preserv['no_popup'] ? 0 : 2);
}
}
@ -1007,7 +997,7 @@ class uiforms extends uical
);
$GLOBALS['egw_info']['flags']['app_header'] = lang('calendar') . ' - ' . lang('Scheduling conflict');
$etpl->exec('calendar.uiforms.process_edit',$content,false,false,array_merge($event,$preserv),$preserv['no_popup'] ? 0 : 2);
$etpl->exec('calendar.calendar_uiforms.process_edit',$content,false,false,array_merge($event,$preserv),$preserv['no_popup'] ? 0 : 2);
}
/**
@ -1169,7 +1159,7 @@ class uiforms extends uical
// the call to set_style_by_class has to be in onload, to make sure the function and the element is already created
$GLOBALS['egw']->js->set_onload("set_style_by_class('table','end_hide','visibility','".($content['duration'] && isset($sel_options['duration'][$content['duration']]) ? 'hidden' : 'visible')."');");
$etpl->exec('calendar.uiforms.freetimesearch',$content,$sel_options,'',array(
$etpl->exec('calendar.calendar_uiforms.freetimesearch',$content,$sel_options,'',array(
'participants' => $content['participants'],
'cal_id' => $content['cal_id'],
'recur_type' => $content['recur_type'],
@ -1389,7 +1379,7 @@ class uiforms extends uical
$GLOBALS['egw_info']['flags']['app_header'] = lang('calendar') . ' - ' . lang('iCal Export');
$etpl =& CreateObject('etemplate.etemplate','calendar.export');
$etpl->exec('calendar.uiforms.export',$content);
$etpl->exec('calendar.calendar_uiforms.export',$content);
}
/**
@ -1423,6 +1413,6 @@ class uiforms extends uical
$GLOBALS['egw_info']['flags']['app_header'] = lang('calendar') . ' - ' . lang('iCal Import');
$etpl =& CreateObject('etemplate.etemplate','calendar.import');
$etpl->exec('calendar.uiforms.import',$content);
$etpl->exec('calendar.calendar_uiforms.import',$content);
}
}

View File

@ -5,13 +5,11 @@
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2005-7 by RalfBecker-At-outdoor-training.de
* @copyright (c) 2005-8 by RalfBecker-At-outdoor-training.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
include_once(EGW_INCLUDE_ROOT . '/calendar/inc/class.uical.inc.php');
/**
* Class to generate the calendar listview and the search
*
@ -24,7 +22,7 @@ include_once(EGW_INCLUDE_ROOT . '/calendar/inc/class.uical.inc.php');
*
* All permanent debug messages of the calendar-code should done via the debug-message method of the bocal class !!!
*/
class uilist extends uical
class calendar_uilist extends calendar_ui
{
var $public_functions = array(
'listview' => True,
@ -52,9 +50,9 @@ class uilist extends uical
*
* @param array $set_states=null to manualy set / change one of the states, default NULL = use $_REQUEST
*/
function uilist($set_states=null)
function __construct($set_states=null)
{
$this->uical(true,$set_states); // call the parent's constructor
parent::__construct(true,$set_states); // call the parent's constructor
$GLOBALS['egw_info']['flags']['app_header'] = $GLOBALS['egw_info']['apps']['calendar']['title'].' - '.lang('Listview').
// for a single owner we add it's name to the app-header
@ -128,7 +126,7 @@ class uilist extends uical
if (!is_array($content['nm']))
{
$content['nm'] = array(
'get_rows' => 'calendar.uilist.get_rows',
'get_rows' => 'calendar.calendar_uilist.get_rows',
'filter_no_lang' => True, // I set no_lang for filter (=dont translate the options)
'no_filter2' => True, // I disable the 2. filter (params are the same as for filter)
'no_cat' => True, // I disable the cat-selectbox
@ -145,7 +143,7 @@ class uilist extends uical
{
$this->adjust_for_search($_REQUEST['keywords'],$content['nm']);
}
return $etpl->exec('calendar.uilist.listview',$content,array(
return $etpl->exec('calendar.calendar_uilist.listview',$content,array(
'filter' => &$this->date_filters,
),$readonlys,'',$home ? -1 : 0);
}

View File

@ -10,9 +10,6 @@
* @version $Id$
*/
include_once(EGW_INCLUDE_ROOT . '/calendar/inc/class.uical.inc.php');
require_once(EGW_INCLUDE_ROOT . '/phpgwapi/inc/class.dragdrop.inc.php');
/**
* Class to generate the calendar views and the necesary widgets
*
@ -27,7 +24,7 @@ require_once(EGW_INCLUDE_ROOT . '/phpgwapi/inc/class.dragdrop.inc.php');
*
* All permanent debug messages of the calendar-code should done via the debug-message method of the bocal class !!!
*/
class uiviews extends uical
class calendar_uiviews extends calendar_ui
{
var $public_functions = array(
'day' => True,
@ -36,6 +33,7 @@ class uiviews extends uical
'weekN' => True,
'month' => True,
'planner' => True,
'index' => True,
);
/**
@ -122,9 +120,9 @@ class uiviews extends uical
*
* @param array $set_states=null to manualy set / change one of the states, default NULL = use $_REQUEST
*/
function uiviews($set_states=null)
function __construct($set_states=null)
{
$this->uical(false,$set_states); // call the parent's constructor
parent::__construct(false,$set_states); // call the parent's constructor
$this->extraRowsOriginal = $this->extraRows; //save original extraRows value
$GLOBALS['egw_info']['flags']['nonavbar'] = False;
@ -339,7 +337,7 @@ class uiviews extends uical
$week[$day_ymd] = array_shift($days);
}
$week_view = array(
'menuaction' => 'calendar.uiviews.week',
'menuaction' => 'calendar.calendar_uiviews.week',
'date' => $this->bo->date2string($week_start),
);
$title = lang('Wk').' '.adodb_date('W',$week_start);
@ -923,7 +921,7 @@ class uiviews extends uical
($short_title ? lang(adodb_date('l',$ts)).' '.adodb_date('d.',$ts) : $this->bo->long_date($ts,0,false,true));
$day_view = array(
'menuaction' => 'calendar.uiviews.day',
'menuaction' => 'calendar.calendar_uiviews.day',
'date' => $day_ymd,
);
$this->_day_class_holiday($day_ymd,$class,$holidays);
@ -966,7 +964,7 @@ class uiviews extends uical
$t += $this->granularity_m,++$i)
{
$linkData = array(
'menuaction' =>'calendar.uiforms.edit',
'menuaction' =>'calendar.calendar_uiforms.edit',
'date' => $day_ymd,
'hour' => sprintf("%02d",floor($t / 60)),
'minute' => sprintf("%02d",floor($t % 60)),
@ -1222,11 +1220,11 @@ class uiviews extends uical
$tpl->set_var('tooltip',html::tooltip($tooltip,False,array('BorderWidth'=>0,'Padding'=>0)));
$html = $tpl->fp('out',$block);
$view_link = $GLOBALS['egw']->link('/index.php',array('menuaction'=>'calendar.uiforms.edit','cal_id'=>$event['id'],'date'=>$this->bo->date2string($event['start'])));
$view_link = $GLOBALS['egw']->link('/index.php',array('menuaction'=>'calendar.calendar_uiforms.edit','cal_id'=>$event['id'],'date'=>$this->bo->date2string($event['start'])));
if ($event['recur_type']!= MCAL_RECUR_NONE)
{
$view_link_confirm_abort = $GLOBALS['egw']->link('/index.php',array('menuaction'=>'calendar.uiforms.edit','cal_id'=>$event['id'],'date'=>$this->bo->date2string($event['start']),'exception'=>1));
$view_link_confirm_abort = $GLOBALS['egw']->link('/index.php',array('menuaction'=>'calendar.calendar_uiforms.edit','cal_id'=>$event['id'],'date'=>$this->bo->date2string($event['start']),'exception'=>1));
$view_link_confirm_text=lang('do you want to edit serialevent als exception? - Ok = Edit Exception, Abort = Edit Serial');
$popup = $is_private ? '' : ' onclick="'.$this->popup($view_link_confirm_abort,null,750,410,$view_link,$view_link_confirm_text).'; return false;"';
@ -1647,7 +1645,7 @@ class uiviews extends uical
if ($days > 7)
{
$title = html::a_href($title,array(
'menuaction' => 'calendar.uiviews.planner',
'menuaction' => 'calendar.calendar_uiviews.planner',
'planner_days' => 7,
'date' => date('Ymd',$t),
),false,' title="'.html::htmlspecialchars(lang('Weekview')).'"');
@ -1705,7 +1703,7 @@ class uiviews extends uical
if ($days > 1)
{
$title = html::a_href($title,array(
'menuaction' => 'calendar.uiviews.planner',
'menuaction' => 'calendar.calendar_uiviews.planner',
'planner_days' => 1,
'date' => date('Ymd',$t),
),false,strpos($class,'calHoliday') !== false || strpos($class,'calBirthday') !== false ? '' : ' title="'.html::htmlspecialchars(lang('Dayview')).'"');

View File

@ -1,502 +0,0 @@
<?php
/**************************************************************************\
* eGroupWare - SIF Parser *
* http://www.egroupware.org *
* Written by Lars Kneschke <l.kneschke@metaways.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; version 2 of the License. *
\**************************************************************************/
/* $Id$ */
require_once EGW_SERVER_ROOT.'/calendar/inc/class.bocalupdate.inc.php';
require_once EGW_SERVER_ROOT.'/phpgwapi/inc/horde/Horde/iCalendar.php';
class sifcalendar extends bocalupdate
{
var $sifMapping = array(
'Start' => 'start',
'End' => 'end',
'AllDayEvent' => 'alldayevent',
'BillingInformation' => '',
'Body' => 'description',
'BusyStatus' => '',
'Categories' => 'category',
'Companies' => '',
'Importance' => 'priority',
'IsRecurring' => 'isrecurring',
'Location' => 'location',
'MeetingStatus' => '',
'Mileage' => '',
'ReminderMinutesBeforeStart' => 'reminderstart',
'ReminderSet' => 'reminderset',
'ReplyTime' => '',
'Sensitivity' => 'public',
'Subject' => 'title',
'RecurrenceType' => 'recur_type',
'Interval' => 'recur_interval',
'MonthOfYear' => '',
'DayOfMonth' => '',
'DayOfWeekMask' => 'recur_weekmask',
'Instance' => '',
'PatternStartDate' => '',
'NoEndDate' => 'recur_noenddate',
'PatternEndDate' => 'recur_enddate',
'Occurrences' => '',
);
// the calendar event array
var $event;
// constants for recurence type
const olRecursDaily = 0;
const olRecursWeekly = 1;
const olRecursMonthly = 2;
const olRecursMonthNth = 3;
const olRecursYearly = 5;
const olRecursYearNth = 6;
// constants for weekdays
const olSunday = 1;
const olMonday = 2;
const olTuesday = 4;
const olWednesday = 8;
const olThursday = 16;
const olFriday = 32;
const olSaturday = 64;
function startElement($_parser, $_tag, $_attributes) {
}
function endElement($_parser, $_tag) {
//error_log('endElem: ' . $_tag .' => '. trim($this->sifData));
if(!empty($this->sifMapping[$_tag])) {
$this->event[$this->sifMapping[$_tag]] = trim($this->sifData);
}
unset($this->sifData);
}
function characterData($_parser, $_data) {
$this->sifData .= $_data;
}
function siftoegw($_sifdata) {
$vcal = &new Horde_iCalendar;
$finalEvent = array();
$sysCharSet = $GLOBALS['egw']->translation->charset();
$sifData = base64_decode($_sifdata);
#error_log($sifData);
$tmpfname = tempnam('/tmp/sync/contents','sife_');
$handle = fopen($tmpfname, "w");
fwrite($handle, $sifData);
fclose($handle);
$this->xml_parser = xml_parser_create('UTF-8');
xml_set_object($this->xml_parser, $this);
xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, false);
xml_set_element_handler($this->xml_parser, "startElement", "endElement");
xml_set_character_data_handler($this->xml_parser, "characterData");
$this->strXmlData = xml_parse($this->xml_parser, $sifData);
if(!$this->strXmlData) {
error_log(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($this->xml_parser)),
xml_get_current_line_number($this->xml_parser)));
return false;
}
#error_log(print_r($this->event, true));
foreach($this->event as $key => $value) {
$value = $GLOBALS['egw']->translation->convert($value, 'utf-8', $sysCharSet);
#error_log("$key => $value");
switch($key) {
case 'alldayevent':
if($value == 1) {
$startParts = explode('-',$this->event['start']);
$finalEvent['start'] = mktime(0, 0, 0, $startParts[1], $startParts[2], $startParts[0]);
$endParts = explode('-',$this->event['end']);
$finalEvent['end'] = mktime(23, 59, 59, $endParts[1], $endParts[2], $endParts[0]);
}
break;
case 'public':
$finalEvent[$key] = ((int)$value > 0) ? 0 : 1;
break;
case 'category':
if(!empty($value)) {
$finalEvent[$key] = implode(',',$this->find_or_add_categories(explode(';', $value)));
}
break;
case 'end':
case 'start':
if($this->event['alldayevent'] < 1) {
$finalEvent[$key] = $vcal->_parseDateTime($value);
error_log("event ".$key." val=".$value.", parsed=".$finalEvent[$key]);
}
break;
case 'isrecurring':
if($value == 1) {
$finalEvent['recur_interval'] = $this->event['recur_interval'];
if($this->event['recur_noenddate'] == 0) {
$finalEvent['recur_enddate'] = $vcal->_parseDateTime($this->event['recur_enddate']);
}
switch($this->event['recur_type']) {
case self::olRecursDaily:
$finalEvent['recur_type'] = MCAL_RECUR_DAILY;
break;
case self::olRecursWeekly:
$finalEvent['recur_type'] = MCAL_RECUR_WEEKLY;
$finalEvent['recur_data'] = $this->event['recur_weekmask'];
break;
case self::olRecursMonthly:
$finalEvent['recur_type'] = MCAL_RECUR_MONTHLY_MDAY;
break;
case self::olRecursMonthNth:
$finalEvent['recur_type'] = MCAL_RECUR_MONTHLY_WDAY;
break;
case self::olRecursYearly:
$finalEvent['recur_type'] = MCAL_RECUR_YEARLY;
$finalEvent['recur_interval'] = 1;
break;
}
}
break;
case 'priority':
$finalEvent[$key] = $value+1;
break;
case 'reminderset':
if($value == 1) {
$finalEvent['alarm'] = $this->event['reminderstart'];
}
break;
case 'recur_type':
case 'recur_enddate':
case 'recur_interval':
case 'recur_weekmask':
case 'reminderstart':
// do nothing, get's handled in isrecuring clause
break;
default:
$finalEvent[$key] = $value;
break;
}
}
#$middleName = ($finalEvent['n_middle']) ? ' '.trim($finalEvent['n_middle']) : '';
#$finalEvent['fn'] = trim($finalEvent['n_given']. $middleName .' '. $finalEvent['n_family']);
#error_log(print_r($finalEvent, true));
return $finalEvent;
}
function search($_sifdata) {
if(!$event = $this->siftoegw($_sifdata)) {
return false;
}
$query = array(
'cal_start='.$this->date2ts($event['start'],true), // true = Server-time
'cal_end='.$this->date2ts($event['end'],true),
);
#foreach(array('title','location','priority','public','non_blocking') as $name) {
foreach(array('title','location','public','non_blocking') as $name) {
if (isset($event[$name])) $query['cal_'.$name] = $event[$name];
}
if($foundEvents = parent::search(array(
'user' => $this->user,
'query' => $query,
))) {
if(is_array($foundEvents)) {
$event = array_shift($foundEvents);
return $event['id'];
}
}
return false;
$search['start'] = $event['start'];
$search['end'] = $event['end'];
unset($event['description']);
unset($event['start']);
unset($event['end']);
foreach($event as $key => $value) {
if (substr($key,0,6) != 'recur_' && substr($key,0,5) != 'alarm') {
$search['query']['cal_'.$key] = $value;
} else {
#$search['query'][$key] = $value;
}
}
if($foundEvents = parent::search($search)) {
if(is_array($foundEvents)) {
$event = array_shift($foundEvents);
return $event['id'];
}
}
return false;
}
/**
* @return int contact id
* @param string $_vcard the vcard
* @param int $_abID the internal addressbook id
* @desc import a vard into addressbook
*/
function addSIF($_sifdata, $_calID)
{
$calID = false;
#error_log('ABID: '.$_abID);
#error_log(base64_decode($_sifdata));
if(!$event = $this->siftoegw($_sifdata)) {
return false;
}
if(isset($event['alarm'])) {
$alarm = $event['alarm'];
unset($event['alarm']);
}
if($_calID > 0)
{
// update entry
$event['id'] = $_calID;
}
if($eventID = $this->update($event, TRUE)) {
$updatedEvent = $this->read($eventID);
foreach($updatedEvent['alarm'] as $alarmID => $alarmData)
{
$this->delete_alarm($alarmID);
}
if(isset($alarm)) {
$alarmData['time'] = $event['start'] - ($alarm*60);
$alarmData['offset'] = $alarm*60;
$alarmData['all'] = 1;
$alarmData['owner'] = $GLOBALS['egw_info']['user']['account_id'];
$this->save_alarm($eventID, $alarmData);
}
}
return $eventID;
}
/**
* return a vcard
*
* @param int $_id the id of the contact
* @param int $_vcardProfile profile id for mapping from vcard values to egw addressbook
* @return string containing the vcard
*/
function getSIF($_id)
{
$fields = array_unique(array_values($this->sifMapping));
sort($fields);
#$event = $this->read($_id,null,false,'server');
#error_log("FOUND EVENT: ". print_r($event, true));
if($event = $this->read($_id,null,false,'server')) {
$sysCharSet = $GLOBALS['egw']->translation->charset();
$vcal = &new Horde_iCalendar;
$sifEvent = '<appointment>';
foreach($this->sifMapping as $sifField => $egwField)
{
if(empty($egwField)) continue;
#error_log("$sifField => $egwField");
#error_log('VALUE1: '.$event[$egwField]);
$value = $GLOBALS['egw']->translation->convert($event[$egwField], $sysCharSet, 'utf-8');
#error_log('VALUE2: '.$value);
switch($sifField)
{
case 'Categories':
if(!empty($value)) {
$value = implode('; ', $this->get_categories(explode(',',$value)));
$value = $GLOBALS['egw']->translation->convert($value, $sysCharSet, 'utf-8');
}
$sifEvent .= "<$sifField>$value</$sifField>";
break;
case 'Importance':
$value = $value-1;
$sifEvent .= "<$sifField>$value</$sifField>";
break;
case 'RecurrenceType':
case 'Interval':
case 'PatternStartDate':
case 'NoEndDate':
case 'DayOfWeekMask':
case 'PatternEndDate':
break;
case 'IsRecurring':
switch($event['recur_type']) {
case MCAL_RECUR_NONE:
$sifEvent .= "<$sifField>0</$sifField>";
break;
case MCAL_RECUR_DAILY:
$eventInterval = ($event['recur_interval'] > 1 ? $event['recur_interval'] : 1);
$recurStartDate = mktime(0,0,0,date('m',$event['start']), date('d', $event['start']), date('Y', $event['start']));
$sifEvent .= "<$sifField>1</$sifField>";
$sifEvent .= '<RecurrenceType>'. self::olRecursDaily .'</RecurrenceType>';
$sifEvent .= '<Interval>'. $eventInterval .'</Interval>';
$sifEvent .= '<PatternStartDate>'. $vcal->_exportDateTime($recurStartDate) .'</PatternStartDate>';
if($event['recur_enddate'] == 0) {
$sifEvent .= '<NoEndDate>1</NoEndDate>';
} else {
$recurEndDate = mktime(24,0,0,date('m',$event['recur_enddate']), date('d', $event['recur_enddate']), date('Y', $event['recur_enddate']));
$sifEvent .= '<NoEndDate>0</NoEndDate>';
$sifEvent .= '<PatternEndDate>'. $vcal->_exportDateTime($recurEndDate) .'</PatternEndDate>';
$totalDays = ($recurEndDate - $recurStartDate) / 86400;
$occurrences = ceil($totalDays / $eventInterval);
$sifEvent .= '<Occurrences>'. $occurrences .'</Occurrences>';
}
break;
case MCAL_RECUR_WEEKLY:
$eventInterval = ($event['recur_interval'] > 1 ? $event['recur_interval'] : 1);
$recurStartDate = mktime(0,0,0,date('m',$event['start']), date('d', $event['start']), date('Y', $event['start']));
$sifEvent .= "<$sifField>1</$sifField>";
$sifEvent .= '<RecurrenceType>'. self::olRecursWeekly .'</RecurrenceType>';
$sifEvent .= '<Interval>'. $eventInterval .'</Interval>';
$sifEvent .= '<PatternStartDate>'. $vcal->_exportDateTime($recurStartDate) .'</PatternStartDate>';
$sifEvent .= '<DayOfWeekMask>'. $event['recur_data'] .'</DayOfWeekMask>';
if($event['recur_enddate'] == 0) {
$sifEvent .= '<NoEndDate>1</NoEndDate>';
} else {
$recurEndDate = mktime(24, 0, 0, date('m',$event['recur_enddate']), date('d', $event['recur_enddate']), date('Y', $event['recur_enddate']));
$daysPerWeek = substr_count(decbin($event['recur_data']),'1');
$sifEvent .= '<NoEndDate>0</NoEndDate>';
$sifEvent .= '<PatternEndDate>'. $vcal->_exportDateTime($recurEndDate) .'</PatternEndDate>';
$totalWeeks = floor(($recurEndDate - $recurStartDate) / (86400*7));
#error_log("AAA: $daysPerWeek $totalWeeks");
$occurrences = ($totalWeeks / $eventInterval) * $daysPerWeek;
for($i = $recurEndDate; $i > $recurStartDate + ($totalWeeks * 86400*7); $i = $i - 86400) {
switch(date('w', $i-1)) {
case 0:
if($event['recur_data'] & 1) $occurrences++;
break;
// monday
case 1:
if($event['recur_data'] & 2) $occurrences++;
break;
case 2:
if($event['recur_data'] & 4) $occurrences++;
break;
case 3:
if($event['recur_data'] & 8) $occurrences++;
break;
case 4:
if($event['recur_data'] & 16) $occurrences++;
break;
case 5:
if($event['recur_data'] & 32) $occurrences++;
break;
case 6:
if($event['recur_data'] & 64) $occurrences++;
break;
}
}
$sifEvent .= '<Occurrences>'. $occurrences .'</Occurrences>';
}
break;
}
break;
case 'Sensitivity':
$value = (!$value ? '2' : '0');
$sifEvent .= "<$sifField>$value</$sifField>";
break;
case 'Folder':
# skip currently. This is the folder where Outlook stores the contact.
#$sifEvent .= "<$sifField>/</$sifField>";
break;
case 'AllDayEvent':
case 'End':
// get's handled by Start clause
break;
case 'Start':
if($event['end'] - $event['start'] == 86399 && date('Y-m-d', $event['end']) == date('Y-m-d', $event['start'])) {
$value = date('Y-m-d', $event['start']);
$sifEvent .= "<Start>$value</Start>";
$sifEvent .= "<End>$value</End>";
$sifEvent .= "<AllDayEvent>1</AllDayEvent>";
} else {
$value = $vcal->_exportDateTime($event['start']);
$sifEvent .= "<Start>$value</Start>";
$value = $vcal->_exportDateTime($event['end']);
$sifEvent .= "<End>$value</End>";
$sifEvent .= "<AllDayEvent>0</AllDayEvent>";
}
break;
case 'ReminderMinutesBeforeStart':
break;
case 'ReminderSet':
if(count((array)$event['alarm']) > 0) {
$sifEvent .= "<$sifField>1</$sifField>";
foreach($event['alarm'] as $alarmID => $alarmData)
{
$sifEvent .= '<ReminderMinutesBeforeStart>'. $alarmData['offset']/60 .'</ReminderMinutesBeforeStart>';
// lets take only the first alarm
break;
}
} else {
$sifEvent .= "<$sifField>0</$sifField>";
}
break;
default:
$sifEvent .= "<$sifField>$value</$sifField>";
break;
}
}
$sifEvent .= '</appointment>';
return base64_encode($sifEvent);
}
if($this->xmlrpc)
{
$GLOBALS['server']->xmlrpc_error($GLOBALS['xmlrpcerr']['no_access'],$GLOBALS['xmlrpcstr']['no_access']);
}
return False;
}
}

View File

@ -1,25 +0,0 @@
<?php
/**************************************************************************\
* eGroupWare - Calendar *
* http://www.egroupware.org *
* -------------------------------------------- *
* 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$ */
{
// Only Modify the $file and $title variables.....
$title = $appname;
$file = Array(
'Site Configuration' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname=calendar'),
'Custom fields' => $GLOBALS['egw']->link('/index.php','menuaction=admin.customfields.edit&appname=calendar'),
'Calendar Holiday Management' => $GLOBALS['egw']->link('/index.php','menuaction=calendar.uiholiday.admin'),
'Global Categories' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uicategories.index&appname=calendar')
);
//Do not modify below this line
display_section($appname,$title,$file);
}
?>

View File

@ -1,15 +0,0 @@
<?php
/**************************************************************************\
* eGroupWare *
* http://www.egroupware.org *
* -------------------------------------------- *
* 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$ */
$socal =& CreateObject('calendar.socal');
$socal->change_delete_user((int)$_POST['account_id'],(int)$_POST['new_owner']);
unset($socal);

View File

@ -1,77 +0,0 @@
<?php
/**************************************************************************\
* eGroupWare - Calendar on Homepage *
* 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$ */
if($GLOBALS['egw_info']['user']['preferences']['calendar']['mainscreen_showevents'])
{
$GLOBALS['egw']->translation->add_app('calendar');
$save_app_header = $GLOBALS['egw_info']['flags']['app_header'];
if ($GLOBALS['egw_info']['user']['preferences']['calendar']['defaultcalendar'] == 'listview')
{
if (!file_exists(EGW_SERVER_ROOT.($et_css_file ='/etemplate/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/app.css')))
{
$et_css_file = '/etemplate/templates/default/app.css';
}
$content =& ExecMethod('calendar.uilist.home');
}
else
{
unset($et_css_file);
$content =& ExecMethod('calendar.uiviews.home');
}
$portalbox =& CreateObject('phpgwapi.listbox',array(
'title' => $GLOBALS['egw_info']['flags']['app_header'],
'primary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
'secondary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
'tertiary' => $GLOBALS['egw_info']['theme']['navbar_bg'],
'width' => '100%',
'outerborderwidth' => '0',
'header_background_image' => $GLOBALS['egw']->common->image('phpgwapi/templates/default','bg_filler')
));
$GLOBALS['egw_info']['flags']['app_header'] = $save_app_header;
unset($save_app_header);
$GLOBALS['portal_order'][] = $app_id = $GLOBALS['egw']->applications->name2id('calendar');
foreach(array('up','down','close','question','edit') as $key)
{
$portalbox->set_controls($key,Array('url' => '/set_box.php', 'app' => $app_id));
}
$portalbox->data = Array();
if (!file_exists(EGW_SERVER_ROOT.($css_file ='/calendar/templates/'.$GLOBALS['egw_info']['user']['preferences']['common']['template_set'].'/app.css')))
{
$css_file = '/calendar/templates/default/app.css';
}
echo '
<!-- BEGIN Calendar info -->
<style type="text/css">
<!--';
if ($et_css_file) // listview
{
echo '
@import url('.$GLOBALS['egw_info']['server']['webserver_url'].$et_css_file.');';
}
echo '
@import url('.$GLOBALS['egw_info']['server']['webserver_url'].$css_file.');
-->
</style>
'.$portalbox->draw($content)."\n".'<!-- END Calendar info -->'."\n";
unset($css_file); unset($et_css_file);
unset($key);
unset($app_id);
unset($content);
unset($portalbox);
}

View File

@ -1,23 +0,0 @@
<?php
/**************************************************************************\
* eGroupWare - Calendar *
* http://www.egroupware.org *
* -------------------------------------------- *
* 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$ */
{
// Only Modify the $file and $title variables.....
$title = $appname;
$file = array(
'Preferences' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uisettings.index&appname=' . $appname),
'Grant Access' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
'Edit Categories' => $GLOBALS['egw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app='.$appname.'&cats_level=True&global_cats=True'),
'Import CSV-File' => $GLOBALS['egw']->link('/calendar/csv_import.php'),
);
//Do not modify below this line
display_section($appname,$title,$file);
}

View File

@ -1,374 +0,0 @@
<?php
/**
* eGroupWare - Calendar Preferences
*
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @author Mark Peters <skeeter@phpgroupware.org>
* Originally based on Webcalendar by Craig Knudsen <cknudsen@radix.net>
* http://www.radix.net/~cknudsen
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
$bocal =& CreateObject('calendar.bocal');
$bocal->check_set_default_prefs();
$default = array(
'day' => lang('Dayview'),
'day4' => lang('Four days view'),
'week' => lang('Weekview'),
'weekN' => lang('Multiple week view'),
'month' => lang('Monthview'),
'planner_cat' => lang('Planner by category'),
'planner_user' => lang('Planner by user'),
'listview' => lang('Listview'),
);
$grid_views = array(
'all' => lang('all'),
'day_week' => lang('Dayview').', '.lang('Four days view').' &amp; '.lang('Weekview'),
'day4' => lang('Dayview').' &amp; '.lang('Four days view'),
'day' => lang('Dayview'),
);
/* Select list with number of day by week */
$week_view = array(
'5' => lang('Weekview without weekend'),
'7' => lang('Weekview with weekend'),
);
$mainpage = array(
'1' => lang('Yes'),
'0' => lang('No'),
);
/*
$summary = array(
'no' => lang('Never'),
'daily' => lang('Daily'),
'weekly' => lang('Weekly')
);
create_select_box('Receive summary of appointments','summary',$summary,
'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.');
*/
$updates = array(
'no' => lang('Never'),
'add_cancel' => lang('on invitation / cancelation only'),
'time_change_4h' => lang('on time change of more than 4 hours too'),
'time_change' => lang('on any time change too'),
'modifications' => lang('on all modification, but responses'),
'responses' => lang('on participant responses too')
);
$update_formats = array(
'none' => lang('None'),
'extended' => lang('Extended'),
'ical' => lang('iCal / rfc2445')
);
$event_details = array(
'to-fullname' => lang('Fullname of person to notify'),
'to-firstname'=> lang('Firstname of person to notify'),
'to-lastname' => lang('Lastname of person to notify'),
'title' => lang('Title of the event'),
'description' => lang('Description'),
'startdate' => lang('Start Date/Time'),
'enddate' => lang('End Date/Time'),
'olddate' => lang('Old Startdate'),
'category' => lang('Category'),
'location' => lang('Location'),
'priority' => lang('Priority'),
'participants'=> lang('Participants'),
'owner' => lang('Owner'),
'repetition' => lang('Repetitiondetails (or empty)'),
'action' => lang('Action that caused the notify: Added, Canceled, Accepted, Rejected, ...'),
'link' => lang('Link to view the event'),
'disinvited' => lang('Participants disinvited from an event'),
);
$weekdaystarts = array(
'Monday' => lang('Monday'),
'Sunday' => lang('Sunday'),
'Saturday' => lang('Saturday')
);
for ($i=0; $i < 24; ++$i)
{
$times[$i] = $GLOBALS['egw']->common->formattime($i,'00');
}
for ($i = 2; $i <= 9; ++$i)
{
$muliple_weeks[$i.' weeks'] = lang('%1 weeks',$i);
}
$intervals = array(
5 => '5',
10 => '10',
15 => '15',
20 => '20',
30 => '30',
45 => '45',
60 => '60'
);
$groups = $GLOBALS['egw']->accounts->membership($GLOBALS['egw_info']['user']['account_id']);
$options = array('0' => lang('none'));
if (is_array($groups))
{
foreach($groups as $group)
{
$options[$group['account_id']] = $GLOBALS['egw']->common->grab_owner_name($group['account_id']);
}
}
$defaultfilter = array(
'all' => lang('all'),
'private' => lang('private only'),
// 'public' => lang('global public only'),
// 'group' => lang('group public only'),
// 'private+public' => lang('private and global public'),
// 'private+group' => lang('private and group public'),
// 'public+group' => lang('global public and group public')
);
$freebusy_url = $bocal->freebusy_url($GLOBALS['egw_info']['user']['account_lid'],$GLOBALS['egw_info']['user']['preferences']['calendar']['freebusy_pw']);
$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>');
$GLOBALS['settings'] = array(
'defaultcalendar' => array(
'type' => 'select',
'label' => 'default calendar view',
'name' => 'defaultcalendar',
'values' => $default,
'help' => 'Which of calendar view do you want to see, when you start calendar ?',
'xmlrpc' => True,
'admin' => False
),
'days_in_weekview' => array(
'type' => 'select',
'label' => 'default week view',
'name' => 'days_in_weekview',
'values' => $week_view,
'help' => 'Do you want a weekview with or without weekend?',
'xmlrpc' => True,
'admin' => False
),
'multiple_weeks' => array(
'type' => 'select',
'label' => 'Weeks in multiple week view',
'name' => 'multiple_weeks',
'values' => $muliple_weeks,
'help' => 'How many weeks should the multiple week view show?',
'xmlrpc' => True,
'admin' => False
),
'mainscreen_showevents' => array(
'type' => 'select',
'label' => 'show default view on main screen',
'name' => 'mainscreen_showevents',
'values' => $mainpage,
'help' => 'Displays your default calendar view on the startpage (page you get when you enter eGroupWare or click on the homepage icon)?',
'xmlrpc' => True,
'admin' => False
),
'show_rejected' => array(
'type' => 'check',
'label' => 'Show invitations you rejected',
'name' => 'show_rejected',
'help' => 'Should invitations you rejected still be shown in your calendar ?<br>You can only accept them later (eg. when your scheduling conflict is removed), if they are still shown in your calendar!'
),
'weekdaystarts' => array(
'type' => 'select',
'label' => 'weekday starts on',
'name' => 'weekdaystarts',
'values' => $weekdaystarts,
'help' => 'This day is shown as first day in the week or month view.',
'xmlrpc' => True,
'admin' => False
),
'workdaystarts' => array(
'type' => 'select',
'label' => 'work day starts on',
'name' => 'workdaystarts',
'values' => $times,
'help' => 'This defines the start of your dayview. Events before this time, are shown above the dayview.<br>This time is also used as a default starttime for new events.',
'xmlrpc' => True,
'admin' => False
),
'workdayends' => array(
'type' => 'select',
'label' => 'work day ends on',
'name' => 'workdayends',
'values' => $times,
'help' => 'This defines the end of your dayview. Events after this time, are shown below the dayview.',
'xmlrpc' => True,
'admin' => False
),
'use_time_grid' => array(
'type' => 'select',
'label' => 'Views with fixed time intervals',
'name' => 'use_time_grid',
'values' => $grid_views,
'help' => 'For which views should calendar show distinct lines with a fixed time interval.',
'xmlrpc' => True,
'admin' => False
),
'interval' => array(
'type' => 'select',
'label' => 'Length of the time interval',
'name' => 'interval',
'values' => $intervals,
'help' => 'How many minutes should each interval last?',
'xmlrpc' => True,
'admin' => False
),
'defaultlength' => array(
'type' => 'input',
'label' => 'default appointment length (in minutes)',
'name' => 'defaultlength',
'help' => 'Default length of newly created events. The length is in minutes, eg. 60 for 1 hour.',
'default' => '',
'size' => 3,
'xmlrpc' => True,
'admin' => False
),
'planner_start_with_group' => array(
'type' => 'select',
'label' => 'Preselected group for entering the planner',
'name' => 'planner_start_with_group',
'values' => $options,
'help' => 'This group that is preselected when you enter the planner. You can change it in the planner anytime you want.',
'xmlrpc' => True,
'admin' => False
),
'planner_show_empty_rows' => array(
'type' => 'select',
'label' => 'Show empty rows in Planner',
'name' => 'planner_show_empty_rows',
'values' => array(
0 => lang('no'),
'user' => lang('Planner by user'),
'cat' => lang('Planner by category'),
'both' => lang('All'),
),
'help' => 'Should the planner display an empty row for users or categories without any appointment.',
'xmlrpc' => True,
'admin' => False
),
'default_private' => array(
'type' => 'check',
'label' => 'Set new events to private',
'name' => 'default_private',
'help' => 'Should new events created as private by default ?',
'xmlrpc' => True,
'admin' => False
),
'receive_updates' => array(
'type' => 'select',
'label' => 'Receive email updates',
'name' => 'receive_updates',
'values' => $updates,
'help' => "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.",
'xmlrpc' => True,
'admin' => False
),
'update_format' => array(
'type' => 'select',
'label' => 'Format of event updates',
'name' => 'update_format',
'values' => $update_formats,
'help' => 'Extended updates always include the complete event-details. iCal\'s can be imported by certain other calendar-applications.',
'xmlrpc' => True,
'admin' => False
),
'notifyAdded' => array(
'type' => 'notify',
'label' => 'Notification messages for added events ',
'name' => 'notifyAdded',
'rows' => 5,
'cols' => 50,
'help' => 'This message is sent to every participant of events you own, who has requested notifcations about new events.<br>You can use certain variables which get substituted with the data of the event. The first line is the subject of the email.',
'default' => '',
'values' => $event_details,
'xmlrpc' => True,
'admin' => False
),
'notifyCanceled' => array(
'type' => 'notify',
'label' => 'Notification messages for canceled events ',
'name' => 'notifyCanceled',
'rows' => 5,
'cols' => 50,
'help' => 'This message is sent for canceled or deleted events.',
'default' => '',
'values' => $event_details,
'subst_help' => False,
'xmlrpc' => True,
'admin' => False
),
'notifyModified' => array(
'type' => 'notify',
'label' => 'Notification messages for modified events ',
'name' => 'notifyModified',
'rows' => 5,
'cols' => 50,
'help' => 'This message is sent for modified or moved events.',
'default' => '',
'values' => $event_details,
'subst_help' => False,
'xmlrpc' => True,
'admin' => False
),
'notifyDisinvited' => array(
'type' => 'notify',
'label' => 'Notification messages for disinvited participants ',
'name' => 'notifyDisinvited',
'rows' => 5,
'cols' => 50,
'help' => 'This message is sent to disinvited participants.',
'default' => '',
'values' => $event_details,
'subst_help' => False,
'xmlrpc' => True,
'admin' => False
),
'notifyResponse' => array(
'type' => 'notify',
'label' => 'Notification messages for your responses ',
'name' => 'notifyResponse',
'rows' => 5,
'cols' => 50,
'help' => 'This message is sent when you accept, tentative accept or reject an event.',
'default' => '',
'values' => $event_details,
'subst_help' => False,
'xmlrpc' => True,
'admin' => False
),
'notifyAlarm' => array(
'type' => 'notify',
'label' => 'Notification messages for your alarms',
'name' => 'notifyAlarm',
'rows' => 5,
'cols' => 50,
'help' => 'This message is sent when you set an Alarm for a certain event. Include all information you might need.',
'default' => '',
'values' => $event_details,
'subst_help' => False,
'xmlrpc' => True,
'admin' => False
),
'freebusy' => array(
'type' => 'check',
'label' => 'Make freebusy information available to not loged in persons?',
'name' => 'freebusy',
'help' => $freebusy_help,
'run_lang' => false,
'default' => '',
'subst_help' => False,
'xmlrpc' => True,
'admin' => False,
),
'freebusy_pw' => array(
'type' => 'input',
'label' => 'Password for not loged in users to your freebusy information?',
'name' => 'freebusy_pw',
'help' => 'If you dont set a password here, the information is available to everyone, who knows the URL!!!',
'xmlrpc' => True,
'admin' => False
)
);

View File

@ -1,25 +1,13 @@
<?php
/**************************************************************************\
* eGroupWare - Calendar *
* http://www.egroupware.org *
* Written and (c) 2005 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. *
\**************************************************************************/
/**
* eGroupWare Calendar
*
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package calendar
* @copyright (c) 2005-8 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/* $Id$ */
$GLOBALS['egw_info'] = array('flags' => array(
'currentapp'=> 'calendar',
'noheader' => True,
'nonavbar' => True,
));
include('../header.inc.php');
ExecMethod('calendar.uiviews.index');
$GLOBALS['egw']->common->egw_footer();
header('Location: ../index.php?menuaction=calendar.calendar_uiviews.index');

View File

@ -1,3 +1,14 @@
/**
* Calendar - dragNdrop
*
* @link http://www.egroupware.org
* @author Christian Binder <christian.binder@freakmail.de>
* @package calendar
* @copyright (c) 2006 by Christian Binder <christian.binder@freakmail.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
function dragEvent()
{
if(minOffset())
@ -37,7 +48,7 @@ function dropEvent()
dd.obj.div.innerHTML = '<div style="height: 100%; width: 100%; text-align: center;">' + dd.obj.my_loaderImage + '</div>';
xajax_doXMLHTTP(
'calendar.ajaxcalendar.moveEvent',
'calendar.calendar_ajax.moveEvent',
dd.obj.my_eventId,
dd.obj.my_calendarOwner,
dropTarget.my_datetime,

File diff suppressed because one or more lines are too long

View File

@ -1,18 +1,16 @@
<?php
/**************************************************************************\
* eGroupWare - Calendar *
* http://www.egroupware.org *
* -------------------------------------------- *
* 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$ */
/**
* eGroupWare - Calendar setup
*
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
$setup_info['calendar']['name'] = 'calendar';
$setup_info['calendar']['version'] = '1.5.002';
$setup_info['calendar']['version'] = '1.6';
$setup_info['calendar']['app_order'] = 3;
$setup_info['calendar']['enable'] = 1;
@ -34,23 +32,22 @@
$setup_info['calendar']['tables'][] = 'egw_cal_dates';
/* The hooks this app includes, needed for hooks registration */
$setup_info['calendar']['hooks'][] = 'add_def_prefs';
$setup_info['calendar']['hooks'][] = 'admin';
$setup_info['calendar']['hooks'][] = 'deleteaccount';
$setup_info['calendar']['hooks'][] = 'home';
$setup_info['calendar']['hooks'][] = 'preferences';
$setup_info['calendar']['hooks'][] = 'settings';
$setup_info['calendar']['hooks']['sidebox_menu'] = 'calendar.uical.sidebox_menu';
$setup_info['calendar']['hooks']['search_link'] = 'calendar.bocal.search_link';
$setup_info['calendar']['hooks']['admin'] = 'calendar_hooks::admin';
$setup_info['calendar']['hooks']['deleteaccount'] = 'calendar.calendar_so.deleteaccount';
$setup_info['calendar']['hooks']['home'] = 'calendar_hooks::home';
$setup_info['calendar']['hooks']['preferences'] = 'calendar_hooks::preferences';
$setup_info['calendar']['hooks']['settings'] = 'calendar_hooks::settings';
$setup_info['calendar']['hooks']['sidebox_menu'] = 'calendar.calendar_ui.sidebox_menu';
$setup_info['calendar']['hooks']['search_link'] = 'calendar_hooks::search_link';
/* Dependencies for this app to work */
$setup_info['calendar']['depends'][] = array(
'appname' => 'phpgwapi',
'versions' => Array('1.3','1.4','1.5')
'versions' => Array('1.3','1.4','1.5','1.6','1.7')
);
$setup_info['calendar']['depends'][] = array(
'appname' => 'etemplate',
'versions' => Array('1.3','1.4','1.5')
'versions' => Array('1.3','1.4','1.5','1.6','1.7')
);
// installation checks for calendar
@ -61,23 +58,3 @@
'from' => 'Calendar (iCal import+export)',
),
);

View File

@ -1,15 +1,13 @@
<?php
/**************************************************************************\
* eGroupWare *
* http://www.egroupware.org *
* -------------------------------------------- *
* 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$ */
/**
* eGroupWare - Calendar setup
*
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
$phpgw_baseline = array(
'egw_cal' => array(

View File

@ -1,15 +1,13 @@
<?php
/**************************************************************************\
* eGroupWare - Setup *
* http://www.egroupware.org *
* -------------------------------------------- *
* 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$ */
/**
* eGroupWare - Calendar setup
*
* @link http://www.egroupware.org
* @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
function calendar_v0_9_2to0_9_3update_owner($table, $field)
{
@ -38,7 +36,7 @@
$GLOBALS['egw_setup']->oProc->AlterColumn($table, $field, array('type' => 'int', 'precision' => 4, 'nullable' => false, 'default' => 0));
}
$test[] = '0.9.3pre1';
function calendar_upgrade0_9_3pre1()
{
calendar_v0_9_2to0_9_3update_owner('webcal_entry','cal_create_by');
@ -47,84 +45,84 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.3pre2";
function calendar_upgrade0_9_3pre2()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.3pre3';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.3pre3";
function calendar_upgrade0_9_3pre3()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.3pre4';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.3pre4";
function calendar_upgrade0_9_3pre4()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.3pre5';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.3pre5";
function calendar_upgrade0_9_3pre5()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.3pre6';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.3pre6";
function calendar_upgrade0_9_3pre6()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.3pre7';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.3pre7";
function calendar_upgrade0_9_3pre7()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.3pre8';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.3pre8";
function calendar_upgrade0_9_3pre8()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.3pre9';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.3pre9";
function calendar_upgrade0_9_3pre9()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.3pre10';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.3pre10";
function calendar_upgrade0_9_3pre10()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.3';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.3";
function calendar_upgrade0_9_3()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.4pre1';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.4pre1";
function calendar_upgrade0_9_4pre1()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.4pre2';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.4pre2';
function calendar_upgrade0_9_4pre2()
{
$GLOBALS['egw_setup']->oProc->RenameColumn('webcal_entry', 'cal_create_by', 'cal_owner');
@ -133,56 +131,56 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.4pre3";
function calendar_upgrade0_9_4pre3()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.4pre4';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.4pre4";
function calendar_upgrade0_9_4pre4()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.4pre5';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.4pre5";
function calendar_upgrade0_9_4pre5()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.4';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.4";
function calendar_upgrade0_9_4()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.5pre1';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.5pre1";
function calendar_upgrade0_9_5pre1()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.5pre2';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.5pre2";
function calendar_upgrade0_9_5pre2()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.5pre3';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.5";
function calendar_upgrade0_9_5()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.6';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.6";
function calendar_upgrade0_9_6()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.7pre1';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.7pre1';
function calendar_upgrade0_9_7pre1()
{
$db2 = clone($GLOBALS['egw_setup']->db);
@ -316,7 +314,7 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.7pre2";
function calendar_upgrade0_9_7pre2()
{
$db2 = $GLOBALS['egw_setup']->db;
@ -342,242 +340,242 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.7pre3";
function calendar_upgrade0_9_7pre3()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.7';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.7";
function calendar_upgrade0_9_7()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.8pre1';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.8pre1";
function calendar_upgrade0_9_8pre1()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.8pre2';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.8pre2";
function calendar_upgrade0_9_8pre2()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.8pre3';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.8pre3";
function calendar_upgrade0_9_8pre3()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.8pre4';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.8pre4";
function calendar_upgrade0_9_8pre4()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.8pre5';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.8pre5';
function calendar_upgrade0_9_8pre5()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.9pre1';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.9pre1";
function calendar_upgrade0_9_9pre1()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.9';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.9";
function calendar_upgrade0_9_9()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre1';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.10pre1";
function calendar_upgrade0_9_10pre1()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre2';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.10pre2";
function calendar_upgrade0_9_10pre2()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre3';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.10pre3";
function calendar_upgrade0_9_10pre3()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre4';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.10pre4";
function calendar_upgrade0_9_10pre4()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre5';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.10pre5";
function calendar_upgrade0_9_10pre5()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre6';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.10pre6";
function calendar_upgrade0_9_10pre6()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre7';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.10pre7";
function calendar_upgrade0_9_10pre7()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre8';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = "0.9.10pre8";
function calendar_upgrade0_9_10pre8()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre9';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre9';
function calendar_upgrade0_9_10pre9()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre10';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre10';
function calendar_upgrade0_9_10pre10()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre11';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre11';
function calendar_upgrade0_9_10pre11()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre12';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre12';
function calendar_upgrade0_9_10pre12()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre13';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre13';
function calendar_upgrade0_9_10pre13()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre14';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre14';
function calendar_upgrade0_9_10pre14()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre15';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre15';
function calendar_upgrade0_9_10pre15()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre16';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre16';
function calendar_upgrade0_9_10pre16()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre17';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre17';
function calendar_upgrade0_9_10pre17()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre18';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre18';
function calendar_upgrade0_9_10pre18()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre19';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre19';
function calendar_upgrade0_9_10pre19()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre20';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre20';
function calendar_upgrade0_9_10pre20()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre21';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre21';
function calendar_upgrade0_9_10pre21()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre22';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre22';
function calendar_upgrade0_9_10pre22()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre23';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre23';
function calendar_upgrade0_9_10pre23()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre24';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre24';
function calendar_upgrade0_9_10pre24()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre25';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre25';
function calendar_upgrade0_9_10pre25()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre26';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre26';
function calendar_upgrade0_9_10pre26()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre27';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre27';
function calendar_upgrade0_9_10pre27()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10pre28';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10pre28';
function calendar_upgrade0_9_10pre28()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.10';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.10';
function calendar_upgrade0_9_10()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.11.001';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11';
function calendar_upgrade0_9_11()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.11.001';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11.001';
function calendar_upgrade0_9_11_001()
{
$db2 = $GLOBALS['egw_setup']->db;
@ -720,14 +718,14 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11.002';
function calendar_upgrade0_9_11_002()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.11.003';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11.003';
function calendar_upgrade0_9_11_003()
{
$GLOBALS['egw_setup']->oProc->CreateTable('phpgw_cal_holidays',
@ -748,21 +746,21 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11.004';
function calendar_upgrade0_9_11_004()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.11.005';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11.005';
function calendar_upgrade0_9_11_005()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.11.006';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11.006';
function calendar_upgrade0_9_11_006()
{
$GLOBALS['egw_setup']->oProc->DropTable('phpgw_cal_holidays');
@ -785,7 +783,7 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11.007';
function calendar_upgrade0_9_11_007()
{
$GLOBALS['egw_setup']->oProc->query('DELETE FROM phpgw_cal_holidays');
@ -798,14 +796,14 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11.008';
function calendar_upgrade0_9_11_008()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.11.009';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11.009';
function calendar_upgrade0_9_11_009()
{
$GLOBALS['egw_setup']->oProc->query('DELETE FROM phpgw_cal_holidays');
@ -815,33 +813,33 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11.010';
function calendar_upgrade0_9_11_010()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.11.011';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.11.011';
function calendar_upgrade0_9_11_011()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.13.001';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.12';
function calendar_upgrade0_9_12()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.13.001';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.13.001';
function calendar_upgrade0_9_13_001()
{
$GLOBALS['setup_info']['calendar']['currentver'] = '0.9.13.002';
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.13.002';
function calendar_upgrade0_9_13_002()
{
$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_cal','reference',array('type' => 'int', 'precision' => 8,'nullable' => False, 'default' => '0'));
@ -850,7 +848,7 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.13.003';
function calendar_upgrade0_9_13_003()
{
$GLOBALS['egw_setup']->oProc->CreateTable('phpgw_cal_alarm',
@ -876,7 +874,7 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.13.004';
function calendar_upgrade0_9_13_004()
{
$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_cal_alarm','alarm_enabled',array('type' => 'int', 'precision' => 4,'nullable' => False, 'default' => '1'));
@ -885,7 +883,7 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.13.005';
function calendar_upgrade0_9_13_005()
{
$calendar_data = Array();
@ -906,7 +904,7 @@
return $GLOBALS['setup_info']['calendar']['currentver'];
}
$test[] = '0.9.13.006';
function calendar_upgrade0_9_13_006()
{
$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_cal_repeats','recur_exception',array('type' => 'varchar', 'precision' => 255, 'nullable' => True, 'default' => ''));
@ -916,7 +914,7 @@
}
$test[] = '0.9.13.007';
function calendar_upgrade0_9_13_007()
{
$GLOBALS['egw_setup']->oProc->AddColumn('phpgw_cal_user','cal_type',array(
@ -945,7 +943,7 @@
}
$test[] = '0.9.16.001';
function calendar_upgrade0_9_16_001()
{
// this is to set the default as schema_proc was not setting an empty default
@ -963,7 +961,7 @@
// the following series of updates add some indices, to speedup the selects
$test[] = '0.9.16.002';
function calendar_upgrade0_9_16_002()
{
$GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_cal_repeats',array(
@ -987,7 +985,7 @@
}
$test[] = '0.9.16.003';
function calendar_upgrade0_9_16_003()
{
$GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_cal_user',array(
@ -1008,7 +1006,7 @@
}
$test[] = '0.9.16.004';
function calendar_upgrade0_9_16_004()
{
$GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_cal_holidays',array(
@ -1033,7 +1031,7 @@
}
$test[] = '0.9.16.005';
function calendar_upgrade0_9_16_005()
{
// creates uid's for all entries which do not have unique ones, they are '-@domain.com'
@ -1055,7 +1053,7 @@
}
$test[] = '0.9.16.006';
function calendar_upgrade0_9_16_006()
{
// re-run the update as very old entries only have an empty uid
@ -1063,7 +1061,7 @@
}
$test[] = '0.9.16.007';
function calendar_upgrade0_9_16_007()
{
// update the sequenzes for refreshed tables (postgres only)
@ -1074,7 +1072,7 @@
}
$test[] = '1.0.0';
function calendar_upgrade1_0_0()
{
$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_cal','uid','cal_uid');
@ -1096,7 +1094,7 @@
}
$test[] = '1.0.0.001';
function calendar_upgrade1_0_0_001()
{
$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_cal_holidays','locale','hol_locale');
@ -1112,7 +1110,7 @@
}
$test[] = '1.0.0.002';
function calendar_upgrade1_0_0_002()
{
$GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_cal_user','cal_login','cal_user_id');
@ -1123,7 +1121,7 @@
}
$test[] = '1.0.0.003';
function calendar_upgrade1_0_0_003()
{
$GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_cal','cal_title',array(
@ -1138,7 +1136,7 @@
}
$test[] = '1.0.0.004';
function calendar_upgrade1_0_0_004()
{
$GLOBALS['egw_setup']->oProc->RefreshTable('phpgw_cal_repeats',array(
@ -1162,7 +1160,7 @@
}
$test[] = '1.0.0.005';
function calendar_upgrade1_0_0_005()
{
// change prefix of all calendar tables to egw_
@ -1235,7 +1233,7 @@
}
$test[] = '1.0.1.001';
function calendar_upgrade1_0_1_001()
{
/* done by RefreshTable() anyway
@ -1263,7 +1261,7 @@
}
$test[] = '1.0.1.002';
function calendar_upgrade1_0_1_002()
{
$GLOBALS['egw_setup']->oProc->DropColumn('egw_cal',array(
@ -1319,7 +1317,7 @@
}
$test[] = '1.0.1.003';
function calendar_upgrade1_0_1_003()
{
$GLOBALS['egw_setup']->oProc->DropColumn('egw_cal_repeats',array(
@ -1362,7 +1360,7 @@
}
$test[] = '1.0.1.004';
function calendar_upgrade1_0_1_004()
{
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_cal_user','cal_id',array(
@ -1383,7 +1381,7 @@
}
$test[] = '1.0.1.005';
function calendar_upgrade1_0_1_005()
{
$GLOBALS['egw_setup']->oProc->AddColumn('egw_cal_user','cal_quantity',array(
@ -1397,7 +1395,7 @@
}
$test[] = '1.0.1.006';
function calendar_upgrade1_0_1_006()
{
$GLOBALS['egw_setup']->oProc->AddColumn('egw_cal','cal_non_blocking',array(
@ -1411,7 +1409,7 @@
}
$test[] = '1.0.1.007';
function calendar_upgrade1_0_1_007()
{
$GLOBALS['egw_setup']->db->update('egw_cal_repeats',array('recur_exception' => null),array('recur_exception' => ''),__LINE__,__FILE__,'calendar');
@ -1425,7 +1423,7 @@
}
$test[] = '1.0.1.008';
function calendar_upgrade1_0_1_008()
{
$config =& CreateObject('phpgwapi.config','calendar');
@ -1458,7 +1456,7 @@
}
$test[] = '1.0.1.009';
function calendar_upgrade1_0_1_009()
{
$db2 = clone($GLOBALS['egw_setup']->db);
@ -1500,7 +1498,7 @@
}
$test[] = '1.2';
function calendar_upgrade1_2()
{
// get old alarms (saved before 1.2) working again
@ -1509,7 +1507,7 @@
return $GLOBALS['setup_info']['calendar']['currentver'] = '1.2.001';
}
$test[] = '1.2.001';
function calendar_upgrade1_2_001()
{
$GLOBALS['egw_setup']->oProc->AddColumn('egw_cal','cal_special',array(
@ -1521,13 +1519,13 @@
return $GLOBALS['setup_info']['calendar']['currentver'] = '1.3.001';
}
$test[] = '1.3.001';
function calendar_upgrade1_3_001()
{
return $GLOBALS['setup_info']['calendar']['currentver'] = '1.4';
}
$test[] = '1.4';
function calendar_upgrade1_4()
{
$GLOBALS['egw_setup']->oProc->AddColumn('egw_cal','cal_etag',array(
@ -1540,7 +1538,6 @@
}
$test[] = '1.5';
function calendar_upgrade1_5()
{
$GLOBALS['egw_setup']->oProc->DropColumn('egw_cal',array(
@ -1601,7 +1598,6 @@
}
$test[] = '1.5.001';
function calendar_upgrade1_5_001()
{
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_cal_user','cal_id',array(
@ -1617,4 +1613,9 @@
return $GLOBALS['setup_info']['calendar']['currentver'] = '1.5.002';
}
?>
function calendar_upgrade1_5_002()
{
return $GLOBALS['setup_info']['calendar']['currentver'] = '1.6';
}

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- $Id$ -->
<overlay>
<template id="calendar.edit.general" template="" lang="" group="0" version="1.4.002">
<template id="calendar.edit.general" template="" lang="" group="0" version="1.5.001">
<hbox options="0,0">
<grid width="100%" height="200">
<columns>
@ -27,7 +27,7 @@
</row>
<row>
<description/>
<buttononly label="Freetime search" onclick="window.open(egw::link('/index.php','menuaction=calendar.uiforms.freetimesearch')+values2url(this.form,'start,end,duration,participants,recur_type,whole_day'),'ft_search','dependent=yes,width=700,height=500,scrollbars=yes,status=yes'); return false;" width="0" id="freetime" statustext="Find free timeslots where the selected participants are availible for the given timespan"/>
<buttononly label="Freetime search" onclick="window.open(egw::link('/index.php','menuaction=calendar.calendar_uiforms.freetimesearch')+values2url(this.form,'start,end,duration,participants,recur_type,whole_day'),'ft_search','dependent=yes,width=700,height=500,scrollbars=yes,status=yes'); return false;" width="0" id="freetime" statustext="Find free timeslots where the selected participants are availible for the given timespan"/>
</row>
<row class="row">
<description options=",,,location" value="Location" width="0"/>
@ -114,7 +114,7 @@
</rows>
</grid>
</template>
<template id="calendar.edit.recurrence" template="" lang="" group="0" version="1.3.001">
<template id="calendar.edit.recurrence" template="" lang="" group="0" version="1.3.002">
<grid width="100%" height="200">
<columns>
<column width="95"/>
@ -133,7 +133,7 @@
</menulist>
<description options=",,,recur_interval" value="Interval"/>
<menulist>
<menupopup type="select-number" id="recur_interval" statustext="repeating interval, eg. 2 to repeat every second week" options="None,2,10"/>
<menupopup type="select-number" id="recur_interval" statustext="repeating interval, eg. 2 to repeat every second week" options="None,2,31"/>
</menulist>
</row>
<row class="row" height="12">
@ -258,7 +258,7 @@
</rows>
</grid>
</template>
<template id="calendar.edit" template="" lang="" group="0" version="1.3.004">
<template id="calendar.edit" template="" lang="" group="0" version="1.3.005">
<grid width="100%">
<columns>
<column width="100"/>
@ -267,7 +267,7 @@
</columns>
<rows>
<row disabled="!@msg">
<description span="all" class="redItalic" id="msg" no_lang="1" align="center"/>
<html span="all" class="redItalic" id="msg" no_lang="1" align="center"/>
<description/>
<description/>
</row>

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- $Id$ -->
<overlay>
<template id="calendar.list.rows" template="" lang="" group="0" version="1.3.003">
<template id="calendar.list.rows" template="" lang="" group="0" version="1.5.001">
<grid width="100%">
<columns>
<column/>
@ -11,6 +11,11 @@
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
</columns>
<rows>
<row class="th">
@ -22,12 +27,17 @@
<nextmatch-sortheader label="Title" id="cal_title"/>
<nextmatch-sortheader label="Description" id="cal_description"/>
</vbox>
<nextmatch-sortheader label="Title" id="cal_title"/>
<nextmatch-sortheader label="Description" id="cal_description"/>
<nextmatch-sortheader label="Recurrence" id="recure"/>
<nextmatch-header label="Project" id="pm_id"/>
<nextmatch-header label="Category" id="cat_id"/>
<vbox>
<nextmatch-sortheader id="cal_owner" label="Owner" readonly="true"/>
<nextmatch-sortheader id="cal_location" label="Location"/>
</vbox>
<nextmatch-sortheader id="cal_owner" label="Owner" readonly="true"/>
<nextmatch-sortheader id="cal_location" label="Location"/>
<nextmatch-accountfilter options="All" id="participant" label="Participants"/>
<description value="Actions" class="noPrint"/>
</row>
@ -41,6 +51,9 @@
<description id="${row}[description]" no_lang="1"/>
<description id="${row}[recure]" no_lang="1"/>
</vbox>
<description id="${row}[title]"/>
<description id="${row}[description]" no_lang="1"/>
<description id="${row}[recure]"/>
<link-string options="calendar,projectmanager" id="${row}[id]"/>
<menulist>
<menupopup type="select-cat" id="${row}[category]" readonly="true"/>
@ -51,17 +64,22 @@
</menulist>
<description id="${row}[location]" no_lang="1"/>
</vbox>
<menulist class="noWrap">
<menupopup type="select-account" id="${row}[owner]" readonly="true"/>
</menulist>
<description id="${row}[location]" no_lang="1"/>
<html id="${row}[parts]" readonly="true" no_lang="1"/>
<hbox class="noPrint">
<button image="view" label="View" id="view[$row_cont[id]]" statustext="View this event" onclick="window.open(egw::link('/index.php','menuaction=calendar.uiforms.edit&amp;cal_id=$row_cont[id]&amp;date=$row_cont[date]'),'425','dependent=yes,width=750,height=450,scrollbars=yes,status=yes'); return false;"/>
<button image="edit" label="Edit" id="edit[$row_cont[id]]" statustext="Edit this event" onclick="window.open(egw::link('/index.php','menuaction=calendar.uiforms.edit&amp;cal_id=$row_cont[id]&amp;date=$row_cont[date]'),'425','dependent=yes,width=750,height=450,scrollbars=yes,status=yes'); return false;"/>
<button image="view" label="View" id="view[$row_cont[id]]" statustext="View this event" onclick="window.open(egw::link('/index.php','menuaction=calendar.calendar_uiforms.edit&amp;cal_id=$row_cont[id]&amp;date=$row_cont[date]'),'425','dependent=yes,width=750,height=450,scrollbars=yes,status=yes'); return false;"/>
<button image="edit" label="Edit" id="edit[$row_cont[id]]" statustext="Edit this event" onclick="window.open(egw::link('/index.php','menuaction=calendar.calendar_uiforms.edit&amp;cal_id=$row_cont[id]&amp;date=$row_cont[date]'),'425','dependent=yes,width=750,height=450,scrollbars=yes,status=yes'); return false;"/>
<button id="delete[$row_cont[id]]" image="delete" label="Delete" statustext="Delete this event" onclick="return confirm('Delete this event');"/>
<checkbox id="checked[]" options="$row_cont[id]" statustext="Select multiple contacts for a further action" align="right"/>
</hbox>
</row>
</rows>
</grid>
</template>
<template id="calendar.list" template="" lang="" group="0" version="1.0.1.001">
<template id="calendar.list" template="" lang="" group="0" version="1.5.001">
<grid width="100%">
<columns>
<column/>
@ -73,6 +91,12 @@
<row>
<nextmatch options="calendar.list.rows" id="nm"/>
</row>
<row>
<hbox label="Check all" id="check_all" statustext="Check all" needed="1" align="right">
<button id="deleteall" image="delete" label="Delete" statustext="Delete selected Envents" onclick="return confirm('Delete selected Envents?');"/>
<button image="arrow_ltr" label="Check all" id="check_all" statustext="Check all" onclick="toggle_all(this.form,form::name('nm[rows][checked][]')); return false;" class="checkAllArrow"/>
</hbox>
</row>
</rows>
</grid>
<styles>