final AppointmentDialog dialog = new AppointmentDialog("appointment", WebSession.getString(815)
, this, new CompoundPropertyModel<Appointment>(getDefault()));
add(dialog);
Options options = new Options();
options.set("header", "{left: 'prevYear,prev,next,nextYear today', center: 'title', right: 'month,agendaWeek,agendaDay'}");
options.set("allDaySlot", false);
options.set("axisFormat", "'HH(:mm)'");
options.set("defaultEventMinutes", 60);
options.set("timeFormat", "{agenda: 'HH:mm{ - HH:mm}', '': 'HH(:mm)'}");
options.set("buttonText", "{month: '" + WebSession.getString(801) +
"', week: '" + WebSession.getString(800) +
"', day: '" + WebSession.getString(799) +
"', today: '" + WebSession.getString(1555) +
"'}");
JSONArray monthes = new JSONArray();
JSONArray shortMonthes = new JSONArray();
JSONArray days = new JSONArray();
JSONArray shortDays = new JSONArray();
try {
// first week day must be Sunday
days.put(0, WebSession.getString(466));
shortDays.put(0, WebSession.getString(459));
for (int i=0; i < 12; i++){
monthes.put(i, WebSession.getString(469 + i));
shortMonthes.put(i, WebSession.getString(1556 + i));
if (i+1 < 7){
days.put(i+1, WebSession.getString(460 + i));
shortDays.put(i+1, WebSession.getString(453 + i));
}
}
} catch (JSONException e) {
log.error("Unexpected error while creating label lists", e);
}
options.set("monthNames", monthes.toString());
options.set("monthNamesShort", shortMonthes.toString());
options.set("dayNames", days.toString());
options.set("dayNamesShort", shortDays.toString());
calendar = new Calendar("calendar", new AppointmentModel(), options) {
private static final long serialVersionUID = 8442068089963449950L;
@Override