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:03 (GMT)
commitdac9965e024fb4b3d6d88684cff12842c95890ef (patch)
tree399a9cbc6473b5ef90f26f0a3a795f8d0d7dd674
parenta83276740b6cd84cad321b4334e1d12662fb48d1 (diff)
downloadroundcubemail-plugins-kolab-dac9965e024fb4b3d6d88684cff12842c95890ef.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 d9743ea..caf6142 100644
--- a/plugins/calendar/calendar_ui.js
+++ b/plugins/calendar/calendar_ui.js
@@ -444,8 +444,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 2fd5323..c3fe9db 100644
--- a/plugins/tasklist/tasklist.js
+++ b/plugins/tasklist/tasklist.js
@@ -985,8 +985,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]);