case 'year':
var year = dates[0].getFullYear(),
- month, day, dateString, monthLength, events, title;
+ month, day, dateString, monthLength, events, title, busy, td;
this.ecache.each(function(types) {
types.value.each(function(calendars) {
for (month = 0; month < 12; month++) {
events = calendars.value.get(dateString);
if (events) {
title = '';
+ busy = false;
events.each(function(event) {
if (event.value.al) {
title += Kronolith.text.allday;
title += event.value.start.toString('t') + '-' + event.value.end.toString('t');
}
title += ': ' + event.value.t;
+ if (event.value.x == Kronolith.conf.status.tentative ||
+ event.value.x == Kronolith.conf.status.confirmed) {
+ busy = true;
+ }
});
if (title) {
- $('kronolithYearTable' + month).down('td[date=' + dateString + ']').writeAttribute('title', title).addClassName('kronolithHasEvents');
+ td = $('kronolithYearTable' + month).down('td[date=' + dateString + ']');
+ td.writeAttribute('title', title).addClassName('kronolithHasEvents');
+ if (busy) {
+ td.addClassName('kronolithIsBusy');
+ }
}
}
}
$json->c = $this->getCalendar();
$json->s = $this->start->toJson();
$json->e = $this->end->toJson();
+ $json->x = $this->status;
$json->al = is_null($allDay) ? $this->isAllDay() : $allDay;
$json->bg = $this->_backgroundColor;
$json->fg = $this->_foregroundColor;
$this->private = (bool)($SQLEvent['event_private']);
}
if (isset($SQLEvent['event_status'])) {
- $this->status = $SQLEvent['event_status'];
+ $this->status = (int)$SQLEvent['event_status'];
}
if (isset($SQLEvent['event_attendees'])) {
$this->attendees = array_change_key_case($driver->convertFromDriver(unserialize($SQLEvent['event_attendees'])));
array('d', 'dd', 'ddd', 'dddd', 'MM', 'MMM', 'MMM', 'MMMM', 'yy', 'yyyy'),
NLS::getLangInfo(D_FMT)),
'time_format' => $prefs->getValue('twentyFour') ? 'HH:mm' : 'hh:mm tt',
+ 'status' => array('tentative' => self::STATUS_TENTATIVE,
+ 'confirmed' => self::STATUS_CONFIRMED,
+ 'cancelled' => self::STATUS_CANCELLED,
+ 'free' => self::STATUS_FREE),
// Turn debugging on?
'debug' => !empty($conf['js']['debug']),
);
'week' => str_replace('%d', '#{week}', _("Week %d")),
'agenda' => _("Agenda"),
'searching' => str_replace('%s', '#{term}', _("Events matching \"%s\"")),
- 'allday' => _("All-day"),
+ 'allday' => _("All day"),
);
for ($i = 1; $i <= 12; ++$i) {
$code['text']['month'][$i - 1] = NLS::getLangInfo(constant('MON_' . $i));
.kronolithHasEvents {
font-weight: bold;
}
+.kronolithMinical .kronolithIsBusy {
+ background-color: #fff760;
+}
/* Main view month */
#kronolithViewMonthContainer {