summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-04-18 13:13:00 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-04-18 13:16:12 (GMT)
commita83276740b6cd84cad321b4334e1d12662fb48d1 (patch)
tree08d2dd209f0519b8abb0ea7820633acec322e9d6
parent5d1df0d04f97d60a41f597a9fa4284e23d9c644b (diff)
downloadroundcubemail-plugins-kolab-a83276740b6cd84cad321b4334e1d12662fb48d1.tar.gz
Don't apply default alarm settings when editing an object that has no alarm set (#1764)
-rw-r--r--plugins/calendar/calendar_ui.js4
-rw-r--r--plugins/tasklist/tasklist.js5
2 files changed, 5 insertions, 4 deletions
diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index 1db870a..d9743ea 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -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 };
@@ -440,7 +440,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(';');
diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js
index ffb38d6..2fd5323 100644
--- a/plugins/tasklist/tasklist.js
+++ b/plugins/tasklist/tasklist.js
@@ -940,7 +940,8 @@ function rcube_tasklist_ui(settings)
if (!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)
@@ -980,7 +981,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(';');