summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-04-18 13:28:03 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-04-18 13:28:38 (GMT)
commit82907b0a0921f6b7657f70f142c5f30032ec7131 (patch)
tree08dcde9b238d89fd8fea0fe8ac93e421181e56f8
parent395d55a6807ad6613f4e095ce9c71d4d2c737b77 (diff)
downloadroundcubemail-plugins-kolab-82907b0a0921f6b7657f70f142c5f30032ec7131.tar.gz
Improve fix for wrong alarm settings (#1764)
-rw-r--r--plugins/calendar/calendar_ui.js5
-rw-r--r--plugins/tasklist/tasklist.js5
2 files changed, 6 insertions, 4 deletions
diff --git a/plugins/calendar/calendar_ui.js b/plugins/calendar/calendar_ui.js
index 000cc3c..64210f8 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -450,8 +450,9 @@ function rcube_calendar_ui(settings)
if (typeof event.alarms == 'string')
event.alarms = event.alarms.split(';');
- for (var alarm, i=0; i < event.alarms.length; i++) {
- alarm = String(event.alarms[i]).split(':');
+ var valarms = event.alarms || [''];
+ for (var alarm, i=0; i < valarms.length; i++) {
+ alarm = String(valarms[i]).split(':');
if (!alarm[1] && alarm[0]) alarm[1] = 'DISPLAY';
$('#eventedit select.edit-alarm-type').val(alarm[1]);
diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js
index 7fa17f6..530bb25 100644
--- a/plugins/tasklist/tasklist.js
+++ b/plugins/tasklist/tasklist.js
@@ -1011,8 +1011,9 @@ function rcube_tasklist_ui(settings)
if (typeof rec.alarms == 'string')
rec.alarms = rec.alarms.split(';');
- for (var alarm, i=0; i < rec.alarms.length; i++) {
- alarm = String(rec.alarms[i]).split(':');
+ var valarms = rec.alarms || [''];
+ for (var alarm, i=0; i < valarms.length; i++) {
+ alarm = String(valarms[i]).split(':');
if (!alarm[1] && alarm[0]) alarm[1] = 'DISPLAY';
$('#taskedit select.edit-alarm-type').val(alarm[1]);