19 package org.turro.calendar;
21 import java.text.DateFormat;
22 import java.util.Collection;
23 import java.util.Date;
24 import org.amic.util.date.CheckDate;
25 import org.turro.string.Strings;
26 import org.turro.auth.Authentication;
27 import org.turro.calendar.event.CalendarEventSet;
28 import org.turro.elephant.context.Application;
29 import org.turro.i18n.I_;
30 import org.turro.plugin.calendar.ICalendarEvent;
31 import org.turro.plugin.command.CalendarPlugin;
32 import org.turro.zkoss.input.CollectionListbox;
33 import org.zkoss.zul.Listhead;
34 import org.zkoss.zul.Listheader;
35 import org.zkoss.zul.Listitem;
44 private Listitem firstTodo;
51 new CheckDate(now).addMonths(-3).getDate(),
52 new CheckDate(now).addMonths(1).getDate());
55 if(firstTodo !=
null) {
56 setSelectedItem(firstTodo);
66 Strings.truncateAndWarn(v.
getContent(), 50).replaceAll(
"\\n", SUBITEM_SEPARATOR);
72 li.setStyle(
"vertical-align:top;color:" + ce.
getHeaderColor() +
";");
74 li.setSclass(
"invalid");
75 li.setStyle(li.getStyle() +
"background-color:#ddd;");
76 }
else if(firstTodo ==
null) {
85 if(firstTodo !=
null) {
86 setSelectedItem(firstTodo);
90 private void addHeaders() {
91 if(getListhead() !=
null)
return;
92 Listhead lh =
new Listhead();
94 lh.appendChild(
new Listheader(
I_.
get(
"Date"),
null,
"100px"));
95 lh.appendChild(
new Listheader(
I_.
get(
"Description")));
static IContact getIContact()
void beforeAppend(Listitem li)
String convertToString(ICalendarEvent v)
static Locale getUsedLocale()
static String get(String msg)
static Collection< Object > getCalendarFor(IContact contact, Date from, Date to)