Edit: 3.23: Specify folder for new event

This commit is contained in:
Thomas Bruederli 2011-06-11 14:10:49 -06:00
parent b45566de9e
commit 6d7e073301
6 changed files with 20 additions and 4 deletions

View file

@ -22,7 +22,7 @@
- View: 3.5: Search - View: 3.5: Search
+ View: 3.9: Alter event with drag/drop + View: 3.9: Alter event with drag/drop
+ Option: 4.12: Set default reminder time + Option: 4.12: Set default reminder time
- Edit: 3.23: Specify folder for new event (prefs) + Option: 3.23: Specify folder for new event (prefs)
- Receive: 1.20: Invitation handling - Receive: 1.20: Invitation handling
- View: 3.4: Fish-Eye View For Busy Days - View: 3.4: Fish-Eye View For Busy Days

View file

@ -728,7 +728,7 @@ function rcube_calendar(settings)
}).data('id', id); }).data('id', id);
} }
if (!cal.readonly && !this.selected_calendar) { if (!cal.readonly && !this.selected_calendar && (!settings.default_calendar || settings.default_calendar == id)) {
this.selected_calendar = id; this.selected_calendar = id;
rcmail.enable_command('plugin.addevent', true); rcmail.enable_command('plugin.addevent', true);
} }
@ -754,6 +754,7 @@ function rcube_calendar(settings)
slotMinutes : 60/settings['timeslots'], slotMinutes : 60/settings['timeslots'],
timeFormat: { timeFormat: {
'': settings['time_format'], '': settings['time_format'],
agenda: settings['time_format'] + '{ - ' + settings['time_format'] + '}',
list: settings['time_format'] + '{ - ' + settings['time_format'] + '}', list: settings['time_format'] + '{ - ' + settings['time_format'] + '}',
table: settings['time_format'] + '{ - ' + settings['time_format'] + '}' table: settings['time_format'] + '{ - ' + settings['time_format'] + '}'
}, },

View file

@ -236,6 +236,17 @@ class calendar extends rcube_plugin
'content' => $input_value->show($preset[0]) . ' ' . $select_offset->show($preset[1]), 'content' => $input_value->show($preset[0]) . ' ' . $select_offset->show($preset[1]),
); );
// default calendar selection
$field_id = 'rcmfd_default_calendar';
$select_cal = new html_select(array('name' => '_default_calendar', 'id' => $field_id));
foreach ((array)$this->driver->list_calendars() as $id => $prop) {
if (!$prop['readononly'])
$select_cal->add($prop['name'], strval($id));
}
$p['blocks']['view']['options']['defaultcalendar'] = array(
'title' => html::label($field_id . 'value', Q($this->gettext('defaultcalendar'))),
'content' => $select_cal->show($this->rc->config->get('calendar_default_calendar', '')),
);
// category definitions // category definitions
if (!$this->driver->categoriesimmutable) { if (!$this->driver->categoriesimmutable) {
@ -305,6 +316,7 @@ class calendar extends rcube_plugin
'calendar_first_day' => get_input_value('_first_day', RCUBE_INPUT_POST), 'calendar_first_day' => get_input_value('_first_day', RCUBE_INPUT_POST),
'calendar_default_alarm_type' => get_input_value('_alarm_type', RCUBE_INPUT_POST), 'calendar_default_alarm_type' => get_input_value('_alarm_type', RCUBE_INPUT_POST),
'calendar_default_alarm_offset' => $default_alam, 'calendar_default_alarm_offset' => $default_alam,
'calendar_default_calendar' => get_input_value('_default_calendar', RCUBE_INPUT_POST),
); );
// categories // categories
@ -475,6 +487,7 @@ class calendar extends rcube_plugin
$settings = array(); $settings = array();
// configuration // configuration
$settings['default_calendar'] = $this->rc->config->get('calendar_default_calendar');
$settings['default_view'] = (string)$this->rc->config->get('calendar_default_view', "agendaWeek"); $settings['default_view'] = (string)$this->rc->config->get('calendar_default_view', "agendaWeek");
$settings['date_format'] = (string)$this->rc->config->get('calendar_date_format', "yyyy/MM/dd"); $settings['date_format'] = (string)$this->rc->config->get('calendar_date_format', "yyyy/MM/dd");
$settings['date_short'] = (string)$this->rc->config->get('calendar_date_short', "M/d"); $settings['date_short'] = (string)$this->rc->config->get('calendar_date_short', "M/d");

View file

@ -158,7 +158,8 @@ class calendar_ui
$attrib['name'] = 'calendar'; $attrib['name'] = 'calendar';
$select = new html_select($attrib); $select = new html_select($attrib);
foreach ((array)$this->calendar->driver->list_calendars() as $id => $prop) { foreach ((array)$this->calendar->driver->list_calendars() as $id => $prop) {
$select->add($prop['name'], $id); if (!$prop['readonly'])
$select->add($prop['name'], $id);
} }
return $select->show(null); return $select->show(null);

View file

@ -5350,7 +5350,7 @@ function ListEventRenderer() {
times = renderEventTime(event, seg); times = renderEventTime(event, seg);
skinCss = getSkinCss(event, opt); skinCss = getSkinCss(event, opt);
skinCssAttr = (skinCss ? " style='" + skinCss + "'" : ''); skinCssAttr = (skinCss ? " style='" + skinCss + "'" : '');
classes = ['fc-event', 'fc-event-skin', 'fc-event-vert', 'fc-corner-left', 'fc-corner-right', 'fc-corner-top', 'fc-corner-bottom']; classes = ['fc-event', 'fc-event-skin', 'fc-event-vert', 'fc-corner-top', 'fc-corner-bottom'];
if (event.source && event.source.className) { if (event.source && event.source.className) {
classes = classes.concat(event.source.className); classes = classes.concat(event.source.className);
} }

View file

@ -10,6 +10,7 @@ $labels['add_category'] = 'Add category';
$labels['remove_category'] = 'Remove category'; $labels['remove_category'] = 'Remove category';
$labels['add_calendar'] = 'Add calendar'; $labels['add_calendar'] = 'Add calendar';
$labels['remove_calendar'] = 'Remove calendar'; $labels['remove_calendar'] = 'Remove calendar';
$labels['defaultcalendar'] = 'Create new events in';
// calendar // calendar
$labels['calendar'] = 'Calendar'; $labels['calendar'] = 'Calendar';