summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-05-31 16:07:16 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-05-31 16:13:09 (GMT)
commit85ed59aad3aa32f9c9fd79b588a48198b3486ec0 (patch)
tree904f86743bc71f6bd1a996d50731b22151f981a4
parent11039599dcba8800a310bbd7c761269b3b38d519 (diff)
downloadroundcubemail-plugins-kolab-85ed59aad3aa32f9c9fd79b588a48198b3486ec0.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';