Upgrade to fullCalendar 3.9.0

Squashed commit of the following:

commit cd7c726b57
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Tue Jan 22 13:52:35 2019 +0000

    Remove leftover code

    Agenda sections and fisheye view.

commit 8b2203adfc
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Tue Jan 22 12:23:11 2019 +0000

    Fix duplicated requests on using Next/Prev buttons in Agenda view

commit 2dff079625
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Tue Jan 22 11:34:16 2019 +0000

    Increase font-size for .fc-event

commit 9bb48ec3fa
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Fri Jan 18 12:10:33 2019 +0000

    Fix re-fetching updated event in quickview mode

commit 841815f5b1
Merge: ffe9c0c7 315079c8
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Fri Jan 18 11:43:19 2019 +0000

    Merge branch 'master' into dev/fullcalendar-upgrade

commit ffe9c0c7f7
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Fri Jan 18 11:41:59 2019 +0000

    Fix events re-rendering after "Print descriptions" option change

commit bc48cd6639
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Fri Jan 18 11:30:38 2019 +0000

    Fix event color on hover in print mode

commit 0776636fd6
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Fri Jan 18 10:07:41 2019 +0000

    Fix including eye.svg

commit 7cc525e4e9
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Fri Jan 18 09:50:34 2019 +0000

    Elastic support for new fullCalendar

commit 3efc8d0389
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Thu Jan 17 07:47:59 2019 +0000

    Remove now indicator on calendar print

commit a1d018875b
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Wed Jan 16 13:40:11 2019 +0100

    Calendar agenda view and printing

    Note that agenda's smart sections feature is not implemented (yet)
    as it does not exist in fullCalendar (it was a Kolab's customization).

commit ea873a9589
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Tue Jan 15 12:18:21 2019 +0100

    Calendar Agenda and searching fixes

commit fb0c3436a3
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Fri Jan 11 13:59:29 2019 +0100

    Varius calendar fixes and cleanups

commit d45f3439b9
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Wed Jan 9 13:22:24 2019 +0100

    Fix various Larry skin regressions after fullCalendar upgrade

commit 3373fff6b3
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Wed Jan 9 10:51:16 2019 +0100

    Fix .fc-today style

commit 5718fd40e3
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Wed Jan 9 10:31:22 2019 +0100

    Fix various date calculation issues after fullCalendar upgrade

    - allDay flag must be boolean
    - allDay event's end date must be exclusive

commit d08e8a8a3b
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Tue Jan 8 11:39:10 2019 +0100

    Fix date/time format issies and inconsistencies, remove confusing config

commit b0196c7ff1
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Mon Jan 7 15:46:51 2019 +0000

    Fox some small issues after fullCalendar update

commit c7b561f19d
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Mon Jan 7 13:22:57 2019 +0000

    Fix handling 'source' argument in load_events request

commit 59fc3c8168
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Mon Jan 7 12:26:04 2019 +0000

    Fix including moment.js

commit eb85d762c7
Author: Aleksander Machniak <machniak@kolabsys.com>
Date:   Fri Jan 4 16:12:33 2019 +0000

    Upgrade to fullcalendar 3.9.0 - Part I

    Just started, still many issues, no printing, no elastic, no agenda view
This commit is contained in:
Aleksander Machniak 2019-01-30 15:30:11 +01:00
parent c1f1c9daed
commit cbd1c1ae47
17 changed files with 22949 additions and 9294 deletions

View file

@ -50,7 +50,6 @@ class calendar extends rcube_plugin
'calendar_work_start' => 6, 'calendar_work_start' => 6,
'calendar_work_end' => 18, 'calendar_work_end' => 18,
'calendar_agenda_range' => 60, 'calendar_agenda_range' => 60,
'calendar_agenda_sections' => 'smart',
'calendar_event_coloring' => 0, 'calendar_event_coloring' => 0,
'calendar_time_indicator' => true, 'calendar_time_indicator' => true,
'calendar_allow_invite_shared' => false, 'calendar_allow_invite_shared' => false,
@ -296,7 +295,6 @@ class calendar extends rcube_plugin
return $calendar ?: $first; return $calendar ?: $first;
} }
/** /**
* Render the main calendar view from skin template * Render the main calendar view from skin template
*/ */
@ -304,9 +302,6 @@ class calendar extends rcube_plugin
{ {
$this->rc->output->set_pagetitle($this->gettext('calendar')); $this->rc->output->set_pagetitle($this->gettext('calendar'));
// Add CSS stylesheets to the page header
$this->ui->addCSS();
// Add JS files to the page header // Add JS files to the page header
$this->ui->addJS(); $this->ui->addJS();
@ -326,7 +321,7 @@ class calendar extends rcube_plugin
))); )));
$view = rcube_utils::get_input_value('view', rcube_utils::INPUT_GPC); $view = rcube_utils::get_input_value('view', rcube_utils::INPUT_GPC);
if (in_array($view, array('agendaWeek', 'agendaDay', 'month', 'table'))) if (in_array($view, array('agendaWeek', 'agendaDay', 'month', 'list')))
$this->rc->output->set_env('view', $view); $this->rc->output->set_env('view', $view);
if ($date = rcube_utils::get_input_value('date', rcube_utils::INPUT_GPC)) if ($date = rcube_utils::get_input_value('date', rcube_utils::INPUT_GPC))
@ -378,14 +373,15 @@ class calendar extends rcube_plugin
} }
$field_id = 'rcmfd_default_view'; $field_id = 'rcmfd_default_view';
$view = $this->rc->config->get('calendar_default_view', $this->defaults['calendar_default_view']);
$select = new html_select(array('name' => '_default_view', 'id' => $field_id)); $select = new html_select(array('name' => '_default_view', 'id' => $field_id));
$select->add($this->gettext('day'), "agendaDay"); $select->add($this->gettext('day'), "agendaDay");
$select->add($this->gettext('week'), "agendaWeek"); $select->add($this->gettext('week'), "agendaWeek");
$select->add($this->gettext('month'), "month"); $select->add($this->gettext('month'), "month");
$select->add($this->gettext('agenda'), "table"); $select->add($this->gettext('agenda'), "list");
$p['blocks']['view']['options']['default_view'] = array( $p['blocks']['view']['options']['default_view'] = array(
'title' => html::label($field_id, rcube::Q($this->gettext('default_view'))), 'title' => html::label($field_id, rcube::Q($this->gettext('default_view'))),
'content' => $select->show($this->rc->config->get('calendar_default_view', $this->defaults['calendar_default_view'])), 'content' => $select->show($view == 'table' ? 'list' : $view),
); );
} }
@ -1323,12 +1319,21 @@ class calendar extends rcube_plugin
*/ */
function load_events() function load_events()
{ {
$events = $this->driver->load_events( $start = rcube_utils::get_input_value('start', rcube_utils::INPUT_GET);
rcube_utils::get_input_value('start', rcube_utils::INPUT_GET), $end = rcube_utils::get_input_value('end', rcube_utils::INPUT_GET);
rcube_utils::get_input_value('end', rcube_utils::INPUT_GET), $query = rcube_utils::get_input_value('q', rcube_utils::INPUT_GET);
($query = rcube_utils::get_input_value('q', rcube_utils::INPUT_GET)), $source = rcube_utils::get_input_value('source', rcube_utils::INPUT_GET);
rcube_utils::get_input_value('source', rcube_utils::INPUT_GET)
); if (!is_numeric($start) || strpos($start, 'T')) {
$start = new DateTime($start, $this->timezone);
$start = $start->getTimestamp();
}
if (!is_numeric($end) || strpos($end, 'T')) {
$end = new DateTime($end, $this->timezone);
$end = $end->getTimestamp();
}
$events = $this->driver->load_events($start, $end, $query, $source);
echo $this->encode($events, !empty($query)); echo $this->encode($events, !empty($query));
exit; exit;
} }
@ -1767,15 +1772,12 @@ class calendar extends rcube_plugin
// configuration // configuration
$settings['default_calendar'] = $this->rc->config->get('calendar_default_calendar'); $settings['default_calendar'] = $this->rc->config->get('calendar_default_calendar');
$settings['default_view'] = (string)$this->rc->config->get('calendar_default_view', $this->defaults['calendar_default_view']); $settings['default_view'] = (string)$this->rc->config->get('calendar_default_view', $this->defaults['calendar_default_view']);
$settings['date_agenda'] = (string)$this->rc->config->get('calendar_date_agenda', $this->defaults['calendar_date_agenda']);
$settings['timeslots'] = (int)$this->rc->config->get('calendar_timeslots', $this->defaults['calendar_timeslots']); $settings['timeslots'] = (int)$this->rc->config->get('calendar_timeslots', $this->defaults['calendar_timeslots']);
$settings['first_day'] = (int)$this->rc->config->get('calendar_first_day', $this->defaults['calendar_first_day']); $settings['first_day'] = (int)$this->rc->config->get('calendar_first_day', $this->defaults['calendar_first_day']);
$settings['first_hour'] = (int)$this->rc->config->get('calendar_first_hour', $this->defaults['calendar_first_hour']); $settings['first_hour'] = (int)$this->rc->config->get('calendar_first_hour', $this->defaults['calendar_first_hour']);
$settings['work_start'] = (int)$this->rc->config->get('calendar_work_start', $this->defaults['calendar_work_start']); $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['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_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['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['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']); $settings['invite_shared'] = (int)$this->rc->config->get('calendar_allow_invite_shared', $this->defaults['calendar_allow_invite_shared']);
@ -1889,24 +1891,35 @@ class calendar extends rcube_plugin
$event['description'] = trim($h2t->get_text()); $event['description'] = trim($h2t->get_text());
} }
// mapping url => vurl because of the fullcalendar client script // mapping url => vurl, allday => allDay because of the fullcalendar client script
$event['vurl'] = $event['url']; $event['vurl'] = $event['url'];
$event['allDay'] = !empty($event['allday']);
unset($event['url']); unset($event['url']);
unset($event['allday']);
$event['className'] = $event['className'] ? explode(' ', $event['className']) : array();
if ($addcss) {
$event['className'][] = 'fc-event-cal-' . asciiwords($event['calendar'], true);
}
if ($event['allDay']) {
$event['end'] = $event['end']->add(new DateInterval('P1D'));
}
if ($_GET['mode'] == 'print') {
$event['editable'] = false;
}
return array( return array(
'_id' => $event['calendar'] . ':' . $event['id'], // unique identifier for fullcalendar '_id' => $event['calendar'] . ':' . $event['id'], // unique identifier for fullcalendar
'start' => $this->lib->adjust_timezone($event['start'], $event['allday'])->format('c'), 'start' => $this->lib->adjust_timezone($event['start'], $event['allDay'])->format('c'),
'end' => $this->lib->adjust_timezone($event['end'], $event['allday'])->format('c'), 'end' => $this->lib->adjust_timezone($event['end'], $event['allDay'])->format('c'),
// 'changed' might be empty for event recurrences (Bug #2185) // 'changed' might be empty for event recurrences (Bug #2185)
'changed' => $event['changed'] ? $this->lib->adjust_timezone($event['changed'])->format('c') : null, 'changed' => $event['changed'] ? $this->lib->adjust_timezone($event['changed'])->format('c') : null,
'created' => $event['created'] ? $this->lib->adjust_timezone($event['created'])->format('c') : null, 'created' => $event['created'] ? $this->lib->adjust_timezone($event['created'])->format('c') : null,
'title' => strval($event['title']), 'title' => strval($event['title']),
'description' => strval($event['description']), 'description' => strval($event['description']),
'location' => strval($event['location']), 'location' => strval($event['location']),
'className' => ($addcss ? 'fc-event-cal-'.asciiwords($event['calendar'], true).' ' : '') .
'fc-event-cat-' . asciiwords(strtolower(join('-', (array)$event['categories'])), true) .
rtrim(' ' . $event['className']),
'allDay' => ($event['allday'] == 1),
) + $event; ) + $event;
} }
@ -2056,7 +2069,8 @@ class calendar extends rcube_plugin
// convert dates into DateTime objects in user's current timezone // convert dates into DateTime objects in user's current timezone
$event['start'] = new DateTime($event['start'], $this->timezone); $event['start'] = new DateTime($event['start'], $this->timezone);
$event['end'] = new DateTime($event['end'], $this->timezone); $event['end'] = new DateTime($event['end'], $this->timezone);
$event['allday'] = (bool)$event['allday']; $event['allday'] = !empty($event['allDay']);
unset($event['allDay']);
// start/end is all we need for 'move' action (#1480) // start/end is all we need for 'move' action (#1480)
if ($action == 'move') { if ($action == 'move') {
@ -2410,10 +2424,10 @@ class calendar extends rcube_plugin
$title = $this->gettext('print'); $title = $this->gettext('print');
$view = rcube_utils::get_input_value('view', rcube_utils::INPUT_GPC); $view = rcube_utils::get_input_value('view', rcube_utils::INPUT_GPC);
if (!in_array($view, array('agendaWeek', 'agendaDay', 'month', 'table'))) if (!in_array($view, array('agendaWeek', 'agendaDay', 'month', 'list')))
$view = 'agendaDay'; $view = 'agendaDay';
$this->rc->output->set_env('view',$view); $this->rc->output->set_env('view', $view);
if ($date = rcube_utils::get_input_value('date', rcube_utils::INPUT_GPC)) if ($date = rcube_utils::get_input_value('date', rcube_utils::INPUT_GPC))
$this->rc->output->set_env('date', $date); $this->rc->output->set_env('date', $date);
@ -2421,28 +2435,19 @@ class calendar extends rcube_plugin
if ($range = rcube_utils::get_input_value('range', rcube_utils::INPUT_GPC)) if ($range = rcube_utils::get_input_value('range', rcube_utils::INPUT_GPC))
$this->rc->output->set_env('listRange', intval($range)); $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)) { if ($search = rcube_utils::get_input_value('search', rcube_utils::INPUT_GPC)) {
$this->rc->output->set_env('search', $search); $this->rc->output->set_env('search', $search);
$title .= ' "' . $search . '"'; $title .= ' "' . $search . '"';
} }
// Add CSS stylesheets to the page header // Add JS to the page
$skin_path = $this->local_skin_path(); $this->ui->addJS();
$this->include_stylesheet($skin_path . '/fullcalendar.css');
$this->include_stylesheet($skin_path . '/print.css');
// Add JS files to the page header
$this->include_script('print.js');
$this->include_script('lib/js/fullcalendar.js');
$this->register_handler('plugin.calendar_css', array($this->ui, 'calendar_css')); $this->register_handler('plugin.calendar_css', array($this->ui, 'calendar_css'));
$this->register_handler('plugin.calendar_list', array($this->ui, 'calendar_list')); $this->register_handler('plugin.calendar_list', array($this->ui, 'calendar_list'));
$this->rc->output->set_pagetitle($title); $this->rc->output->set_pagetitle($title);
$this->rc->output->send("calendar.print"); $this->rc->output->send('calendar.print');
} }
/** /**

File diff suppressed because it is too large Load diff

View file

@ -34,33 +34,6 @@ $config['calendar_default_view'] = "agendaWeek";
// show a birthdays calendar from the user's address book(s) // show a birthdays calendar from the user's address book(s)
$config['calendar_contact_birthdays'] = false; $config['calendar_contact_birthdays'] = false;
// mapping of Roundcube date formats to calendar formats (long/short/agenda)
// should be in sync with 'date_formats' in main config
$config['calendar_date_format_sets'] = array(
'yyyy-MM-dd' => array('MMM d yyyy', 'M-d', 'ddd MM-dd'),
'dd-MM-yyyy' => array('d MMM yyyy', 'd-M', 'ddd dd-MM'),
'yyyy/MM/dd' => array('MMM d yyyy', 'M/d', 'ddd MM/dd'),
'MM/dd/yyyy' => array('MMM d yyyy', 'M/d', 'ddd MM/dd'),
'dd/MM/yyyy' => array('d MMM yyyy', 'd/M', 'ddd dd/MM'),
'dd.MM.yyyy' => array('dd. MMM yyyy', 'd.M', 'ddd dd.MM.'),
'd.M.yyyy' => array('d. MMM yyyy', 'd.M', 'ddd d.MM.'),
);
// general date format (only set if different from default date format and not user configurable)
// $config['calendar_date_format'] = "yyyy-MM-dd";
// time format (only set if different from default date format)
// $config['calendar_time_format'] = "HH:mm";
// short date format (used for column titles)
// $config['calendar_date_short'] = 'M-d';
// long date format (used for calendar title)
// $config['calendar_date_long'] = 'MMM d yyyy';
// date format used for agenda view
// $config['calendar_date_agenda'] = 'ddd MM-dd';
// timeslots per hour (1, 2, 3, 4, 6) // timeslots per hour (1, 2, 3, 4, 6)
$config['calendar_timeslots'] = 2; $config['calendar_timeslots'] = 2;

View file

@ -60,8 +60,7 @@ class calendar_ui
$this->cal->include_script('calendar_base.js'); $this->cal->include_script('calendar_base.js');
} }
$skin_path = $this->cal->local_skin_path(); $this->addCSS();
$this->cal->include_stylesheet($skin_path . '/calendar.css');
$this->ready = true; $this->ready = true;
} }
@ -109,7 +108,17 @@ class calendar_ui
public function addCSS() public function addCSS()
{ {
$skin_path = $this->cal->local_skin_path(); $skin_path = $this->cal->local_skin_path();
$this->cal->include_stylesheet($skin_path . '/fullcalendar.css');
if ($this->rc->task == 'calendar' && (!$this->rc->action || in_array($this->rc->action, array('index', 'print')))) {
// Include fullCalendar style before skin file for simpler style overriding
$this->cal->include_stylesheet($skin_path . '/fullcalendar.css');
}
$this->cal->include_stylesheet($skin_path . '/calendar.css');
if ($this->rc->task == 'calendar' && $this->rc->action == 'print') {
$this->cal->include_stylesheet($skin_path . '/print.css');
}
} }
/** /**
@ -117,12 +126,18 @@ class calendar_ui
*/ */
public function addJS() public function addJS()
{ {
$this->cal->include_script('calendar_ui.js'); $this->cal->include_script('lib/js/moment.js');
$this->cal->include_script('lib/js/fullcalendar.js'); $this->cal->include_script('lib/js/fullcalendar.js');
$this->rc->output->include_script('treelist.js');
$this->cal->api->include_script('libkolab/libkolab.js');
jqueryui::miniColors(); if ($this->rc->task == 'calendar' && $this->rc->action == 'print') {
$this->cal->include_script('print.js');
}
else {
$this->rc->output->include_script('treelist.js');
$this->cal->api->include_script('libkolab/libkolab.js');
$this->cal->include_script('calendar_ui.js');
jqueryui::miniColors();
}
} }
/** /**
@ -354,17 +369,6 @@ class calendar_ui
. $select_range->show($this->rc->config->get('calendar_agenda_range', $this->cal->defaults['calendar_agenda_range'])) . $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); return html::div($attrib, $html);
} }

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -37,12 +37,13 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
var rc_loading; var rc_loading;
var showdesc = true; var showdesc = true;
var desc_elements = {};
var settings = $.extend(rcmail.env.calendar_settings, rcmail.env.libcal_settings); var settings = $.extend(rcmail.env.calendar_settings, rcmail.env.libcal_settings);
// create list of event sources AKA calendars // create list of event sources AKA calendars
var src, event_sources = []; var id, src, event_sources = [];
var add_url = (rcmail.env.search ? '&q='+escape(rcmail.env.search) : ''); var add_url = '&mode=print' + (rcmail.env.search ? '&q='+escape(rcmail.env.search) : '');
for (var id in rcmail.env.calendars) { for (id in rcmail.env.calendars) {
if (!rcmail.env.calendars[id].active) if (!rcmail.env.calendars[id].active)
continue; continue;
@ -54,6 +55,9 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
source.color = '#' + source.color.replace(/^#/, ''); source.color = '#' + source.color.replace(/^#/, '');
if (source.color == '#ffffff')
source.color = '#ccc';
event_sources.push(source); event_sources.push(source);
} }
@ -66,72 +70,89 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
header: { header: {
left: '', left: '',
center: 'title', center: 'title',
right: 'agendaDay,agendaWeek,month,table' right: 'agendaDay,agendaWeek,month,list'
}, },
theme: false,
aspectRatio: 0.85, aspectRatio: 0.85,
ignoreTimezone: true, // will treat the given date strings as in local (browser's) timezone selectable: false,
date: viewdate.getDate(), editable: false,
month: viewdate.getMonth(), timezone: false, // will treat the given date strings as in local (browser's) timezone
year: viewdate.getFullYear(), monthNames: settings.months,
monthNamesShort: settings.months_short,
dayNames: settings.days,
dayNamesShort: settings.days_short,
weekNumbers: settings.show_weekno > 0,
weekNumberTitle: rcmail.gettext('weekshort', 'calendar') + ' ',
firstDay: settings.first_day,
firstHour: settings.first_hour,
slotDuration: {minutes: 60/settings.timeslots},
businessHours: {
start: settings.work_start + ':00',
end: settings.work_end + ':00'
},
views: {
list: {
titleFormat: settings.dates_long,
listDayFormat: settings.date_long,
visibleRange: function(currentDate) {
return {
start: currentDate.clone(),
end: currentDate.clone().add(settings.agenda_range, 'days')
}
}
},
month: {
columnFormat: 'ddd', // Mon
titleFormat: 'MMMM YYYY',
eventLimit: 10
},
week: {
columnFormat: 'ddd ' + settings.date_short, // Mon 9/7
titleFormat: settings.dates_long
},
day: {
columnFormat: 'dddd ' + settings.date_short, // Monday 9/7
titleFormat: 'dddd ' + settings.date_long
}
},
timeFormat: settings.time_format,
slotLabelFormat: settings.time_format,
allDayText: rcmail.gettext('all-day', 'calendar'),
defaultDate: viewdate,
defaultView: rcmail.env.view, defaultView: rcmail.env.view,
eventSources: event_sources, eventSources: event_sources,
monthNames : settings['months'],
monthNamesShort : settings['months_short'],
dayNames : settings['days'],
dayNamesShort : settings['days_short'],
firstDay : settings['first_day'],
firstHour : settings['first_hour'],
slotMinutes : 60/settings['timeslots'],
timeFormat: {
'': settings['time_format'],
agenda: settings['time_format'] + '{ - ' + settings['time_format'] + '}',
list: settings['time_format'] + '{ - ' + settings['time_format'] + '}',
table: settings['time_format'] + '{ - ' + settings['time_format'] + '}'
},
axisFormat : settings['time_format'],
columnFormat: {
month: 'ddd', // Mon
week: 'ddd ' + settings['date_short'], // Mon 9/7
day: 'dddd ' + settings['date_short'], // Monday 9/7
list: settings['date_agenda'],
table: settings['date_agenda']
},
titleFormat: {
month: 'MMMM yyyy',
week: settings['dates_long'],
day: 'dddd ' + settings['date_long'],
list: settings['dates_long'],
table: settings['dates_long']
},
listSections: rcmail.env.listSections !== undefined ? rcmail.env.listSections : settings['agenda_sections'],
listRange: rcmail.env.listRange || settings['agenda_range'],
tableCols: ['handle', 'date', 'time', 'title', 'location'],
allDayText: rcmail.gettext('all-day', 'calendar'),
buttonText: { buttonText: {
today: settings['today'],
day: rcmail.gettext('day', 'calendar'), day: rcmail.gettext('day', 'calendar'),
week: rcmail.gettext('week', 'calendar'), week: rcmail.gettext('week', 'calendar'),
month: rcmail.gettext('month', 'calendar'), month: rcmail.gettext('month', 'calendar'),
table: rcmail.gettext('agenda', 'calendar') list: rcmail.gettext('agenda', 'calendar')
}, },
listTexts: { buttonIcons: {
until: rcmail.gettext('until', 'calendar'), prev: 'left-single-arrow',
past: rcmail.gettext('pastevents', 'calendar'), next: 'right-single-arrow'
today: rcmail.gettext('today', 'calendar'), },
tomorrow: rcmail.gettext('tomorrow', 'calendar'), eventLimitText: function(num) {
thisWeek: rcmail.gettext('thisweek', 'calendar'), return rcmail.gettext('andnmore', 'calendar').replace('$nr', num);
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')
}, },
loading: function(isLoading) { loading: function(isLoading) {
rc_loading = rcmail.set_busy(isLoading, 'loading', rc_loading); rc_loading = rcmail.set_busy(isLoading, 'loading', rc_loading);
}, },
// event rendering // event rendering
eventRender: function(event, element, view) { eventRender: function(event, element, view) {
if (view.name != 'month' && view.name != 'table') { if (view.name == 'list') {
var cont = element.find('.fc-event-title'); var loc = $('<td>').attr('class', 'fc-event-location');
if (event.location)
loc.text(event.location);
element.find('.fc-list-item-title').after(loc);
// we can't add HTML elements after the curent element,
// so we store it for later. One description per event
if (event.description && showdesc && !desc_elements[event.uid])
desc_elements[event.uid] = {element: element[0], description: event.description};
}
else if (view.name != 'month') {
var cont = element.find('div.fc-title');
if (event.location) { if (event.location) {
cont.after('<div class="fc-event-location">@&nbsp;' + Q(event.location) + '</div>'); cont.after('<div class="fc-event-location">@&nbsp;' + Q(event.location) + '</div>');
cont = cont.next(); cont = cont.next();
@ -139,47 +160,35 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
if (event.description && showdesc) { if (event.description && showdesc) {
cont.after('<div class="fc-event-description">' + Q(event.description) + '</div>'); cont.after('<div class="fc-event-description">' + Q(event.description) + '</div>');
} }
/* TODO: create icons black on white
if (event.recurrence)
element.find('.fc-event-time').append('<i class="fc-icon-recurring"></i>');
if (event.alarms)
element.find('.fc-event-time').append('<i class="fc-icon-alarms"></i>');
*/
}
if (view.name == 'table' && event.description && showdesc) {
var cols = element.children().css('border', 0).length;
element.after('<tr class="fc-event-row-secondary fc-event"><td colspan="'+cols+'" class="fc-event-description">' + Q(event.description) + '</td></tr>');
} }
}, },
viewDisplay: function(view) { eventAfterAllRender: function(view) {
// remove hard-coded hight and make contents visible if (view.name == 'list') {
window.setTimeout(function(){ // Fix colspan of headers after we added Location column
if (view.name == 'table') { fc.find('tr.fc-list-heading > td').attr('colspan', 4);
$('div.fc-list-content').css('overflow', 'visible').height('auto');
} $.each(desc_elements, function() {
else { $(this.element).after('<tr class="fc-event-row-secondary fc-list-item"><td colspan="2"></td><td colspan="2" class="fc-event-description">' + Q(this.description) + '</td></tr>');
$('div.fc-agenda-divider') });
.next().css('overflow', 'visible').height('auto') }
.children('div').css('overflow', 'visible').height('auto'); },
} viewRender: function(view) {
// adjust fixed height if vertical day slots desc_elements = {};
var h = $('table.fc-agenda-slots:visible').height() + $('table.fc-agenda-allday:visible').height() + 4;
if (h) $('table.fc-agenda-days td.fc-widget-content').children('div').height(h);
}, 20);
} }
}); });
// activate settings form // activate settings form
$('#propdescription').change(function(){ $('#propdescription').change(function() {
showdesc = this.checked; showdesc = this.checked;
fc.fullCalendar('render'); desc_elements = {};
fc.fullCalendar('rerenderEvents');
}); });
var selector = $('#calendar').data('view-selector'); var selector = $('#calendar').data('view-selector');
if (selector) { if (selector) {
selector = $('#' + selector); selector = $('#' + selector);
$('.fc-header-right > span').each(function() { $('.fc-right button').each(function() {
var cl = 'btn btn-secondary', btn = $(this); var cl = 'btn btn-secondary', btn = $(this);
if (btn.is('.fc-state-active')) { if (btn.is('.fc-state-active')) {

View file

@ -1581,12 +1581,9 @@ a.dropdown-link:after {
bottom: -1px; bottom: -1px;
} }
#resource-freebusy-calendar .fc-content { #resource-freebusy-calendar .fc-toolbar {
top: 0; height: 0;
} margin: 0;
#resource-freebusy-calendar .fc-content .fc-event-bg {
background: 0;
} }
#resource-freebusy-calendar .fc-event.status-busy, #resource-freebusy-calendar .fc-event.status-busy,
@ -1615,8 +1612,7 @@ a.dropdown-link:after {
#resourcesearchbox { #resourcesearchbox {
width: 100%; width: 100%;
height: 26px; height: 26px;
-moz-box-sizing: border-box; box-sizing: border-box;
box-sizing: border-box;
} }
#resourcequicksearch .iconbutton.searchoptions { #resourcequicksearch .iconbutton.searchoptions {
@ -1633,33 +1629,22 @@ a.dropdown-link:after {
} }
/* fullcalendar style overrides */ /* fullcalendar style overrides */
.rcube-fc-content { .calendarmain .fc-body,
overflow: hidden; .fc-scroller {
border: 0;
border-radius: 4px;
}
.calendarmain .fc-content {
position: absolute !important;
top: 40px;
left: 0;
right: 0;
bottom: 0;
background: #fff; background: #fff;
} }
.calendarmain.quickview-active .fc-content { .calendarmain.quickview-active .fc-view .fc-scroller {
background-image: url('images/focusview.png'); background-image: url('images/focusview.png');
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
#fish-eye-view .fc-content { .fc-unthemed .fc-list-heading td {
top: 2px; background: rgba(0, 0, 0, .05);
bottom: 2px; padding: 8px;
} }
#quickview-calendar { #quickview-calendar {
@ -1676,9 +1661,9 @@ a.dropdown-link:after {
.calendarmain #calendar .fc-button, .calendarmain #calendar .fc-button,
.calendarmain #calendar .fc-button.fc-state-default, .calendarmain #calendar .fc-button.fc-state-default,
.calendarmain #calendar .fc-button.fc-state-hover { .calendarmain #calendar .fc-button.fc-state-hover {
margin: -2px 0 0 0; margin-top: -2px;
height: 24px; height: 26px;
line-height: 24px; line-height: 26px;
color: #333; color: #333;
border: 1px solid #ababab; border: 1px solid #ababab;
background: #f1f1f1; background: #f1f1f1;
@ -1704,15 +1689,12 @@ a.dropdown-link:after {
margin-right: 0; margin-right: 0;
} }
.calendarmain #calendar .fc-header-left .fc-button { .calendarmain #calendar .fc-left .fc-button {
display: inline-block;
margin: 0;
text-align: center;
font-size: 10px; font-size: 10px;
color: #555; color: #555;
min-width: 50px; min-width: 50px;
max-width: 75px; max-width: 75px;
height: 13px; height: 40px;
line-height: 1em; line-height: 1em;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -1723,89 +1705,91 @@ a.dropdown-link:after {
border: 0; border: 0;
background: url(images/toolbar.png) center 100px no-repeat; background: url(images/toolbar.png) center 100px no-repeat;
box-shadow: none; box-shadow: none;
-o-box-shadow: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
outline: none; outline: none;
transition: none;
} }
.calendarmain #calendar .fc-header-left .fc-button:focus { .calendarmain #calendar .fc-left .fc-button:focus {
color: #fff; color: #fff;
text-shadow: 0px 1px 1px #666; text-shadow: 0px 1px 1px #666;
background-color: rgba(30,150,192, 0.5); background-color: rgba(30,150,192, 0.5);
border-radius: 3px; border-radius: 3px;
} }
.calendarmain #calendar .fc-header-left .fc-button.fc-state-active { .calendarmain #calendar .fc-left .fc-button::-moz-focus-inner {
border: 0;
}
.calendarmain #calendar .fc-left .fc-button.fc-state-active {
font-weight: bold; font-weight: bold;
color: #222; color: #222;
text-shadow: none; text-shadow: none;
background-color: transparent; background-color: transparent;
} }
.calendarmain #calendar .fc-header-left .fc-button-agendaDay { .calendarmain #calendar .fc-left .fc-agendaDay-button {
background-position: center -120px; background-position: center -120px;
} }
.calendarmain #calendar .fc-header-left .fc-button-agendaDay.fc-state-active { .calendarmain #calendar .fc-left .fc-agendaDay-button.fc-state-active {
background-position: center -160px; background-position: center -160px;
} }
.calendarmain #calendar .fc-header-left .fc-button-agendaWeek { .calendarmain #calendar .fc-left .fc-agendaWeek-button {
background-position: center -200px; background-position: center -200px;
} }
.calendarmain #calendar .fc-header-left .fc-button-agendaWeek.fc-state-active { .calendarmain #calendar .fc-left .fc-agendaWeek-button.fc-state-active {
background-position: center -240px; background-position: center -240px;
} }
.calendarmain #calendar .fc-header-left .fc-button-month { .calendarmain #calendar .fc-left .fc-month-button {
background-position: center -280px; background-position: center -280px;
} }
.calendarmain #calendar .fc-header-left .fc-button-month.fc-state-active { .calendarmain #calendar .fc-left .fc-month-button.fc-state-active {
background-position: center -320px; background-position: center -320px;
} }
.calendarmain #calendar .fc-header-left .fc-button-table { .calendarmain #calendar .fc-left .fc-list-button {
background-position: center -360px; background-position: center -360px;
} }
.calendarmain #calendar .fc-header-left .fc-button-table.fc-state-active { .calendarmain #calendar .fc-left .fc-list-button.fc-state-active {
background-position: center -400px; background-position: center -400px;
} }
.calendarmain #calendar .fc-header-right { .calendarmain #calendar .fc-header-toolbar .fc-right {
padding-right: 252px;
padding-top: 4px; padding-top: 4px;
} }
.calendarmain #calendar .fc-header-toolbar .fc-center {
line-height: 2.5em;
overflow: hidden;
text-align: center;
display: block;
}
.calendarmain #calendar .fc-header-toolbar .fc-center h2 {
float: none;
}
.calendarmain #calendar .fc-header-title { .calendarmain #calendar .fc-header-title {
padding-top: 5px; padding-top: 5px;
} }
.calendarmain #calendar .fc-toolbar.fc-header-toolbar {
margin-bottom: 7px;
margin-right: 250px;
}
.fc-event { .fc-event {
font-size: 1em !important; font-size: 1em !important;
} }
.fc-event-hori.fc-type-freebusy, .fc-event.fc-type-freebusy,
.fc-event-vert.fc-type-freebusy { .fc-event.fc-type-freebusy {
opacity: 0.60; opacity: 0.60;
/*
color: #fff !important;
background: rgba(80,80,80,0.85) !important;
background: -moz-linear-gradient(top, rgba(80,80,80,0.85) 0%, rgba(48,48,48,0.9) 100%) !important;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(80,80,80,0.85)), color-stop(100%,rgba(48,48,48,0.9))) !important;
background: -webkit-linear-gradient(top, rgba(80,80,80,0.85) 0%, rgba(48,48,48,0.85) 100%) !important;
background: -o-linear-gradient(top, rgba(80,80,80,0.85) 0%, rgba(48,48,48,0.85) 100%) !important;
background: -ms-linear-gradient(top, rgba(80,80,80,0.85) 0%, rgba(48,48,48,0.85) 100%) !important;
background: linear-gradient(to bottom, rgba(80,80,80,0.85) 0%, rgba(48,48,48,0.85) 100%) !important;
border-color: #444 !important;
cursor: default !important;
*/
-moz-box-shadow: inset 0px 1px 0 0px #888;
-webkit-box-shadow: inset 0px 1px 0 0px #888;
-o-box-shadow: inset 0px 1px 0 0px #888;
box-shadow: inset 0px 1px 0 0px #888; box-shadow: inset 0px 1px 0 0px #888;
} }
@ -1813,93 +1797,88 @@ a.dropdown-link:after {
color: #999; color: #999;
} }
.fc-event-hori.fc-type-freebusy .fc-event-skin, .fc-event.fc-type-freebusy .fc-title,
.fc-event-hori.fc-type-freebusy .fc-event-inner, .fc-event.fc-type-freebusy .fc-title {
.fc-event-vert.fc-type-freebusy .fc-event-skin,
.fc-event-vert.fc-type-freebusy .fc-event-inner {
/*
background-color: transparent !important;
border-color: #444 !important;
color: #fff !important;
text-shadow: 0 1px 1px #000;
*/
}
.fc-event-hori.fc-type-freebusy .fc-event-title,
.fc-event-vert.fc-type-freebusy .fc-event-title {
position: absolute; position: absolute;
top: -5000px; top: -5000px;
} }
.fc-event-vert.fc-invitation-needs-action, .fc-event.fc-invitation-needs-action,
.fc-event-hori.fc-invitation-needs-action { .fc-event.fc-invitation-needs-action {
border: 1px dashed #5757c7 !important; border: 1px dashed #5757c7 !important;
} }
.fc-event-vert.fc-invitation-tentative, .fc-event.fc-invitation-tentative,
.fc-event-hori.fc-invitation-tentative { .fc-event.fc-invitation-tentative {
border: 1px dashed #eb8900 !important; border: 1px dashed #eb8900 !important;
} }
.fc-event-vert.fc-invitation-declined, .fc-event.fc-invitation-declined,
.fc-event-hori.fc-invitation-declined { .fc-event.fc-invitation-declined {
border: 1px dashed #c00 !important; border: 1px dashed #c00 !important;
} }
.fc-event-vert.fc-event-ns-other.fc-invitation-declined, .fc-event.fc-event-ns-other.fc-invitation-declined,
.fc-event-hori.fc-event-ns-other.fc-invitation-declined { .fc-event.fc-event-ns-other.fc-invitation-declined {
opacity: 0.7; opacity: 0.7;
} }
.fc-event-ns-other.fc-invitation-declined .fc-event-title { .fc-event-ns-other.fc-invitation-declined .fc-title {
text-decoration: line-through; text-decoration: line-through;
} }
.fc-event-vert.fc-invitation-tentative .fc-event-head, .fc-event .fc-bg {
.fc-event-vert.fc-invitation-declined .fc-event-head, opacity: 1;
.fc-event-vert.fc-invitation-needs-action .fc-event-head { background: unset;
/* background-color: transparent !important; */ margin-top: 14px;
cursor: pointer;
} }
.fc-event-vert.fc-invitation-tentative .fc-event-bg { .fc-event.fc-invitation-tentative .fc-bg {
background: url(data:image/gif;base64,R0lGODlhCAAIAPABAOuJAP///yH/C1hNUCBEYXRhWE1QAT8AIfkEBQAAAQAsAAAAAAgACAAAAg4Egmipx+ZaDPCtVPFNBQA7) 0 0 repeat #fff; background: url(data:image/gif;base64,R0lGODlhCAAIAPABAOuJAP///yH/C1hNUCBEYXRhWE1QAT8AIfkEBQAAAQAsAAAAAAgACAAAAg4Egmipx+ZaDPCtVPFNBQA7) 0 0 repeat #fff;
opacity: .25;
} }
.fc-event-vert.fc-invitation-needs-action .fc-event-bg { .fc-event.fc-invitation-needs-action .fc-bg {
background: url(data:image/gif;base64,R0lGODlhCAAIAPABAFdXx////yH/C1hNUCBEYXRhWE1QAT8AIfkEBQAAAQAsAAAAAAgACAAAAg4Egmipx+ZaDPCtVPFNBQA7) 0 0 repeat #fff; background: url(data:image/gif;base64,R0lGODlhCAAIAPABAFdXx////yH/C1hNUCBEYXRhWE1QAT8AIfkEBQAAAQAsAAAAAAgACAAAAg4Egmipx+ZaDPCtVPFNBQA7) 0 0 repeat #fff;
opacity: .25;
} }
.fc-event-vert.fc-invitation-declined .fc-event-bg { .fc-event.fc-invitation-declined .fc-bg {
background: url(data:image/gif;base64,R0lGODlhCAAIAPABAMwAAP///yH/C1hNUCBEYXRhWE1QAT8AIfkEBQAAAQAsAAAAAAgACAAAAg4Egmipx+ZaDPCtVPFNBQA7) 0 0 repeat #fff; background: url(data:image/gif;base64,R0lGODlhCAAIAPABAMwAAP///yH/C1hNUCBEYXRhWE1QAT8AIfkEBQAAAQAsAAAAAAgACAAAAg4Egmipx+ZaDPCtVPFNBQA7) 0 0 repeat #fff;
opacity: .25;
} }
.fc-view-table tr.fc-invitation-tentative td, .fc-list-view {
.fc-view-table tr.fc-invitation-declined td, border-bottom: 0;
.fc-view-table tr.fc-invitation-needs-action td { }
.fc-title,
.fc-list-item-title {
font-weight: bold;
}
.fc-list-table tr.fc-invitation-tentative td,
.fc-list-table tr.fc-invitation-declined td,
.fc-list-table tr.fc-invitation-needs-action td {
color: #888; color: #888;
} }
.fc-view-table tr.fc-invitation-tentative td.fc-event-title, .fc-list-table tr.fc-invitation-tentative td.fc-list-item-title,
.fc-view-table tr.fc-invitation-declined td.fc-event-title, .fc-list-table tr.fc-invitation-declined td.fc-list-item-title,
.fc-view-table tr.fc-invitation-needs-action td.fc-event-title { .fc-list-table tr.fc-invitation-needs-action td.fc-list-item-title {
font-weight: normal; font-weight: normal;
} }
#quickview-calendar .fc-view-table tr.fc-invitation-tentative td, #quickview-calendar .fc-list-table tr.fc-invitation-tentative td,
#quickview-calendar .fc-view-table tr.fc-invitation-declined td, #quickview-calendar .fc-list-table tr.fc-invitation-declined td,
#quickview-calendar .fc-view-table tr.fc-invitation-needs-action td { #quickview-calendar .fc-list-table tr.fc-invitation-needs-action td {
color: #333; color: #333;
} }
.calendarmain .fc-event:focus { .calendarmain .fc-event:focus {
outline: 1px solid rgba(71,135,177, 0.4); outline: 1px solid rgba(71,135,177, 0.4);
-webkit-box-shadow: 0 0 2px 3px rgba(71,135,177, 0.6); box-shadow: 0 0 2px 3px rgba(71,135,177, 0.6);
-moz-box-shadow: 0 0 2px 3px rgba(71,135,177, 0.6);
-o-box-shadow: 0 0 2px 3px rgba(71,135,177, 0.6);
box-shadow: 0 0 2px 3px rgba(71,135,177, 0.6);
}
.fc-event-title {
font-weight: bold;
} }
.fc-needs-action, .fc-needs-action,
@ -1908,40 +1887,40 @@ a.dropdown-link:after {
opacity: 0.6; opacity: 0.6;
} }
.cal-event-status-cancelled .fc-event-title { .cal-event-status-cancelled .fc-title {
text-decoration: line-through; text-decoration: line-through;
} }
.fc-event-hori .fc-event-title { .fc-event-hori .fc-title {
font-weight: normal; font-weight: normal;
white-space: nowrap; white-space: nowrap;
} }
.fc-event-hori .fc-event-time { .fc-event-hori .fc-time {
white-space: nowrap; white-space: nowrap;
font-weight: normal !important; font-weight: normal !important;
font-size: 10px; font-size: 10px;
padding-right: 0.6em; padding-right: 0.6em;
} }
.fc-grid .fc-event-time { .fc-grid .fc-time {
font-weight: normal !important; font-weight: normal !important;
padding-right: 0.3em; padding-right: 0.3em;
} }
.calendarmain .fc-event-vert .fc-event-inner { .calendarmain .fc-event .fc-inner {
z-index: 0; z-index: 0;
} }
.fc-event-cateories { .fc-event-categories {
font-style:italic; font-style: italic;
} }
div.fc-event-location { .fc-event-location {
font-size: 90%; font-size: 90%;
} }
.fc-more-link { .fc-more {
color: #999; color: #999;
padding-top: 1px; padding-top: 1px;
cursor: pointer; cursor: pointer;
@ -1955,13 +1934,13 @@ div.fc-event-location {
background-color: rgba(198,198,198, 0.08); background-color: rgba(198,198,198, 0.08);
} }
.calendarmain .fc-state-highlight { .calendarmain .fc-unthemed td.fc-day.fc-today {
background-color: rgba(233,198,14, 0.12); background-color: rgba(233,198,14, 0.12);
} }
.fc-widget-header, .fc-widget-header,
.fc-widget-content { .fc-widget-content {
border-color: #bbd3da !important; border-color: #c3c3c3 !important;
} }
.fc-widget-header .fc-agenda-divider-inner { .fc-widget-header .fc-agenda-divider-inner {
@ -1974,6 +1953,11 @@ div.fc-event-location {
text-shadow: 0px 1px 1px #fff; text-shadow: 0px 1px 1px #fff;
} }
.fc-popover .fc-header .fc-title,
.fc-list-heading .fc-widget-header {
color: #666;
}
.fc-view thead th.fc-widget-header { .fc-view thead th.fc-widget-header {
padding: 8px 0; padding: 8px 0;
color: #69939e; color: #69939e;
@ -2006,25 +1990,34 @@ div.fc-event-location {
cursor: pointer; cursor: pointer;
} }
.calendarmain .fc-view-table td.fc-list-header { .fc-list-table td.fc-list-header {
color: #004458; color: #004458;
font-size: 12px; font-size: 12px;
} }
.calendarmain .fc-view-table tr.fc-event td { .fc-list-table tr.fc-list-item {
border-color: #bbd3da; background: transparent;
}
.fc-list-table tr.fc-list-item:hover td {
background: transparent;
cursor: pointer;
}
.fc-list-table tr.fc-list-item td {
border-color: #c3c3c3;
padding: 6px 8px; padding: 6px 8px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.calendarmain .fc-view-table tr.fc-event td.fc-event-handle { .fc-list-table tr.fc-list-item td.fc-event-handle {
padding: 6px 0 2px 7px; padding: 6px 0 2px 7px;
width: 12px; width: 12px;
} }
.calendarmain .fc-view-table .fc-event-handle .fc-event-skin { .fc-list-table .fc-event-handle .fc-event-skin {
margin: 0; margin: 0;
padding: 0; padding: 0;
display: inline-block; display: inline-block;
@ -2034,7 +2027,7 @@ div.fc-event-location {
border-radius: 8px; border-radius: 8px;
} }
.calendarmain .fc-view-table .fc-event-handle .fc-event-inner { .fc-list-table .fc-event-handle .fc-event-inner {
display: inline-block; display: inline-block;
width: 10px; width: 10px;
height: 10px; height: 10px;
@ -2045,35 +2038,44 @@ div.fc-event-location {
border: 1px solid rgba(0, 0, 0, 0.4); border: 1px solid rgba(0, 0, 0, 0.4);
} }
.calendarmain .fc-view-table col.fc-event-location { .calendarmain .fc-list-table col.fc-event-location {
width: 25%; width: 25%;
} }
.fc-view-table table.fc-list-smart { .fc-event-dot {
/* table-layout: auto; */ vertical-align: middle;
} }
.fc-listappend { .fc-list-empty {
text-align: center;
margin: 1em 0;
}
.fc-listappend .message {
padding: 0.5em;
margin-bottom: 0.5em;
font-size: 150%; font-size: 150%;
color: #999; color: #999;
} background: unset !important;
.fc-listappend .formlinks a {
font-size: 12px;
padding: 0 0.3em;
max-width: initial;
} }
.fc-event-temp { .fc-event-temp {
opacity: 0.4; opacity: 0.4;
filter: alpha(opacity=40); /* IE8 */ }
.fc-axis {
width: 35px !important;
padding: 0 3px !important;
}
.fc .fc-week-number {
text-align: center;
}
.fc-month-view .fc-week-number {
width: 20px !important;
padding: 2px 0;
}
.fc-time-grid .fc-now-indicator {
border: 1px solid #3ec400;
}
.fc-list-empty {
display: none;
} }
/* Settings section */ /* Settings section */

File diff suppressed because it is too large Load diff

View file

@ -79,6 +79,11 @@ body, td, th, div, p, h3, select, input, textarea {
padding-bottom: 1em; padding-bottom: 1em;
} }
#calendarlist li div a {
color: inherit;
text-decoration: none;
}
#calendarlist input, #calendarlist input,
#calendarlist .handle { #calendarlist .handle {
display: none; display: none;
@ -101,7 +106,7 @@ body, td, th, div, p, h3, select, input, textarea {
@media print { @media print {
.noprint, .noprint,
.fc-header-right span { .fc-right {
display: none; display: none;
} }
@ -116,33 +121,20 @@ body, td, th, div, p, h3, select, input, textarea {
overflow: visible; overflow: visible;
} }
.fc-event-skin, .fc-unthemed td.fc-day.fc-today {
.fc-event-inner .fc-event-skin { background: transparent;
}
a.fc-event,
a.fc-event:hover {
color: black; color: black;
background-color: #fff !important; background-color: #fff !important;
} }
.fc-event-title { .fc-title {
font-weight: bold; font-weight: bold;
} }
.fc-event-hori .fc-event-title {
font-weight: normal;
white-space: nowrap;
}
.fc-event-hori .fc-event-time {
white-space: nowrap;
font-weight: normal !important;
font-size: 10px;
padding-right: 0.6em;
}
.fc-grid .fc-event-time {
font-weight: normal !important;
padding-right: 0.3em;
}
.fc-event-cateories { .fc-event-cateories {
font-style: italic; font-style: italic;
} }
@ -155,6 +147,13 @@ body, td, th, div, p, h3, select, input, textarea {
height: 1.4em; height: 1.4em;
} }
.fc-axis,
.fc-week-number,
.fc-day-number,
.fc-view thead th.fc-widget-header {
color: #444;
}
.fc-widget-header, .fc-widget-header,
.fc-mon, .fc-tue, .fc-wed, .fc-thu, .fc-fri { .fc-mon, .fc-tue, .fc-wed, .fc-thu, .fc-fri {
background-color: #fff; background-color: #fff;
@ -164,66 +163,34 @@ body, td, th, div, p, h3, select, input, textarea {
border-color: #ccc; border-color: #ccc;
} }
.fc-icon-alarms, .fc-list-table tr.fc-list-item td,
.fc-icon-recurring { .fc-list-view {
display: inline-block; border: 0 !important;
width: 11px;
height: 11px;
background: url('images/eventicons.gif') 0 0 no-repeat;
margin-left: 3px;
line-height: 10px;
} }
.fc-icon-alarms { .fc-list-table tr:first-child td {
background-position: 0 -13px; border-top-width: 1px;
} }
.fc-view-list, .fc-view-table { .fc-event-description {
border: 0;
}
.fc-view-list div.fc-list-header,
.fc-view-table td.fc-list-header {
padding: 0.3em;
background: #fff;
font-weight: bold;
font-size: 1.2em;
color: #333;
border-color: #333;
border-style: solid;
border-width: 1px 0;
filter: none;
}
.fc-list-section .fc-event {
cursor: auto;
}
.fc-view-table tr.fc-event td,
.fc-view-table tr.fc-event td.fc-event-handle {
border-color: #999;
padding-top: 0.5em;
padding-bottom: 0.5em;
}
.fc-view-table tr.fc-last td {
border: 0;
}
.fc-view-table tr.fc-event .fc-event-description {
padding-left: 2em;
padding-top: 0em;
}
.fc-event-vert .fc-event-description {
font-size: 90%; font-size: 90%;
font-style: italic;
} }
.fc-view-month .fc-event-hori .fc-event-inner { col.fc-event-location {
background: #fff !important;
}
.fc-view-table col.fc-event-location {
width: 20%; width: 20%;
} }
.fc-event-row-secondary td {
border: 0;
padding-top: 0 !important;
}
.fc-scroller {
overflow: visible !important;
height: auto !important;
}
.fc-head .fc-row,
.fc-day-grid .fc-row {
margin-right: 0 !important;
border-right-width: 0 !important;
}

View file

@ -45,13 +45,16 @@ function rcube_libcalendaring(settings)
var client_timezone = new Date().getTimezoneOffset(); var client_timezone = new Date().getTimezoneOffset();
// general datepicker settings // general datepicker settings
var datepicker_settings = { this.datepicker_settings = {
// translate from fullcalendar format to datepicker format // translate from fullcalendar (MomentJS) format to datepicker format
dateFormat: settings.date_format.replace(/M/g, 'm').replace(/mmmmm/, 'MM').replace(/mmm/, 'M').replace(/dddd/, 'DD').replace(/ddd/, 'D').replace(/yy/g, 'y'), dateFormat: settings.date_format.replace(/M/g, 'm').replace(/mmmm/, 'MM').replace(/mmm/, 'M')
.replace(/dddd/, 'DD').replace(/ddd/, 'D').replace(/DD/, 'dd')
.replace(/Y/g, 'y').replace(/yyyy/, 'yy'),
firstDay : settings.first_day, firstDay : settings.first_day,
dayNamesMin: settings.days_short, dayNamesMin: settings.days_short,
monthNames: settings.months, monthNames: settings.months,
monthNamesShort: settings.months, monthNamesShort: settings.months,
showWeek: settings.show_weekno >= 0,
changeMonth: false, changeMonth: false,
showOtherMonths: true, showOtherMonths: true,
selectOtherMonths: true selectOtherMonths: true
@ -76,19 +79,27 @@ function rcube_libcalendaring(settings)
if (!event.end) if (!event.end)
event.end = event.start; event.end = event.start;
var fromto, duration = event.end.getTime() / 1000 - event.start.getTime() / 1000, // Support Moment.js objects
var start = 'toDate' in event.start ? event.start.toDate() : event.start,
end = event.end && 'toDate' in event.end ? event.end.toDate() : event.end;
var fromto, duration = end.getTime() / 1000 - start.getTime() / 1000,
until = voice ? ' ' + rcmail.gettext('until','libcalendaring') + ' ' : ' — '; until = voice ? ' ' + rcmail.gettext('until','libcalendaring') + ' ' : ' — ';
if (event.allDay) { if (event.allDay) {
fromto = this.format_datetime(event.start, 1, voice) // fullcalendar end dates of all-day events are exclusive
+ (duration > 86400 || event.start.getDay() != event.end.getDay() ? until + this.format_datetime(event.end, 1, voice) : ''); end = new Date(end.getTime() - 1000*60*60*24*1);
duration = end.getTime() / 1000 - start.getTime() / 1000;
fromto = this.format_datetime(start, 1, voice)
+ (duration > 86400 || start.getDay() != end.getDay() ? until + this.format_datetime(end, 1, voice) : '');
} }
else if (duration < 86400 && event.start.getDay() == event.end.getDay()) { else if (duration < 86400 && start.getDay() == end.getDay()) {
fromto = this.format_datetime(event.start, 0, voice) fromto = this.format_datetime(start, 0, voice)
+ (duration > 0 ? until + this.format_datetime(event.end, 2, voice) : ''); + (duration > 0 ? until + this.format_datetime(end, 2, voice) : '');
} }
else { else {
fromto = this.format_datetime(event.start, 0, voice) fromto = this.format_datetime(start, 0, voice)
+ (duration > 0 ? until + this.format_datetime(event.end, 0, voice) : ''); + (duration > 0 ? until + this.format_datetime(end, 0, voice) : '');
} }
return fromto; return fromto;
@ -154,7 +165,7 @@ function rcube_libcalendaring(settings)
this.parse_datetime = function(time, date) this.parse_datetime = function(time, date)
{ {
// we use the utility function from datepicker to parse dates // we use the utility function from datepicker to parse dates
var date = date ? $.datepicker.parseDate(datepicker_settings.dateFormat, date, datepicker_settings) : new Date(); var date = date ? $.datepicker.parseDate(this.datepicker_settings.dateFormat, date, this.datepicker_settings) : new Date();
var time_arr = time.replace(/\s*[ap][.m]*/i, '').replace(/0([0-9])/g, '$1').split(/[:.]/); var time_arr = time.replace(/\s*[ap][.m]*/i, '').replace(/0([0-9])/g, '$1').split(/[:.]/);
if (!isNaN(time_arr[0])) { if (!isNaN(time_arr[0])) {
@ -229,6 +240,12 @@ function rcube_libcalendaring(settings)
*/ */
this.date2ISO8601 = function(date) this.date2ISO8601 = function(date)
{ {
if (!date)
return null;
if ('toDate' in date)
return date.format('YYYY-MM-DD[T]HH:mm:ss'); // MomentJS
var zeropad = function(num) { return (num < 10 ? '0' : '') + num; }; var zeropad = function(num) { return (num < 10 ? '0' : '') + num; };
return date.getFullYear() + '-' + zeropad(date.getMonth()+1) + '-' + zeropad(date.getDate()) return date.getFullYear() + '-' + zeropad(date.getMonth()+1) + '-' + zeropad(date.getDate())
@ -242,7 +259,7 @@ function rcube_libcalendaring(settings)
{ {
var res = ''; var res = '';
if (!mode || mode == 1) { if (!mode || mode == 1) {
res += $.datepicker.formatDate(voice ? 'MM d yy' : datepicker_settings.dateFormat, date, datepicker_settings); res += $.datepicker.formatDate(voice ? 'MM d yy' : this.datepicker_settings.dateFormat, date, this.datepicker_settings);
} }
if (!mode) { if (!mode) {
res += voice ? ' ' + rcmail.gettext('at','libcalendaring') + ' ' : ' '; res += voice ? ' ' + rcmail.gettext('at','libcalendaring') + ' ' : ' ';
@ -269,10 +286,8 @@ function rcube_libcalendaring(settings)
hh : function(d) { return zeroPad(d.getHours() % 12 || 12) }, hh : function(d) { return zeroPad(d.getHours() % 12 || 12) },
H : function(d) { return d.getHours() }, H : function(d) { return d.getHours() },
HH : function(d) { return zeroPad(d.getHours()) }, HH : function(d) { return zeroPad(d.getHours()) },
t : function(d) { return d.getHours() < 12 ? 'a' : 'p' }, a : function(d) { return d.getHours() < 12 ? 'am' : 'pm' },
tt : function(d) { return d.getHours() < 12 ? 'am' : 'pm' }, A : function(d) { return d.getHours() < 12 ? 'AM' : 'PM' }
T : function(d) { return d.getHours() < 12 ? 'A' : 'P' },
TT : function(d) { return d.getHours() < 12 ? 'AM' : 'PM' }
}; };
var i, i2, c, formatter, res = '', var i, i2, c, formatter, res = '',
@ -299,8 +314,10 @@ function rcube_libcalendaring(settings)
*/ */
this.date2unixtime = function(date) this.date2unixtime = function(date)
{ {
var dst_offset = (client_timezone - date.getTimezoneOffset()) * 60; // adjust DST offset var dt = date && 'toDate' in date ? date.toDate() : date,
return Math.round(date.getTime()/1000 + gmt_offset * 3600 + dst_offset); dst_offset = (client_timezone - dt.getTimezoneOffset()) * 60; // adjust DST offset
return Math.round(dt.getTime()/1000 + gmt_offset * 3600 + dst_offset);
} }
/** /**
@ -396,7 +413,7 @@ function rcube_libcalendaring(settings)
parent.find('.edit-alarm-related')[val === '@' ? 'hide' : 'show'](); parent.find('.edit-alarm-related')[val === '@' ? 'hide' : 'show']();
}); });
$(prefix+' .edit-alarm-date').removeClass('hasDatepicker').removeAttr('id').datepicker(datepicker_settings); $(prefix+' .edit-alarm-date').removeClass('hasDatepicker').removeAttr('id').datepicker(this.datepicker_settings);
if (rcmail.env.action != 'print') if (rcmail.env.action != 'print')
this.init_time_autocomplete($(prefix+' .edit-alarm-time')[0], {}); this.init_time_autocomplete($(prefix+' .edit-alarm-time')[0], {});
@ -847,9 +864,9 @@ function rcube_libcalendaring(settings)
return false; return false;
}); });
$('#edit-recurrence-enddate').datepicker(datepicker_settings).click(function(){ $("#edit-recurrence-repeat-until").prop('checked', true) }); $('#edit-recurrence-enddate').datepicker(this.datepicker_settings).click(function(){ $("#edit-recurrence-repeat-until").prop('checked', true) });
$('#edit-recurrence-repeat-times').change(function(e){ $('#edit-recurrence-repeat-count').prop('checked', true); }); $('#edit-recurrence-repeat-times').change(function(e){ $('#edit-recurrence-repeat-count').prop('checked', true); });
$('#edit-recurrence-rdate-input').datepicker(datepicker_settings); $('#edit-recurrence-rdate-input').datepicker(this.datepicker_settings);
}; };
/** /**
@ -857,7 +874,7 @@ function rcube_libcalendaring(settings)
*/ */
this.set_recurrence_edit = function(rec) this.set_recurrence_edit = function(rec)
{ {
var recurrence = $('#edit-recurrence-frequency').val(rec.recurrence ? rec.recurrence.FREQ || (rec.recurrence.RDATE ? 'RDATE' : '') : '').change(), var date, recurrence = $('#edit-recurrence-frequency').val(rec.recurrence ? rec.recurrence.FREQ || (rec.recurrence.RDATE ? 'RDATE' : '') : '').change(),
interval = $('.recurrence-form select.edit-recurrence-interval').val(rec.recurrence ? rec.recurrence.INTERVAL || 1 : 1), interval = $('.recurrence-form select.edit-recurrence-interval').val(rec.recurrence ? rec.recurrence.INTERVAL || 1 : 1),
rrtimes = $('#edit-recurrence-repeat-times').val(rec.recurrence ? rec.recurrence.COUNT || 1 : 1), rrtimes = $('#edit-recurrence-repeat-times').val(rec.recurrence ? rec.recurrence.COUNT || 1 : 1),
rrenddate = $('#edit-recurrence-enddate').val(rec.recurrence && rec.recurrence.UNTIL ? this.format_datetime(this.parseISO8601(rec.recurrence.UNTIL), 1) : ''); rrenddate = $('#edit-recurrence-enddate').val(rec.recurrence && rec.recurrence.UNTIL ? this.format_datetime(this.parseISO8601(rec.recurrence.UNTIL), 1) : '');
@ -887,13 +904,15 @@ function rcube_libcalendaring(settings)
$('input.edit-recurrence-'+section+'-mode').val(['BYDAY']); $('input.edit-recurrence-'+section+'-mode').val(['BYDAY']);
} }
else if (rec.start) { else if (rec.start) {
$('#edit-recurrence-monthly-byday').val(weekdays[rec.start.getDay()]); date = 'toDate' in rec.start ? rec.start.toDate() : rec.start;
$('#edit-recurrence-monthly-byday').val(weekdays[date.getDay()]);
} }
if (rec.recurrence && rec.recurrence.BYMONTH) { if (rec.recurrence && rec.recurrence.BYMONTH) {
$('input.edit-recurrence-yearly-bymonth').val(String(rec.recurrence.BYMONTH).split(',')); $('input.edit-recurrence-yearly-bymonth').val(String(rec.recurrence.BYMONTH).split(','));
} }
else if (rec.start) { else if (rec.start) {
$('input.edit-recurrence-yearly-bymonth').val([String(rec.start.getMonth()+1)]); date = 'toDate' in rec.start ? rec.start.toDate() : rec.start;
$('input.edit-recurrence-yearly-bymonth').val([String(date.getMonth()+1)]);
} }
if (rec.recurrence && rec.recurrence.RDATE) { if (rec.recurrence && rec.recurrence.RDATE) {
$.each(rec.recurrence.RDATE, function(i,rdate){ $.each(rec.recurrence.RDATE, function(i,rdate){

View file

@ -40,21 +40,21 @@ class libcalendaring extends rcube_plugin
public $ical_message; public $ical_message;
public $defaults = array( public $defaults = array(
'calendar_date_format' => "yyyy-MM-dd", 'calendar_date_format' => "Y-m-d",
'calendar_date_short' => "M-d", 'calendar_date_short' => "M-j",
'calendar_date_long' => "MMM d yyyy", 'calendar_date_long' => "F j Y",
'calendar_date_agenda' => "ddd MM-dd", 'calendar_date_agenda' => "l M-d",
'calendar_time_format' => "HH:mm", 'calendar_time_format' => "H:m",
'calendar_first_day' => 1, 'calendar_first_day' => 1,
'calendar_first_hour' => 6, 'calendar_first_hour' => 6,
'calendar_date_format_sets' => array( 'calendar_date_format_sets' => array(
'yyyy-MM-dd' => array('MMM d yyyy', 'M-d', 'ddd MM-dd'), 'Y-m-d' => array('d M Y', 'm-d', 'l m-d'),
'dd-MM-yyyy' => array('d MMM yyyy', 'd-M', 'ddd dd-MM'), 'd-m-Y' => array('d M Y', 'd-m', 'l d-m'),
'yyyy/MM/dd' => array('MMM d yyyy', 'M/d', 'ddd MM/dd'), 'Y/m/d' => array('M d Y', 'm/d', 'l m/d'),
'MM/dd/yyyy' => array('MMM d yyyy', 'M/d', 'ddd MM/dd'), 'm/d/Y' => array('M d Y', 'm/d', 'l m/d'),
'dd/MM/yyyy' => array('d MMM yyyy', 'd/M', 'ddd dd/MM'), 'd/m/Y' => array('d M Y', 'd/m', 'l d/m'),
'dd.MM.yyyy' => array('dd. MMM yyyy', 'd.M', 'ddd dd.MM.'), 'd.m.Y' => array('d. M Y', 'd.m', 'l d.m.'),
'd.M.yyyy' => array('d. MMM yyyy', 'd.M', 'ddd d.MM.'), 'd.m.Y' => array('d. M Y', 'd.m', 'l d.m.'),
), ),
); );
@ -207,14 +207,14 @@ class libcalendaring extends rcube_plugin
$this->date_format_defaults(); $this->date_format_defaults();
$settings = array(); $settings = array();
$keys = array('date_format', 'time_format', 'date_short', 'date_long'); $keys = array('date_format', 'time_format', 'date_short', 'date_long', 'date_agenda');
foreach ($keys as $key) { foreach ($keys as $key) {
$settings[$key] = (string)$this->rc->config->get('calendar_' . $key, $this->defaults['calendar_' . $key]); $settings[$key] = (string)$this->rc->config->get('calendar_' . $key, $this->defaults['calendar_' . $key]);
$settings[$key] = str_replace('Y', 'y', $settings[$key]); $settings[$key] = self::from_php_date_format($settings[$key]);
} }
$settings['dates_long'] = str_replace(' yyyy', '[ yyyy]', $settings['date_long']) . "{ '&mdash;' " . $settings['date_long'] . '}'; $settings['dates_long'] = $settings['date_long'];
$settings['first_day'] = (int)$this->rc->config->get('calendar_first_day', $this->defaults['calendar_first_day']); $settings['first_day'] = (int)$this->rc->config->get('calendar_first_day', $this->defaults['calendar_first_day']);
$settings['timezone'] = $this->timezone_offset; $settings['timezone'] = $this->timezone_offset;
$settings['dst'] = $this->dst_active; $settings['dst'] = $this->dst_active;
@ -265,8 +265,8 @@ class libcalendaring extends rcube_plugin
if (isset($defaults['date_format'])) if (isset($defaults['date_format']))
return; return;
$defaults['date_format'] = $this->rc->config->get('calendar_date_format', self::from_php_date_format($this->rc->config->get('date_format'))); $defaults['date_format'] = $this->rc->config->get('calendar_date_format', $this->rc->config->get('date_format'));
$defaults['time_format'] = $this->rc->config->get('calendar_time_format', self::from_php_date_format($this->rc->config->get('time_format'))); $defaults['time_format'] = $this->rc->config->get('calendar_time_format', $this->rc->config->get('time_format'));
// override defaults // override defaults
if ($defaults['date_format']) if ($defaults['date_format'])
@ -1477,8 +1477,8 @@ class libcalendaring extends rcube_plugin
'M' => 'n', 'M' => 'n',
'dddd' => 'l', 'dddd' => 'l',
'ddd' => 'D', 'ddd' => 'D',
'dd' => 'd', 'DD' => 'd',
'd' => 'j', 'D' => 'j',
'HH' => '**', 'HH' => '**',
'hh' => '%%', 'hh' => '%%',
'H' => 'G', 'H' => 'G',
@ -1497,20 +1497,20 @@ class libcalendaring extends rcube_plugin
} }
/** /**
* Convert from PHP date() format to fullcalendar format string * Convert from PHP date() format to fullcalendar (MomentJS) format string
*/ */
public static function from_php_date_format($from) public static function from_php_date_format($from)
{ {
// "d.m.Y H:i:s" => "dd.MM.yyyy HH:mm:ss" // "d.m.Y H:i:s" => "dd.MM.yyyy HH:mm:ss"
return strtr($from, array( return strtr($from, array(
'y' => 'yy', 'y' => 'YY',
'Y' => 'yyyy', 'Y' => 'YYYY',
'M' => 'MMM', 'M' => 'MMM',
'F' => 'MMMM', 'F' => 'MMMM',
'm' => 'MM', 'm' => 'MM',
'n' => 'M', 'n' => 'M',
'j' => 'd', 'j' => 'D',
'd' => 'dd', 'd' => 'DD',
'D' => 'ddd', 'D' => 'ddd',
'l' => 'dddd', 'l' => 'dddd',
'H' => 'HH', 'H' => 'HH',
@ -1519,9 +1519,7 @@ class libcalendaring extends rcube_plugin
'g' => 'h', 'g' => 'h',
'i' => 'mm', 'i' => 'mm',
's' => 'ss', 's' => 'ss',
'A' => 'TT', 'c' => '',
'a' => 'tt',
'c' => 'u',
)); ));
} }

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="#f0f3f4" d="M569.354 231.631C512.969 135.949 407.81 72 288 72 168.14 72 63.004 135.994 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.031 376.051 168.19 440 288 440c119.86 0 224.996-63.994 281.354-159.631a47.997 47.997 0 0 0 0-48.738zM288 392c-75.162 0-136-60.827-136-136 0-75.162 60.826-136 136-136 75.162 0 136 60.826 136 136 0 75.162-60.826 136-136 136zm104-136c0 57.438-46.562 104-104 104s-104-46.562-104-104c0-17.708 4.431-34.379 12.236-48.973l-.001.032c0 23.651 19.173 42.823 42.824 42.823s42.824-19.173 42.824-42.823c0-23.651-19.173-42.824-42.824-42.824l-.032.001C253.621 156.431 270.292 152 288 152c57.438 0 104 46.562 104 104z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path fill="#f2f2f2" d="M569.354 231.631C512.969 135.949 407.81 72 288 72 168.14 72 63.004 135.994 6.646 231.631a47.999 47.999 0 0 0 0 48.739C63.031 376.051 168.19 440 288 440c119.86 0 224.996-63.994 281.354-159.631a47.997 47.997 0 0 0 0-48.738zM288 392c-75.162 0-136-60.827-136-136 0-75.162 60.826-136 136-136 75.162 0 136 60.826 136 136 0 75.162-60.826 136-136 136zm104-136c0 57.438-46.562 104-104 104s-104-46.562-104-104c0-17.708 4.431-34.379 12.236-48.973l-.001.032c0 23.651 19.173 42.823 42.824 42.823s42.824-19.173 42.824-42.823c0-23.651-19.173-42.824-42.824-42.824l-.032.001C253.621 156.431 270.292 152 288 152c57.438 0 104 46.562 104 104z"/></svg>

Before

Width:  |  Height:  |  Size: 717 B

After

Width:  |  Height:  |  Size: 717 B

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -265,6 +265,7 @@
} }
} }
td.invite { td.invite {
label:before { label:before {
line-height: 1.6; line-height: 1.6;
@ -337,9 +338,8 @@
} }
select { select {
padding: 0 .5rem; padding-left: .5rem;
} }
} }
} }

View file

@ -87,19 +87,6 @@ function rcube_tasklist_ui(settings)
var task_attendees = []; var task_attendees = [];
var attendees_list; var attendees_list;
var me = this; var me = this;
// general datepicker settings
var datepicker_settings = {
// translate from PHP format to datepicker format
dateFormat: settings.date_format.replace(/M/g, 'm').replace(/mmmmm/, 'MM').replace(/mmm/, 'M').replace(/dddd/, 'DD').replace(/ddd/, 'D').replace(/yy/g, 'y'),
firstDay : settings.first_day,
// dayNamesMin: settings.days_short,
// monthNames: settings.months,
// monthNamesShort: settings.months,
changeMonth: false,
showOtherMonths: true,
selectOtherMonths: true
};
var extended_datepicker_settings; var extended_datepicker_settings;
/* public members */ /* public members */
@ -127,10 +114,6 @@ function rcube_tasklist_ui(settings)
/* imports */ /* imports */
var Q = this.quote_html; var Q = this.quote_html;
var text2html = this.text2html; var text2html = this.text2html;
var event_date_text = this.event_date_text;
var parse_datetime = this.parse_datetime;
var date2unixtime = this.date2unixtime;
var fromunixtime = this.fromunixtime;
var render_message_links = this.render_message_links; var render_message_links = this.render_message_links;
/** /**
@ -639,7 +622,7 @@ function rcube_tasklist_ui(settings)
}); });
}, 1); }, 1);
} }
}, datepicker_settings); }, me.datepicker_settings);
rcmail.addEventListener('kolab-tags-search', filter_tasks) rcmail.addEventListener('kolab-tags-search', filter_tasks)
.addEventListener('kolab-tags-drop-data', function(e) { return listdata[e.id]; }) .addEventListener('kolab-tags-drop-data', function(e) { return listdata[e.id]; })
@ -743,7 +726,7 @@ function rcube_tasklist_ui(settings)
me.init_alarms_edit('#taskedit-alarms'); me.init_alarms_edit('#taskedit-alarms');
me.init_recurrence_edit('#eventedit'); me.init_recurrence_edit('#eventedit');
$('#taskedit-date, #taskedit-startdate').datepicker(datepicker_settings); $('#taskedit-date, #taskedit-startdate').datepicker(me.datepicker_settings);
$('a.edit-nodate').click(function(){ $('a.edit-nodate').click(function(){
var sel = $(this).attr('rel'); var sel = $(this).attr('rel');
@ -2594,8 +2577,8 @@ function rcube_tasklist_ui(settings)
return false; return false;
} }
else if (data.startdate && data.date) { else if (data.startdate && data.date) {
var startdate = $.datepicker.parseDate(datepicker_settings.dateFormat, data.startdate, datepicker_settings); var startdate = $.datepicker.parseDate(me.datepicker_settings.dateFormat, data.startdate, me.datepicker_settings);
var duedate = $.datepicker.parseDate(datepicker_settings.dateFormat, data.date, datepicker_settings); var duedate = $.datepicker.parseDate(me.datepicker_settings.dateFormat, data.date, me.datepicker_settings);
if (startdate > duedate) { if (startdate > duedate) {
rcmail.alert_dialog(rcmail.gettext('invalidstartduedates', 'tasklist')); rcmail.alert_dialog(rcmail.gettext('invalidstartduedates', 'tasklist'));
return false; return false;