Much better way of preventing timeObject category collisions.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 7 Nov 2009 17:35:53 +0000 (12:35 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 7 Nov 2009 17:38:20 +0000 (12:38 -0500)
Now, the display code will have to be tweaked though, since this results
in a new section to be added for each subgroup. (Example, all birthdays
are grouped together under Contacts, then a second Contacts group is
added for all anniversaries...

kronolith/js/kronolith.js

index d3e093e..1c7a5cd 100644 (file)
@@ -757,7 +757,9 @@ KronolithCore = {
         }
 
         $H(Kronolith.conf.calendars.external).each(function(cal) {
-            api = cal.key.split('/');
+            var api = [];
+            api[0] = cal.key.substring(0, cal.key.lastIndexOf('/'));
+            api[1] = cal.key.substring(cal.key.lastIndexOf('/') + 1);
             if (typeof ext[api[0]] == 'undefined') {
                 ext[api[0]] = {};
             }