summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-05-31 16:07:16 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2013-06-21 10:10:30 (GMT)
commit8502e5f68f4378f9e32cf12ad7015304c114d20d (patch)
treef8e60c06e9c5055714d2028f0c35c16af41a87ca
parent68e15d58df08444a6222cf7fd53604f4e43a4655 (diff)
downloadroundcubemail-plugins-kolab-8502e5f68f4378f9e32cf12ad7015304c114d20d.tar.gz
Only temporarily split alarms string into array (#1905)
-rw-r--r--plugins/tasklist/tasklist.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js
index 530bb25..84215b0 100644
--- a/plugins/tasklist/tasklist.js
+++ b/plugins/tasklist/tasklist.js
@@ -1008,10 +1008,7 @@ function rcube_tasklist_ui(settings)
// set alarm(s)
if (rec.alarms || action != 'new') {
- if (typeof rec.alarms == 'string')
- rec.alarms = rec.alarms.split(';');
-
- var valarms = rec.alarms || [''];
+ var valarms = (typeof rec.alarms == 'string' ? rec.alarms.split(';') : rec.alarms) || [''];
for (var alarm, i=0; i < valarms.length; i++) {
alarm = String(valarms[i]).split(':');
if (!alarm[1] && alarm[0]) alarm[1] = 'DISPLAY';