Don't apply default alarm settings when editing an object that has no alarm set (#1764)
This commit is contained in:
parent
5c84fd55aa
commit
395d55a680
2 changed files with 5 additions and 4 deletions
|
@ -44,7 +44,7 @@ function rcube_calendar_ui(settings)
|
|||
var client_timezone = new Date().getTimezoneOffset();
|
||||
var day_clicked = day_clicked_ts = 0;
|
||||
var ignore_click = false;
|
||||
var event_defaults = { free_busy:'busy' };
|
||||
var event_defaults = { free_busy:'busy', alarms:'' };
|
||||
var event_attendees = [];
|
||||
var attendees_list;
|
||||
var freebusy_ui = { workinhoursonly:false, needsupdate:false };
|
||||
|
@ -446,7 +446,7 @@ function rcube_calendar_ui(settings)
|
|||
|
||||
// set alarm(s)
|
||||
// TODO: support multiple alarm entries
|
||||
if (event.alarms) {
|
||||
if (event.alarms || action != 'new') {
|
||||
if (typeof event.alarms == 'string')
|
||||
event.alarms = event.alarms.split(';');
|
||||
|
||||
|
|
|
@ -966,7 +966,8 @@ function rcube_tasklist_ui(settings)
|
|||
if (rcmail.busy || !list.editable || (action == 'edit' && (!rec || rec.readonly)))
|
||||
return false;
|
||||
|
||||
me.selected_task = $.extend({}, rec); // clone task object
|
||||
me.selected_task = $.extend({ alarms:'' }, rec); // clone task object
|
||||
rec = me.selected_task;
|
||||
|
||||
// assign temporary id
|
||||
if (!me.selected_task.id)
|
||||
|
@ -1006,7 +1007,7 @@ function rcube_tasklist_ui(settings)
|
|||
});
|
||||
|
||||
// set alarm(s)
|
||||
if (rec.alarms) {
|
||||
if (rec.alarms || action != 'new') {
|
||||
if (typeof rec.alarms == 'string')
|
||||
rec.alarms = rec.alarms.split(';');
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue