- fixed for IE not working switch "use end date" in freetimesearch

- using duration selectbox now in edit too (incl. "use end date" to give longer/other durations)
This commit is contained in:
Ralf Becker 2006-06-02 23:36:43 +00:00
parent 366f164183
commit 7c55d3bdb3
4 changed files with 74 additions and 21 deletions

View File

@ -41,6 +41,13 @@ class uiforms extends uical
'import' => true,
);
/**
* Standard durations used in edit and freetime search
*
* @var array
*/
var $durations = array();
/**
* Constructor
*/
@ -49,6 +56,11 @@ class uiforms extends uical
$this->uical(true); // call the parent's constructor
$this->link =& $this->bo->link;
for ($n=15; $n <= 8*60; $n+=($n < 60 ? 15 : ($n < 240 ? 30 : 60)))
{
$this->durations[$n*60] = sprintf('%d:%02d',$n/60,$n%60);
}
}
/**
@ -183,6 +195,10 @@ class uiforms extends uical
unset($content['alarm'][$id]);
}
}
if ($content['duration'])
{
$content['end'] = $content['start'] + $content['duration'];
}
$event = $content;
unset($event['new_alarm']);
unset($event['alarm']['delete_alarm']);
@ -541,9 +557,10 @@ class uiforms extends uical
$etpl =& CreateObject('etemplate.etemplate','calendar.edit');
$sel_options = array(
'recur_type' => &$this->bo->recur_types,
'recur_type' => &$this->bo->recur_types,
'accounts_status' => $this->bo->verbose_status,
'owner' => array(),
'duration' => $this->durations,
);
if (!is_array($event))
{
@ -595,6 +612,10 @@ class uiforms extends uical
'view' => $view,
));
$content['participants'] = array();
$content['duration'] = $content['end'] - $content['start'];
if (isset($this->durations[$content['duration']])) $content['end'] = '';
foreach($event['participant_types'] as $type => $participants)
{
$name = 'accounts';
@ -683,6 +704,7 @@ class uiforms extends uical
$readonlys['button[save]'] = $readonlys['button[apply]'] = $readonlys['freetime'] = true;
$readonlys['link_to'] = $readonlys['customfields'] = true;
$readonlys['duration'] = true;
if ($event['recur_type'] != MCAL_RECUR_NONE)
{
@ -694,6 +716,14 @@ class uiforms extends uical
}
else
{
if (!is_object($GLOBALS['egw']->js))
{
$GLOBALS['egw']->js = CreateObject('phpgwapi.javascript');
}
// We hide the enddate if one of our predefined durations fits
// 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')."');");
$readonlys['button[copy]'] = $readonlys['button[vcal]'] = true;
unset($preserv['participants']); // otherwise deleted participants are still reported
$readonlys['recur_exception'] = !count($content['recur_exception']); // otherwise we get a delete button
@ -807,7 +837,11 @@ class uiforms extends uical
if (!is_array($content))
{
$edit_content = $etpl->process_values2url();
if ($edit_content['duration'])
{
$edit_content['end'] = $edit_content['start'] + $edit_content['duration'];
}
if ($edit_content['whole_day'])
{
$arr = $this->bo->date2array($edit_content['start']);
@ -881,6 +915,7 @@ class uiforms extends uical
'exec[start][i]' => (int) date('i',$start),
'exec[end][str]' => date($this->common_prefs['dateformat'],$end),
'exec[end][i]' => (int) date('i',$end),
'exec[duration]' => $content['duration'],
);
if ($this->common_prefs['timeformat'] == 12)
{
@ -925,12 +960,6 @@ class uiforms extends uical
}
$content['freetime'] = $this->freetime($content['participants'],$content['start'],$content['start']+$content['search_window'],$content['duration'],$content['cal_id']);
$content['freetime'] = $this->split_freetime_daywise($content['freetime'],$content['duration'],$content['weekdays'],$content['start_time'],$content['end_time'],$sel_options);
$sel_options['duration'][] = lang('use end date');
for ($n=15; $n <= 8*60; $n+=($n < 60 ? 15 : ($n < 240 ? 30 : 60)))
{
$sel_options['duration'][$n*60] = sprintf('%d:%02d',$n/60,$n%60);
}
if ($content['duration'] <= 8*HOUR_s) $content['end'] = '';
//echo "<pre>".print_r($content,true)."</pre>\n";
$GLOBALS['egw_info']['flags']['app_header'] = lang('calendar') . ' - ' . lang('freetime search');
@ -941,10 +970,11 @@ class uiforms extends uical
{
$GLOBALS['egw']->js = CreateObject('phpgwapi.javascript');
}
$sel_options['duration'] = $this->durations;
if ($content['duration'] && isset($sel_options['duration'][$content['duration']])) $content['end'] = '';
// We hide the enddate if one of our predefined durations fits
// 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('*','end_hide','visibility','".($content['duration'] && isset($sel_options['duration'][$content['duration']]) ? 'hidden' : 'visible')."');");
$etpl->set_cell_attribute('duration','onchange',"set_style_by_class('*','end_hide','visibility',this.value == 0 ? 'visible' : 'hidden');");
$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(
'participants' => $content['participants'],

View File

@ -1,7 +1,14 @@
<?php
// eTemplates for Application 'calendar', generated by soetemplate::dump4setup() 2006-03-26 19:57
/* $Id$ */
/**
* eGroupWare - eTemplates for Application calendar
* http://www.egroupware.org
* generated by soetemplate::dump4setup() 2006-06-03 03:30
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package calendar
* @subpackage setup
* @version $Id$
*/
$templ_version=1;
@ -13,6 +20,8 @@ $templ_data[] = array('name' => 'calendar.edit','template' => '','lang' => '','g
$templ_data[] = array('name' => 'calendar.edit','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:6:{i:0;a:7:{s:2:"h1";s:6:",!@msg";s:2:"c2";s:2:"th";s:1:"A";s:3:"100";s:2:"c4";s:3:"row";s:2:"h4";s:8:",!@owner";s:1:"B";s:3:"300";s:2:"h2";s:2:"28";}i:1;a:3:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:2;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Title";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:6:"80,255";s:4:"name";s:5:"title";s:4:"span";s:3:"all";s:6:"needed";s:1:"1";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:5:{s:4:"type";s:3:"tab";s:4:"span";s:3:"all";s:5:"label";s:63:"General|Description|Participants|Recurrence|Custom|Links|Alarms";s:4:"name";s:63:"general|description|participants|recurrence|custom|links|alarms";s:4:"help";s:158:"Location, Start- and Endtimes, ...|Full description|Participants, Resources, ...|Repeating Event Information|Custom fields|Links, Attachments|Alarm management";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}s:1:"B";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:5:"owner";s:8:"readonly";s:1:"1";}s:1:"C";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:5:{s:4:"type";s:9:"date-time";s:5:"label";s:7:"Updated";s:4:"name";s:8:"modified";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:5:"label";s:2:"by";s:4:"name";s:8:"modifier";s:8:"readonly";s:1:"1";}}}i:5;a:3:{s:1:"A";a:11:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"8";s:4:"span";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[edit]";s:5:"label";s:4:"Edit";s:4:"help";s:15:"Edit this event";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[exception]";s:5:"label";s:9:"Exception";s:4:"help";s:42:"Create an exception at this recuring event";}i:3;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[copy]";s:5:"label";s:4:"Copy";s:4:"help";s:15:"Copy this event";}i:4;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[vcal]";s:5:"label";s:6:"Export";s:4:"help";s:27:"Download this event as iCal";}i:5;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";s:4:"help";s:22:"saves the changes made";}i:6;a:4:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[apply]";s:5:"label";s:5:"Apply";s:4:"help";s:17:"apply the changes";}i:7;a:5:{s:4:"type";s:6:"button";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";s:4:"help";s:16:"Close the window";}i:8;a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:11:"custom_mail";s:5:"label";s:21:"mail all participants";s:4:"help";s:59:"compose a mail to all participants after the event is saved";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:6:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:14:"button[delete]";s:4:"help";s:17:"Delete this event";s:7:"onclick";s:36:"return confirm(\'Delete this event\');";s:5:"align";s:5:"right";}}}s:4:"rows";i:5;s:4:"cols";i:3;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '','modified' => '1132776053',);
$templ_data[] = array('name' => 'calendar.edit','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:6:{i:0;a:7:{s:2:"h1";s:6:",!@msg";s:2:"c2";s:2:"th";s:1:"A";s:3:"100";s:2:"c4";s:3:"row";s:2:"h4";s:8:",!@owner";s:1:"B";s:3:"300";s:2:"h2";s:2:"28";}i:1;a:3:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:2;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Title";}s:1:"B";a:5:{s:4:"type";s:4:"text";s:4:"size";s:6:"80,255";s:4:"name";s:5:"title";s:4:"span";s:3:"all";s:6:"needed";s:1:"1";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:3;a:3:{s:1:"A";a:5:{s:4:"type";s:3:"tab";s:4:"span";s:3:"all";s:5:"label";s:63:"General|Description|Participants|Recurrence|Custom|Links|Alarms";s:4:"name";s:63:"general|description|participants|recurrence|custom|links|alarms";s:4:"help";s:158:"Location, Start- and Endtimes, ...|Full description|Participants, Resources, ...|Repeating Event Information|Custom fields|Links, Attachments|Alarm management";}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}s:1:"B";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:5:"owner";s:8:"readonly";s:1:"1";}s:1:"C";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";s:5:"align";s:5:"right";i:1;a:5:{s:4:"type";s:9:"date-time";s:5:"label";s:7:"Updated";s:4:"name";s:8:"modified";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}i:2;a:4:{s:4:"type";s:14:"select-account";s:5:"label";s:2:"by";s:4:"name";s:8:"modifier";s:8:"readonly";s:1:"1";}}}i:5;a:3:{s:1:"A";a:11:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"8";s:4:"span";s:1:"2";i:1;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[edit]";s:5:"label";s:4:"Edit";s:4:"help";s:15:"Edit this event";}i:2;a:4:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[exception]";s:5:"label";s:9:"Exception";s:4:"help";s:42:"Create an exception at this recuring event";}i:3;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[copy]";s:5:"label";s:4:"Copy";s:4:"help";s:15:"Copy this event";}i:4;a:4:{s:4:"type";s:6:"button";s:4:"name";s:12:"button[vcal]";s:5:"label";s:6:"Export";s:4:"help";s:27:"Download this event as iCal";}i:5;a:4:{s:4:"type";s:6:"button";s:5:"label";s:4:"Save";s:4:"name";s:12:"button[save]";s:4:"help";s:22:"saves the changes made";}i:6;a:4:{s:4:"type";s:6:"button";s:4:"name";s:13:"button[apply]";s:5:"label";s:5:"Apply";s:4:"help";s:17:"apply the changes";}i:7;a:5:{s:4:"type";s:6:"button";s:4:"name";s:14:"button[cancel]";s:5:"label";s:6:"Cancel";s:7:"onclick";s:15:"window.close();";s:4:"help";s:16:"Close the window";}i:8;a:4:{s:4:"type";s:8:"checkbox";s:4:"name";s:11:"custom_mail";s:5:"label";s:21:"mail all participants";s:4:"help";s:59:"compose a mail to all participants after the event is saved";}}s:1:"B";a:1:{s:4:"type";s:5:"label";}s:1:"C";a:6:{s:4:"type";s:6:"button";s:5:"label";s:6:"Delete";s:4:"name";s:14:"button[delete]";s:4:"help";s:17:"Delete this event";s:7:"onclick";s:36:"return confirm(\'Delete this event\');";s:5:"align";s:5:"right";}}}s:4:"rows";i:5;s:4:"cols";i:3;s:4:"size";s:4:"100%";s:7:"options";a:1:{i:0;s:4:"100%";}}}','size' => '100%','style' => '.end_hide { visibility: visible; white-space: nowrap; margin-left: 10px; }','modified' => '1149292820',);
$templ_data[] = array('name' => 'calendar.edit.alarms','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','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:3:"row";s:1:"A";s:2:"95";s:2:"h1";s:16:"20,@no_add_alarm";s:2:"c2";s:4:",top";s:2:"h2";s:8:",!@alarm";}i:1;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:16:"before the event";}s:1:"B";a:10:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"8";i:1;a:3:{s:4:"type";s:13:"select-number";s:4:"size";s:4:",0,7";s:4:"name";s:15:"new_alarm[days]";}i:2;a:3:{s:4:"type";s:5:"label";s:4:"size";s:18:",,,new_alarm[days]";s:5:"label";s:4:"days";}i:3;a:3:{s:4:"type";s:13:"select-number";s:4:"name";s:16:"new_alarm[hours]";s:4:"size";s:5:",0,23";}i:4;a:3:{s:4:"type";s:5:"label";s:4:"size";s:19:",,,new_alarm[hours]";s:5:"label";s:5:"hours";}i:5;a:3:{s:4:"type";s:13:"select-number";s:4:"name";s:15:"new_alarm[mins]";s:4:"size";s:7:",0,55,5";}i:6;a:3:{s:4:"type";s:5:"label";s:4:"size";s:18:",,,new_alarm[mins]";s:5:"label";s:7:"Minutes";}i:7;a:5:{s:4:"type";s:6:"select";s:4:"name";s:16:"new_alarm[owner]";s:7:"no_lang";s:1:"1";s:5:"label";s:3:"for";s:4:"help";s:31:"Select who should get the alarm";}i:8;a:3:{s:4:"type";s:6:"button";s:4:"name";s:17:"button[add_alarm]";s:5:"label";s:9:"Add alarm";}}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Alarms";}s:1:"B";a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";}i:1;a:5:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Time";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:16:"before the event";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:16:"All participants";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:5:"Owner";}s:1:"E";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Action";}}i:2;a:5:{s:1:"A";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:12:"${row}[time]";s:8:"readonly";s:1:"1";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:4:"name";s:14:"${row}[offset]";s:7:"no_lang";s:1:"1";}s:1:"C";a:4:{s:4:"type";s:8:"checkbox";s:5:"align";s:6:"center";s:4:"name";s:11:"${row}[all]";s:8:"readonly";s:1:"1";}s:1:"D";a:3:{s:4:"type";s:14:"select-account";s:4:"name";s:13:"${row}[owner]";s:8:"readonly";s:1:"1";}s:1:"E";a:7:{s:4:"type";s:6:"button";s:4:"size";s:6:"delete";s:5:"label";s:6:"Delete";s:5:"align";s:6:"center";s:4:"name";s:27:"delete_alarm[$row_cont[id]]";s:4:"help";s:17:"Delete this alarm";s:7:"onclick";s:36:"return confirm(\'Delete this alarm\');";}}}s:4:"rows";i:2;s:4:"cols";i:5;s:4:"name";s:5:"alarm";s:7:"options";a:0:{}}}}s:4:"rows";i:2;s:4:"cols";i:2;s:4:"size";s:17:"100%,200,,,,,auto";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' => '1118780740',);
$templ_data[] = array('name' => 'calendar.edit.custom','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:2:{i:0;a:1:{s:2:"c1";s:4:",top";}i:1;a:1:{s:1:"A";a:2:{s:4:"type";s:12:"customfields";s:4:"name";s:12:"customfields";}}}s:4:"rows";i:1;s:4:"cols";i:1;s:4:"size";s:17:"100%,200,,,,,auto";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' => '1118737582',);
@ -21,6 +30,8 @@ $templ_data[] = array('name' => 'calendar.edit.description','template' => '','la
$templ_data[] = array('name' => 'calendar.edit.general','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:9:{s:2:"c1";s:3:"row";s:1:"A";s:2:"95";s:2:"c3";s:3:"row";s:2:"c4";s:7:"row,top";s:2:"c6";s:3:"row";s:2:"c5";s:3:"row";s:2:"c2";s:3:"row";s:2:"h4";s:2:"60";s:1:"B";s:3:"35%";}i:1;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,start";s:5:"label";s:5:"Start";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:5:"start";s:6:"needed";s:1:"1";}s:1:"C";a:5:{s:4:"type";s:8:"checkbox";s:4:"name";s:9:"whole_day";s:5:"label";s:9:"whole day";s:4:"help";s:31:"Event will occupy the whole day";s:4:"size";s:11:",, ,disable";}}i:2;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:6:",,,end";s:5:"label";s:3:"End";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:3:"end";s:6:"needed";s:1:"1";}s:1:"C";a:5:{s:4:"type";s:6:"button";s:5:"label";s:15:"Freetime search";s:4:"name";s:8:"freetime";s:4:"help";s:88:"Find free timeslots where the selected participants are availible for the given timespan";s:7:"onclick";s:239:"window.open(egw::link(\'/index.php\',\'menuaction=calendar.uiforms.freetimesearch\')+values2url(this.form,\'start,end,participants,recur_type,whole_day\'),\'ft_search\',\'dependent=yes,width=700,height=500,scrollbars=yes,status=yes\'); return false;";}}i:3;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,location";s:5:"label";s:8:"Location";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"80,255";s:4:"name";s:8:"location";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,category";s:5:"label";s:8:"Category";}s:1:"B";a:4:{s:4:"type";s:10:"select-cat";s:4:"size";s:1:"3";s:4:"name";s:8:"category";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:5;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,priority";s:5:"label";s:8:"Priority";}s:1:"B";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:2:{s:4:"type";s:15:"select-priority";s:4:"name";s:8:"priority";}i:2;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:12:"non blocking";s:4:"help";s:56:"A non blocking event will not conflict with other events";s:4:"name";s:12:"non_blocking";s:4:"size";s:11:",, ,disable";}s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:6;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:9:",,,public";s:5:"label";s:7:"Private";}s:1:"B";a:4:{s:4:"type";s:8:"checkbox";s:4:"size";s:3:"0,1";s:4:"name";s:6:"public";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:6;s:4:"cols";i:3;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' => '1118477982',);
$templ_data[] = array('name' => 'calendar.edit.general','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:9:{s:2:"c1";s:3:"row";s:1:"A";s:2:"95";s:2:"c3";s:3:"row";s:2:"c4";s:7:"row,top";s:2:"c6";s:3:"row";s:2:"c5";s:3:"row";s:2:"c2";s:3:"row";s:2:"h4";s:2:"60";s:1:"B";s:3:"50%";}i:1;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:8:",,,start";s:5:"label";s:5:"Start";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:5:"start";s:6:"needed";s:1:"1";}s:1:"C";a:5:{s:4:"type";s:8:"checkbox";s:4:"name";s:9:"whole_day";s:5:"label";s:9:"whole day";s:4:"help";s:31:"Event will occupy the whole day";s:4:"size";s:11:",, ,disable";}}i:2;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,duration";s:5:"label";s:8:"Duration";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:6:{s:4:"type";s:6:"select";s:4:"name";s:8:"duration";s:4:"size";s:12:"Use end date";s:7:"no_lang";s:1:"1";s:4:"help";s:23:"Duration of the meeting";s:8:"onchange";s:92:"set_style_by_class(\'table\',\'end_hide\',\'visibility\',this.value == \'\' ? \'visible\' : \'hidden\');";}i:2;a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:3:"end";s:6:"needed";s:1:"1";s:4:"span";s:9:",end_hide";}}s:1:"C";a:5:{s:4:"type";s:6:"button";s:5:"label";s:15:"Freetime search";s:4:"name";s:8:"freetime";s:4:"help";s:88:"Find free timeslots where the selected participants are availible for the given timespan";s:7:"onclick";s:248:"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;";}}i:3;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,location";s:5:"label";s:8:"Location";}s:1:"B";a:4:{s:4:"type";s:4:"text";s:4:"size";s:6:"80,255";s:4:"name";s:8:"location";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:4;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,category";s:5:"label";s:8:"Category";}s:1:"B";a:4:{s:4:"type";s:10:"select-cat";s:4:"size";s:1:"3";s:4:"name";s:8:"category";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:5;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:11:",,,priority";s:5:"label";s:8:"Priority";}s:1:"B";a:5:{s:4:"type";s:4:"hbox";s:4:"size";s:6:"2,,0,0";i:1;a:2:{s:4:"type";s:15:"select-priority";s:4:"name";s:8:"priority";}i:2;a:5:{s:4:"type";s:8:"checkbox";s:5:"label";s:12:"non blocking";s:4:"help";s:56:"A non blocking event will not conflict with other events";s:4:"name";s:12:"non_blocking";s:4:"size";s:11:",, ,disable";}s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}i:6;a:3:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"size";s:9:",,,public";s:5:"label";s:7:"Private";}s:1:"B";a:4:{s:4:"type";s:8:"checkbox";s:4:"size";s:3:"0,1";s:4:"name";s:6:"public";s:4:"span";s:3:"all";}s:1:"C";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:6;s:4:"cols";i:3;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' => '1118477982',);
$templ_data[] = array('name' => 'calendar.edit.links','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:7:{s:1:"A";s:2:"95";s:2:"h1";s:6:",@view";s:2:"h2";s:6:",@view";s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:2:"c3";s:2:"th";s:2:"c4";s:11:"row_off,top";}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:16:"Create new links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:3:{s:4:"type";s:7:"link-to";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:3;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";s:5:"label";s:14:"Existing links";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:4;a:2:{s:1:"A";a:3:{s:4:"type";s:9:"link-list";s:4:"span";s:3:"all";s:4:"name";s:7:"link_to";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:2;s:4:"size";s:17:"100%,200,,,,,auto";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' => '1118758702',);
$templ_data[] = array('name' => 'calendar.edit.participants','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','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:7:"row,top";s:1:"A";s:2:"95";}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:2:"14";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]";}}}s:4:"rows";i:1;s:4:"cols";i:4;s:4:"size";s:16:"100%,200,,row_on";s:7:"options";a:3:{i:3;s:6:"row_on";i:0;s:4:"100%";i:1;s:3:"200";}}}','size' => '100%,200,,row_on','style' => '','modified' => '1118481127',);
@ -44,6 +55,10 @@ $templ_data[] = array('name' => 'calendar.freetimesearch','template' => '','lang
.redItalic { color: red; font-style: italic; }
.end_hide { visibility: hidden; }','modified' => '1102850646',);
$templ_data[] = array('name' => 'calendar.freetimesearch','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"span";s:9:",size120b";s:5:"label";s:15:"Freetime Search";}s:1:"B";a:4:{s:4:"type";s:5:"label";s:4:"span";s:10:",redItalic";s:7:"no_lang";s:1:"1";s:4:"name";s:3:"msg";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:17:"Startdate / -time";}s:1:"B";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:5:"start";s:4:"help";s:33:"Startdate and -time of the search";}}i:3;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Duration";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:6:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:8:"duration";s:4:"help";s:23:"Duration of the meeting";s:8:"onchange";s:92:"set_style_by_class(\'table\',\'end_hide\',\'visibility\',this.value == \'\' ? \'visible\' : \'hidden\');";s:4:"size";s:12:"Use end date";}i:2;a:4:{s:4:"type";s:9:"date-time";s:4:"name";s:3:"end";s:4:"help";s:57:"Enddate / -time of the meeting, eg. for more then one day";s:4:"span";s:9:",end_hide";}}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"Timeframe";}s:1:"B";a:7:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"5";i:1;a:3:{s:4:"type";s:13:"date-houronly";s:4:"name";s:10:"start_time";s:4:"help";s:19:"Timeframe to search";}i:2;a:2:{s:4:"type";s:5:"label";s:5:"label";s:3:"til";}i:3;a:3:{s:4:"type";s:13:"date-houronly";s:4:"name";s:8:"end_time";s:4:"help";s:19:"Timeframe to search";}i:4;a:2:{s:4:"type";s:5:"label";s:5:"label";s:8:"Weekdays";}i:5;a:4:{s:4:"type";s:10:"select-dow";s:4:"size";s:1:"3";s:4:"name";s:8:"weekdays";s:4:"help";s:25:"Weekdays to use in search";}}}i:5;a:2:{s:1:"A";a:4:{s:4:"type";s:6:"button";s:5:"label";s:10:"New search";s:4:"name";s:6:"search";s:4:"help";s:36:"new search with the above parameters";}s:1:"B";a:4:{s:4:"type";s:4:"hbox";s:4:"size";s:1:"2";i:1;a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"search_window";s:4:"help";s:34:"how far to search (from startdate)";}i:2;a:5:{s:4:"type";s:6:"button";s:4:"name";s:6:"cancel";s:5:"label";s:6:"Cancel";s:4:"help";s:16:"Close the window";s:7:"onclick";s:15:"window.close();";}}}i:6;a:2:{s:1:"A";a:4:{s:4:"type";s:8:"template";s:4:"size";s:8:"freetime";s:4:"span";s:3:"all";s:4:"name";s:4:"rows";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:6;s:4:"cols";i:2;}}','size' => '','style' => '.size120b { text-size: 120%; font-weight: bold; }
.redItalic { color: red; font-style: italic; }
.end_hide { visibility: hidden; }','modified' => '1149297367',);
$templ_data[] = array('name' => 'calendar.freetimesearch.rows','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";}i:1;a:4:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Date";}s:1:"B";a:2:{s:4:"type";s:5:"label";s:5:"label";s:4:"Time";}s:1:"C";a:2:{s:4:"type";s:5:"label";s:5:"label";s:6:"Select";}s:1:"D";a:2:{s:4:"type";s:5:"label";s:5:"label";s:7:"Enddate";}}i:2;a:4:{s:1:"A";a:4:{s:4:"type";s:4:"date";s:4:"size";s:3:",16";s:4:"name";s:13:"${row}[start]";s:8:"readonly";s:1:"1";}s:1:"B";a:4:{s:4:"type";s:6:"select";s:7:"no_lang";s:1:"1";s:4:"name";s:13:"${row}[start]";s:4:"help";s:13:"select a time";}s:1:"C";a:4:{s:4:"type";s:6:"button";s:5:"label";s:6:"Select";s:4:"name";s:12:"select[$row]";s:4:"help";s:41:"use the selected time and close the popup";}s:1:"D";a:3:{s:4:"type";s:9:"date-time";s:4:"name";s:11:"${row}[end]";s:8:"readonly";s:1:"1";}}}s:4:"rows";i:2;s:4:"cols";i:4;}}','size' => '','style' => '','modified' => '1097183756',);
$templ_data[] = array('name' => 'calendar.import','template' => '','lang' => '','group' => '0','version' => '1.0.1.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:5:{i:0;a:0:{}i:1;a:2:{s:1:"A";a:5:{s:4:"type";s:5:"label";s:4:"span";s:13:"all,redItalic";s:4:"name";s:3:"msg";s:7:"no_lang";s:1:"1";s:5:"align";s:6:"center";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}i:2;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"iCal file";}s:1:"B";a:3:{s:4:"type";s:4:"file";s:4:"name";s:9:"ical_file";s:6:"needed";s:1:"1";}}i:3;a:2:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:3:{s:4:"type";s:6:"button";s:5:"label";s:6:"Import";s:4:"name";s:6:"import";}}i:4;a:2:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:4:"span";s:3:"all";}s:1:"B";a:1:{s:4:"type";s:5:"label";}}}s:4:"rows";i:4;s:4:"cols";i:2;s:5:"align";s:6:"center";s:7:"options";a:0:{}}}','size' => '','style' => '','modified' => '1131469789',);

View File

@ -1,11 +1,11 @@
<?xml version="1.0"?>
<!-- $Id$ -->
<overlay>
<template id="calendar.edit.general" template="" lang="" group="0" version="1.0.1.001">
<template id="calendar.edit.general" template="" lang="" group="0" version="1.3.001">
<grid width="100%" height="200">
<columns>
<column width="95"/>
<column width="35%"/>
<column width="50%"/>
<column/>
</columns>
<rows>
@ -15,9 +15,14 @@
<checkbox id="whole_day" label="whole day" statustext="Event will occupy the whole day" options=",, ,disable"/>
</row>
<row class="row">
<description options=",,,end" value="End"/>
<date-time id="end" needed="1"/>
<button label="Freetime search" id="freetime" statustext="Find free timeslots where the selected participants are availible for the given timespan" onclick="window.open(egw::link('/index.php','menuaction=calendar.uiforms.freetimesearch')+values2url(this.form,'start,end,participants,recur_type,whole_day'),'ft_search','dependent=yes,width=700,height=500,scrollbars=yes,status=yes'); return false;"/>
<description options=",,,duration" value="Duration"/>
<hbox orient=",0,0">
<menulist>
<menupopup id="duration" options="Use end date" no_lang="1" statustext="Duration of the meeting" onchange="set_style_by_class('table','end_hide','visibility',this.value == '' ? 'visible' : 'hidden');"/>
</menulist>
<date-time id="end" needed="1" class="end_hide"/>
</hbox>
<button label="Freetime search" id="freetime" statustext="Find free timeslots where the selected participants are availible for the given timespan" 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;"/>
</row>
<row class="row">
<description options=",,,location" value="Location"/>
@ -250,7 +255,7 @@
</rows>
</grid>
</template>
<template id="calendar.edit" template="" lang="" group="0" version="1.0.1.003">
<template id="calendar.edit" template="" lang="" group="0" version="1.3.001">
<grid width="100%">
<columns>
<column width="100"/>
@ -316,5 +321,8 @@
</row>
</rows>
</grid>
<styles>
.end_hide { visibility: visible; white-space: nowrap; margin-left: 10px; }
</styles>
</template>
</overlay>

View File

@ -27,7 +27,7 @@
</rows>
</grid>
</template>
<template id="calendar.freetimesearch" template="" lang="" group="0" version="1.0.1.002">
<template id="calendar.freetimesearch" template="" lang="" group="0" version="1.3.001">
<grid>
<columns>
<column/>
@ -46,7 +46,7 @@
<description value="Duration"/>
<hbox>
<menulist>
<menupopup no_lang="1" id="duration" statustext="Duration of the meeting"/>
<menupopup no_lang="1" id="duration" statustext="Duration of the meeting" onchange="set_style_by_class('table','end_hide','visibility',this.value == '' ? 'visible' : 'hidden');" options="Use end date"/>
</menulist>
<date-time id="end" statustext="Enddate / -time of the meeting, eg. for more then one day" class="end_hide"/>
</hbox>