Fix setting share icon if creating a new calendar.
authorJan Schneider <jan@horde.org>
Tue, 15 Jun 2010 17:56:33 +0000 (19:56 +0200)
committerJan Schneider <jan@horde.org>
Tue, 15 Jun 2010 17:56:33 +0000 (19:56 +0200)
kronolith/js/kronolith.js

index dade4e6..d1ae457 100644 (file)
@@ -1036,7 +1036,9 @@ KronolithCore = {
     {
         if (cal.owner && cal.perms) {
             $H(cal.perms).each(function(perm) {
-                if (perm.key != 'type' && perm.value) {
+                if (perm.key != 'type' &&
+                    ((Object.isArray(perm.value) && perm.value.size()) ||
+                     (!Object.isArray(perm.value) && perm.value))) {
                     element.insert(' ').insert(new Element('img', { src: Kronolith.conf.URI_IMG + 'attendees-' + cal.fg.substring(1) + '.png', title: Kronolith.text.shared }));
                     throw $break;
                 }