diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php
index 4ed5023c..afb23854 100644
--- a/plugins/calendar/calendar.php
+++ b/plugins/calendar/calendar.php
@@ -50,7 +50,6 @@ class calendar extends rcube_plugin
'calendar_work_start' => 6,
'calendar_work_end' => 18,
'calendar_agenda_range' => 60,
- 'calendar_agenda_sections' => 'smart',
'calendar_event_coloring' => 0,
'calendar_time_indicator' => true,
'calendar_allow_invite_shared' => false,
@@ -1779,7 +1778,6 @@ class calendar extends rcube_plugin
$settings['work_start'] = (int)$this->rc->config->get('calendar_work_start', $this->defaults['calendar_work_start']);
$settings['work_end'] = (int)$this->rc->config->get('calendar_work_end', $this->defaults['calendar_work_end']);
$settings['agenda_range'] = (int)$this->rc->config->get('calendar_agenda_range', $this->defaults['calendar_agenda_range']);
- $settings['agenda_sections'] = $this->rc->config->get('calendar_agenda_sections', $this->defaults['calendar_agenda_sections']);
$settings['event_coloring'] = (int)$this->rc->config->get('calendar_event_coloring', $this->defaults['calendar_event_coloring']);
$settings['time_indicator'] = (int)$this->rc->config->get('calendar_time_indicator', $this->defaults['calendar_time_indicator']);
$settings['invite_shared'] = (int)$this->rc->config->get('calendar_allow_invite_shared', $this->defaults['calendar_allow_invite_shared']);
@@ -2437,9 +2435,6 @@ class calendar extends rcube_plugin
if ($range = rcube_utils::get_input_value('range', rcube_utils::INPUT_GPC))
$this->rc->output->set_env('listRange', intval($range));
- if (isset($_REQUEST['sections']))
- $this->rc->output->set_env('listSections', rcube_utils::get_input_value('sections', rcube_utils::INPUT_GPC));
-
if ($search = rcube_utils::get_input_value('search', rcube_utils::INPUT_GPC)) {
$this->rc->output->set_env('search', $search);
$title .= ' "' . $search . '"';
diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index 91575245..1253e0d6 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -134,20 +134,6 @@ function rcube_calendar_ui(settings)
eventLimitText: function(num) {
return rcmail.gettext('andnmore', 'calendar').replace('$nr', num);
},
-/*
- listTexts: {
- until: rcmail.gettext('until', 'calendar'),
- past: rcmail.gettext('pastevents', 'calendar'),
- today: rcmail.gettext('today', 'calendar'),
- tomorrow: rcmail.gettext('tomorrow', 'calendar'),
- thisWeek: rcmail.gettext('thisweek', 'calendar'),
- nextWeek: rcmail.gettext('nextweek', 'calendar'),
- thisMonth: rcmail.gettext('thismonth', 'calendar'),
- nextMonth: rcmail.gettext('nextmonth', 'calendar'),
- future: rcmail.gettext('futureevents', 'calendar'),
- week: rcmail.gettext('weekofyear', 'calendar')
- },
-*/
// event rendering
eventRender: function(event, element, view) {
if (view.name != 'list') {
@@ -2674,12 +2660,6 @@ function rcube_calendar_ui(settings)
return true;
};
- var update_agenda_toolbar = function()
- {
-// $('#agenda-listrange').val();
-// $('#agenda-listsections').val(fc.fullCalendar('option', 'listSections'));
- }
-
/*** public methods ***/
@@ -2692,63 +2672,6 @@ function rcube_calendar_ui(settings)
rcmail.set_busy(false, null, me.saving_lock);
};
- // opens calendar day-view in a popup
- this.fisheye_view = function(date)
- {
- $('#fish-eye-view:ui-dialog').dialog('close');
-
- // create list of active event sources
- var src, cals = {}, sources = [];
- for (var id in this.calendars) {
- src = $.extend({}, this.calendars[id]);
- src.editable = false;
- src.url = null;
- src.events = [];
-
- if (src.active) {
- cals[id] = src;
- sources.push(src);
- }
- }
-
- // copy events already loaded
- var events = fc.fullCalendar('clientEvents');
- for (var event, i=0; i< events.length; i++) {
- event = events[i];
- if (event.source && (src = cals[event.source.id])) {
- src.events.push(event);
- }
- }
-
- var h = $(window).height() - 50;
- var dialog = $('
')
- .attr('id', 'fish-eye-view')
- .dialog({
- modal: true,
- width: 680,
- height: h,
- title: format_date(date, 'dddd ' + settings.date_long),
- buttons: [{
- text: rcmail.gettext('cancel', 'calendar'),
- 'class': 'cancel',
- click: function() { $(this).dialog("close"); }
- }],
- close: function(){
- dialog.dialog("destroy");
- me.fisheye_date = null;
- }
- })
- .fullCalendar($.extend({}, fullcalendar_defaults, {
- defaultView: 'agendaDay',
- header: { left: '', center: '', right: '' },
- height: h - 50,
- defaultDate: date,
- eventSources: sources
- }));
-
- this.fisheye_date = date;
- };
-
// opens the given calendar in a popup dialog
this.quickview = function(id, shift)
{
@@ -2865,13 +2788,11 @@ function rcube_calendar_ui(settings)
{
if (!view) view = fc.fullCalendar('getView').name;
var date = fc.fullCalendar('getDate').toDate();
-// var sections = fc.fullCalendar('option', 'listSections');
rcmail.open_window(rcmail.url('print', {
view: view,
date: date2unixtime(date),
range: settings.agenda_range,
- // sections: sections,
search: this.search_query
}), true, true);
};
@@ -3274,10 +3195,6 @@ function rcube_calendar_ui(settings)
event.temp = false;
event.editable = 0;
- // update fish-eye view
- if (this.fisheye_date)
- update_view($('#fish-eye-view'), event, source);
-
// update main view
event.editable = source.editable;
update_view(fc, event, source);
@@ -3414,11 +3331,8 @@ function rcube_calendar_ui(settings)
this.search_query = q;
// change to list view
- // fc.fullCalendar('option', 'listSections', 'month');
fc.fullCalendar('changeView', 'list');
-
- update_agenda_toolbar();
-
+
// refetch events with new url (if not already triggered by changeView)
if (!this.is_loading)
fc.fullCalendar('refetchEvents');
@@ -3454,9 +3368,6 @@ function rcube_calendar_ui(settings)
if (this.search_request && !fc.fullCalendar('clientEvents').length) {
this._search_message = rcmail.display_message(rcmail.gettext('searchnoresults', 'calendar'), 'notice');
}
-
- if (this.fisheye_date)
- this.fisheye_view(this.fisheye_date);
};
// adjust calendar view size
@@ -3926,8 +3837,8 @@ function rcube_calendar_ui(settings)
// select monday of the chosen calendar week
var day_off = base_date.getDay() - me.datepicker_settings.firstDay,
date = new Date(base_date.getTime() - day_off * DAY_MS + wdiff * 7 * DAY_MS);
- fc.fullCalendar('gotoDate', date)
- fc.fullCalendar('changeView', 'agendaWeek');
+
+ fc.fullCalendar('changeView', 'agendaWeek', date);
minical.datepicker('setDate', date);
setTimeout(function() { pretty_select($('select', minical)); }, 25);
}
@@ -4145,14 +4056,7 @@ function rcube_calendar_ui(settings)
fc.fullCalendar('changeView', 'list');
// TODO: save new settings in prefs
}).val(settings.agenda_range);
-/*
- $('#agenda-listsections').change(function(e){
- settings.agenda_sections = $(this).val();
- fc.fullCalendar('option', 'listSections', settings.agenda_sections);
- fc.fullCalendar('changeView', 'list');
- // TODO: save new settings in prefs
- }).val(fc.fullCalendar('option', 'listSections'));
-*/
+
// hide event dialog when clicking somewhere into document
$(document).bind('mousedown', dialog_check);
diff --git a/plugins/calendar/lib/calendar_ui.php b/plugins/calendar/lib/calendar_ui.php
index 8be700c4..7a534d5e 100644
--- a/plugins/calendar/lib/calendar_ui.php
+++ b/plugins/calendar/lib/calendar_ui.php
@@ -368,18 +368,7 @@ class calendar_ui
html::span('input-group-text', $this->cal->gettext('listrange')))
. $select_range->show($this->rc->config->get('calendar_agenda_range', $this->cal->defaults['calendar_agenda_range']))
);
-/*
- $select_sections = new html_select(array('name' => 'listsections', 'id' => 'agenda-listsections', 'class' => 'form-control custom-select'));
- $select_sections->add('---', '');
- foreach (array('day' => 'libcalendaring.days', 'week' => 'libcalendaring.weeks', 'month' => 'libcalendaring.months', 'smart' => 'calendar.smartsections') as $val => $label)
- $select_sections->add(preg_replace('/\(|\)/', '', ucfirst($this->rc->gettext($label))), $val);
- $html .= html::span('input-group',
- html::label(array('for' => 'agenda-listsections', 'class' => 'input-group-prepend'),
- html::span('input-group-text', $this->cal->gettext('listsections')))
- . $select_sections->show($this->rc->config->get('calendar_agenda_sections', $this->cal->defaults['calendar_agenda_sections']))
- );
-*/
return html::div($attrib, $html);
}