*/
insertCalendarInList: function(type, id, cal, div)
{
- var noItems;
+ var noItems, calendar;
if (!div) {
div = this.getCalendarList(type, cal.owner);
}
div.insert(new Element('span', { className: 'kronolithCalEdit' })
.insert('►'));
}
- div.insert(new Element('div', { className: cal.show ? 'kronolithCalOn' : 'kronolithCalOff' })
- .store('calendar', id)
- .store('calendarclass', type)
- .setStyle({ backgroundColor: cal.bg, color: cal.fg })
- .update(cal.name.escapeHTML()));
+ calendar = new Element('div', { className: cal.show ? 'kronolithCalOn' : 'kronolithCalOff' })
+ .store('calendar', id)
+ .store('calendarclass', type)
+ .setStyle({ backgroundColor: cal.bg, color: cal.fg })
+ .insert(cal.name.escapeHTML());
+ if (cal.perms) {
+ $H(cal.perms).each(function(perm) {
+ if (perm.key != 'type' && perm.value) {
+ calendar.insert(' ').insert(new Element('img', { src: Kronolith.conf.URI_IMG + 'attendees-' + cal.fg.substring(1) + '.png', title: Kronolith.text.shared }));
+ throw $break;
+ }
+ });
+ }
+ div.insert(calendar);
},
/**
'allday' => _("All day"),
'more' => _("more..."),
'prefs' => _("Options"),
+ 'shared' => _("Shared"),
'no_url' => _("You must specify a URL."),
'wrong_auth' => _("The authentication information you specified wasn't accepted."),
'geocode_error' => _("Unable to locate requested address"),