mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
added possibility for recurring events in calendar to change the state of all future events or just one (the clicked) event. Some (previous also existing) bugs still pending: save button changes state of all users and recurrences, first recurrence state is wrong. Also added a delete icon for deleting a participant
This commit is contained in:
parent
af6c779625
commit
4c8a62e731
@ -267,7 +267,7 @@ class uiforms extends uical
|
|||||||
|
|
||||||
|
|
||||||
default: // existing participant row
|
default: // existing participant row
|
||||||
foreach(array('uid','status','quantity') as $name)
|
foreach(array('uid','status','status_recurrence','quantity') as $name)
|
||||||
{
|
{
|
||||||
$$name = $data[$name];
|
$$name = $data[$name];
|
||||||
}
|
}
|
||||||
@ -289,7 +289,7 @@ class uiforms extends uical
|
|||||||
}
|
}
|
||||||
if ($data['old_status'] != $status)
|
if ($data['old_status'] != $status)
|
||||||
{
|
{
|
||||||
if ($this->bo->set_status($event['id'],$uid,$status,$event['recur_type'] != MCAL_RECUR_NONE ? $content['participants']['status_date'] : 0))
|
if ($this->bo->set_status($event['id'],$uid,$status,$event['recur_type'] != MCAL_RECUR_NONE && $status_recurrence != 'A' ? $content['participants']['status_date'] : 0))
|
||||||
{
|
{
|
||||||
// refreshing the calendar-view with the changed participant-status
|
// refreshing the calendar-view with the changed participant-status
|
||||||
$msg = lang('Status changed');
|
$msg = lang('Status changed');
|
||||||
@ -607,6 +607,7 @@ class uiforms extends uical
|
|||||||
'ical' => array('label' => 'Export', 'title' => 'Download this event as iCal'),
|
'ical' => array('label' => 'Export', 'title' => 'Download this event as iCal'),
|
||||||
'mail' => array('label' => 'Mail participants', 'title' => 'compose a mail to all participants after the event is saved'),
|
'mail' => array('label' => 'Mail participants', 'title' => 'compose a mail to all participants after the event is saved'),
|
||||||
),
|
),
|
||||||
|
'status_recurrence' => array('' => 'for this event', 'A' => 'for all future events'),
|
||||||
);
|
);
|
||||||
unset($sel_options['status']['G']);
|
unset($sel_options['status']['G']);
|
||||||
if (!is_array($event))
|
if (!is_array($event))
|
||||||
@ -638,7 +639,8 @@ class uiforms extends uical
|
|||||||
$preserv['actual_date'] = $event['start']; // remember the date clicked
|
$preserv['actual_date'] = $event['start']; // remember the date clicked
|
||||||
if ($event['recur_type'] != MCAL_RECUR_NONE)
|
if ($event['recur_type'] != MCAL_RECUR_NONE)
|
||||||
{
|
{
|
||||||
$event = $this->bo->read($cal_id,0,true); // recuring event --> read the series
|
$participants = array('participants' => $event['participants'], 'participant_types' => $event['participant_types']); // preserv participants of this event
|
||||||
|
$event = array_merge($this->bo->read($cal_id,0,true), $participants); // recuring event --> read the series + concatenate with participants of the selected recurrence
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// set new start and end if given by $_GET
|
// set new start and end if given by $_GET
|
||||||
@ -690,7 +692,7 @@ class uiforms extends uical
|
|||||||
'quantity' => substr($status,1),
|
'quantity' => substr($status,1),
|
||||||
);
|
);
|
||||||
$readonlys[$row.'[quantity]'] = $type == 'u' || !isset($this->bo->resources[$type]['max_quantity']);
|
$readonlys[$row.'[quantity]'] = $type == 'u' || !isset($this->bo->resources[$type]['max_quantity']);
|
||||||
$readonlys[$row.'[status]'] = !$this->bo->check_status_perms($uid,$event);
|
$readonlys[$row.'[status]'] = $readonlys[$row.'[status_recurrence]'] = !$this->bo->check_status_perms($uid,$event);
|
||||||
$readonlys["delete[$uid]"] = !$this->bo->check_perms(EGW_ACL_EDIT,$event);
|
$readonlys["delete[$uid]"] = !$this->bo->check_perms(EGW_ACL_EDIT,$event);
|
||||||
$content['participants'][$row++]['title'] = $name == 'accounts' ?
|
$content['participants'][$row++]['title'] = $name == 'accounts' ?
|
||||||
$GLOBALS['egw']->common->grab_owner_name($id) : $this->link->title($name,$id);
|
$GLOBALS['egw']->common->grab_owner_name($id) : $this->link->title($name,$id);
|
||||||
@ -720,9 +722,7 @@ class uiforms extends uical
|
|||||||
foreach($this->bo->resources as $data) $content['participants']['cal_resources'] .= ','.$data['app'];
|
foreach($this->bo->resources as $data) $content['participants']['cal_resources'] .= ','.$data['app'];
|
||||||
}
|
}
|
||||||
$content['participants']['status_date'] = $preserv['actual_date'];
|
$content['participants']['status_date'] = $preserv['actual_date'];
|
||||||
// echo '$content[participants]'; _debug_array($content['participants']);
|
$content['participants']['hide_status_recurrence'] = $event['recur_type'] == MCAL_RECUR_NONE;
|
||||||
// echo '$content[participant_types]'; _debug_array($content['participant_types']);
|
|
||||||
// _debug_array($sel_options);
|
|
||||||
$preserv = array_merge($preserv,$content);
|
$preserv = array_merge($preserv,$content);
|
||||||
|
|
||||||
if ($event['alarm'])
|
if ($event['alarm'])
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* eGroupWare - eTemplates for Application calendar
|
* eGroupWare - eTemplates for Application calendar
|
||||||
* http://www.egroupware.org
|
* http://www.egroupware.org
|
||||||
* generated by soetemplate::dump4setup() 2007-01-15 23:37
|
* generated by soetemplate::dump4setup() 2007-02-26 23:09
|
||||||
*
|
*
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* @package calendar
|
* @package calendar
|
||||||
@ -46,7 +46,7 @@ $templ_data[] = array('name' => 'calendar.edit.participants','template' => '','l
|
|||||||
|
|
||||||
$templ_data[] = array('name' => 'calendar.edit.participants','template' => '','lang' => '','group' => '0','version' => '1.0.1.003','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:5:{s:2:"c1";s:7:"row,top";s:1:"A";s:2:"95";s:2:"h1";s:6:",@view";s:2:"h2";s:7:",!@view";s:2:"c2";s:4:",top";}i:1;a:4:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:15:",,,participants";s:5:"label";s:12:"Participants";}s:1:"B";a:3:{s:4:"type";s:14:"select-account";s:4:"size";s:12:"14,calendar+";s:4:"name";s:22:"participants[accounts]";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"Resources";s:5:"align";s:5:"right";}s:1:"D";a:3:{s:4:"type";s:16:"resources_select";s:4:"size";s:2:"14";s:4:"name";s:23:"participants[resources]";}}i:2;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Participants";}s:1:"B";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:6:"${row}";s:8:"readonly";s:1:"1";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:26:"accounts_status[$row_cont]";s:8:"onchange";s:1:"1";s:4:"help";s:30:"Accept or reject an invitation";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:1;s:4:"cols";i:2;s:4:"name";s:22:"participants[accounts]";s:7:"options";a:0:{}}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"Resources";s:5:"align";s:5:"right";}s:1:"D";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"h1";s:19:",!@resources_status";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:16:"resources_select";s:4:"name";s:6:"${row}";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:27:"resources_status[$row_cont]";s:8:"onchange";s:1:"1";s:4:"help";s:30:"Accept or reject an invitation";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:1;s:4:"cols";i:2;s:4:"name";s:23:"participants[resources]";s:7:"options";a:0:{}}}}s:4:"rows";i:2;s:4:"cols";i:4;s:4:"size";s:23:"100%,200,,row_on,,,auto";s:7:"options";a:4:{i:3;s:6:"row_on";i:0;s:4:"100%";i:1;s:3:"200";i:6;s:4:"auto";}}}','size' => '100%,200,,row_on,,,auto','style' => '','modified' => '1129665796',);
|
$templ_data[] = array('name' => 'calendar.edit.participants','template' => '','lang' => '','group' => '0','version' => '1.0.1.003','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:5:{s:2:"c1";s:7:"row,top";s:1:"A";s:2:"95";s:2:"h1";s:6:",@view";s:2:"h2";s:7:",!@view";s:2:"c2";s:4:",top";}i:1;a:4:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:15:",,,participants";s:5:"label";s:12:"Participants";}s:1:"B";a:3:{s:4:"type";s:14:"select-account";s:4:"size";s:12:"14,calendar+";s:4:"name";s:22:"participants[accounts]";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"Resources";s:5:"align";s:5:"right";}s:1:"D";a:3:{s:4:"type";s:16:"resources_select";s:4:"size";s:2:"14";s:4:"name";s:23:"participants[resources]";}}i:2;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Participants";}s:1:"B";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:6:"${row}";s:8:"readonly";s:1:"1";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:26:"accounts_status[$row_cont]";s:8:"onchange";s:1:"1";s:4:"help";s:30:"Accept or reject an invitation";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:1;s:4:"cols";i:2;s:4:"name";s:22:"participants[accounts]";s:7:"options";a:0:{}}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"Resources";s:5:"align";s:5:"right";}s:1:"D";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"h1";s:19:",!@resources_status";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:16:"resources_select";s:4:"name";s:6:"${row}";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:27:"resources_status[$row_cont]";s:8:"onchange";s:1:"1";s:4:"help";s:30:"Accept or reject an invitation";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:1;s:4:"cols";i:2;s:4:"name";s:23:"participants[resources]";s:7:"options";a:0:{}}}}s:4:"rows";i:2;s:4:"cols";i:4;s:4:"size";s:23:"100%,200,,row_on,,,auto";s:7:"options";a:4:{i:3;s:6:"row_on";i:0;s:4:"100%";i:1;s:3:"200";i:6;s:4:"auto";}}}','size' => '100%,200,,row_on,,,auto','style' => '','modified' => '1129665796',);
|
||||||
|
|
||||||
$templ_data[] = array('name' => 'calendar.edit.participants','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:7:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:5:{s:1:"A";s:2:"95";s:2:"c3";s:4:",top";s:2:"c1";s:3:"row";s:2:"c2";s:2:"th";s:2:"h1";s:8:",@no_add";}i:1;a:5:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"New";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:14:"select-account";s:4:"size";s:18:"User or group,both";s:4:"name";s:7:"account";}i:2;a:3:{s:4:"type";s:10:"link-entry";s:4:"name";s:8:"resource";s:4:"size";s:14:"@cal_resources";}}s:1:"C";a:3:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,,3";s:4:"name";s:8:"quantity";}s:1:"D";a:3:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:2;a:5:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Participants";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Quantity";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Status";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Delete";}}i:3;a:5:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:11:"${row}[app]";}s:1:"B";a:6:{s:4:"type";s:5:"label";s:4:"data";a:2:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:6:"${row}";s:8:"readonly";s:1:"1";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:26:"accounts_status[$row_cont]";s:8:"onchange";s:1:"1";s:4:"help";s:30:"Accept or reject an invitation";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:1;s:4:"cols";i:2;s:4:"name";s:13:"${row}[title]";s:7:"no_lang";s:1:"1";}s:1:"C";a:3:{s:4:"type";s:3:"int";s:4:"name";s:16:"${row}[quantity]";s:4:"size";s:4:"1,,3";}s:1:"D";a:4:{s:4:"type";s:6:"select";s:4:"name";s:14:"${row}[status]";s:7:"no_lang";s:1:"1";s:8:"onchange";i:1;}s:1:"E";a:6:{s:4:"type";s:8:"checkbox";s:4:"data";a:2:{i:0;a:1:{s:2:"h1";s:19:",!@resources_status";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:16:"resources_select";s:4:"name";s:6:"${row}";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:27:"resources_status[$row_cont]";s:8:"onchange";s:1:"1";s:4:"help";s:30:"Accept or reject an invitation";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:1;s:4:"cols";i:2;s:4:"name";s:22:"delete[$row_cont[uid]]";s:5:"align";s:6:"center";}}}s:4:"rows";i:3;s:4:"cols";i:5;s:4:"size";s:17:"100%,200,,,,,auto";s:4:"name";s:12:"participants";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"200";i:6;s:4:"auto";}}}','size' => '100%,200,,,,,auto','style' => '','modified' => '1162211604',);
|
$templ_data[] = array('name' => 'calendar.edit.participants','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:7:{s:4:"type";s:4:"grid";s:4:"data";a:4:{i:0;a:6:{s:1:"A";s:2:"95";s:2:"c3";s:4:",top";s:2:"c1";s:3:"row";s:2:"c2";s:2:"th";s:2:"h1";s:8:",@no_add";s:1:"D";s:24:",@hide_status_recurrence";}i:1;a:6:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"New";}s:1:"B";a:4:{s:4:"type";s:4:"vbox";s:4:"size";s:6:"2,,0,0";i:1;a:3:{s:4:"type";s:14:"select-account";s:4:"size";s:18:"User or group,both";s:4:"name";s:7:"account";}i:2;a:3:{s:4:"type";s:10:"link-entry";s:4:"name";s:8:"resource";s:4:"size";s:14:"@cal_resources";}}s:1:"C";a:3:{s:4:"type";s:3:"int";s:4:"size";s:4:"1,,3";s:4:"name";s:8:"quantity";}s:1:"D";a:1:{s:4:"type";s:5:"label";}s:1:"E";a:3:{s:4:"type";s:6:"button";s:5:"label";s:3:"Add";s:4:"name";s:3:"add";}s:1:"F";a:1:{s:4:"type";s:5:"label";}}i:2;a:6:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Type";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:12:"Participants";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Quantity";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:17:"status recurrence";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Status";}s:1:"F";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Actions";}}i:3;a:6:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"name";s:11:"${row}[app]";}s:1:"B";a:6:{s:4:"type";s:5:"label";s:4:"data";a:2:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:6:"${row}";s:8:"readonly";s:1:"1";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:26:"accounts_status[$row_cont]";s:8:"onchange";s:1:"1";s:4:"help";s:30:"Accept or reject an invitation";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:1;s:4:"cols";i:2;s:4:"name";s:13:"${row}[title]";s:7:"no_lang";s:1:"1";}s:1:"C";a:3:{s:4:"type";s:3:"int";s:4:"name";s:16:"${row}[quantity]";s:4:"size";s:4:"1,,3";}s:1:"D";a:2:{s:4:"type";s:6:"select";s:4:"name";s:25:"${row}[status_recurrence]";}s:1:"E";a:4:{s:4:"type";s:6:"select";s:4:"name";s:14:"${row}[status]";s:7:"no_lang";s:1:"1";s:8:"onchange";i:1;}s:1:"F";a:9:{s:4:"type";s:6:"button";s:4:"data";a:2:{i:0;a:1:{s:2:"h1";s:19:",!@resources_status";}i:1;a:2:{s:1:"A";a:4:{s:4:"type";s:16:"resources_select";s:4:"name";s:6:"${row}";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}s:1:"B";a:5:{s:4:"type";s:6:"select";s:4:"name";s:27:"resources_status[$row_cont]";s:8:"onchange";s:1:"1";s:4:"help";s:30:"Accept or reject an invitation";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:1;s:4:"cols";i:2;s:4:"name";s:22:"delete[$row_cont[uid]]";s:5:"align";s:6:"center";s:5:"label";s:6:"Delete";s:8:"onchange";i:1;s:4:"size";s:6:"delete";}}}s:4:"rows";i:3;s:4:"cols";i:6;s:4:"size";s:17:"100%,200,,,,,auto";s:4:"name";s:12:"participants";s:7:"options";a:3:{i:0;s:4:"100%";i:1;s:3:"200";i:6;s:4:"auto";}}}','size' => '100%,200,,,,,auto','style' => '','modified' => '1172430059',);
|
||||||
|
|
||||||
$templ_data[] = array('name' => 'calendar.edit.recurrence','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:2:{s:2:"c1";s:3:"row";s:1:"A";s:2:"95";}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:8:"100%,200";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:3:"200";}}}','size' => '100%,200','style' => '','modified' => '1118737412',);
|
$templ_data[] = array('name' => 'calendar.edit.recurrence','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:2:{s:2:"c1";s:3:"row";s:1:"A";s:2:"95";}i:1;a:1:{s:1:"A";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:8:"100%,200";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:3:"200";}}}','size' => '100%,200','style' => '','modified' => '1118737412',);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user