Fix calendar selection for new events in case default calendar is not writeable (#225)
This commit is contained in:
parent
7cbc35e060
commit
6d8a2f51c5
1 changed files with 7 additions and 2 deletions
|
@ -1538,12 +1538,17 @@ function rcube_calendar_ui(settings)
|
||||||
.data('id', id);
|
.data('id', id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cal.readonly && !this.selected_calendar && (!settings.default_calendar || settings.default_calendar == id)) {
|
if (!cal.readonly && !this.selected_calendar) {
|
||||||
this.selected_calendar = id;
|
this.selected_calendar = id;
|
||||||
rcmail.enable_command('addevent', true);
|
rcmail.enable_command('addevent', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// select default calendar
|
||||||
|
if (settings.default_calendar && this.calendars[settings.default_calendar] && !this.calendars[settings.default_calendar].readonly)
|
||||||
|
this.selected_calendar = settings.default_calendar;
|
||||||
|
|
||||||
|
|
||||||
// initalize the fullCalendar plugin
|
// initalize the fullCalendar plugin
|
||||||
var fc = $('#calendar').fullCalendar({
|
var fc = $('#calendar').fullCalendar({
|
||||||
header: {
|
header: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue