Set default size of agenda view to 60 days; increase up to 90 days when searching
This commit is contained in:
parent
3ff6a72400
commit
b97c1be9a5
3 changed files with 5 additions and 5 deletions
|
@ -55,7 +55,7 @@ class calendar extends rcube_plugin
|
|||
'calendar_first_hour' => 6,
|
||||
'calendar_work_start' => 6,
|
||||
'calendar_work_end' => 18,
|
||||
'calendar_agenda_range' => 30,
|
||||
'calendar_agenda_range' => 60,
|
||||
);
|
||||
|
||||
private $default_categories = array(
|
||||
|
|
|
@ -1544,7 +1544,7 @@ function rcube_calendar_ui(settings)
|
|||
|
||||
// change to list view
|
||||
fc.fullCalendar('option', 'listSections', 'month');
|
||||
fc.fullCalendar('option', 'listRange', settings['agenda_range']);
|
||||
fc.fullCalendar('option', 'listRange', Math.max(60, settings['agenda_range']));
|
||||
fc.fullCalendar('changeView', 'table');
|
||||
|
||||
// refetch events with new url (if not already triggered by changeView)
|
||||
|
@ -1621,9 +1621,9 @@ function rcube_calendar_ui(settings)
|
|||
lc.append(" ");
|
||||
$('<a>').attr('href', '#').html(rcmail.gettext('searchlaterdates', 'calendar')).appendTo(lc).click(function(){
|
||||
var range = fc.fullCalendar('option', 'listRange');
|
||||
if (range < 60) {
|
||||
if (range < 90) {
|
||||
fc.fullCalendar('getView').start = null; // force re-render
|
||||
fc.fullCalendar('option', 'listRange', 60).fullCalendar('render');
|
||||
fc.fullCalendar('option', 'listRange', fc.fullCalendar('option', 'listRange') + 30).fullCalendar('render');
|
||||
}
|
||||
else
|
||||
fc.fullCalendar('incrementDate', 0, 1, 0);
|
||||
|
|
|
@ -47,7 +47,7 @@ $rcmail_config['calendar_date_agenda'] = 'ddd MM-dd';
|
|||
$rcmail_config['calendar_timeslots'] = 2;
|
||||
|
||||
// show this number of days in agenda view
|
||||
$rcmail_config['calendar_agenda_range'] = 30;
|
||||
$rcmail_config['calendar_agenda_range'] = 60;
|
||||
|
||||
// first day of the week (0-6)
|
||||
$rcmail_config['calendar_first_day'] = 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue