Code:
public class TestingModule implements EntryPoint { public void onModuleLoad() { Timeline calendar = new Timeline(); calendar.setHeight(451); calendar.setStartDate(new Date(112, 5, 2)); calendar.setEndDate(new Date(112, 5, 22)); calendar.setShowEventDescriptions(false); calendar.setShowQuickEventDialog(false); calendar.setCanEditLane(false); HeaderLevel[] headerLevels = new HeaderLevel[]{ new HeaderLevel(TimeUnit.WEEK), new HeaderLevel(TimeUnit.DAY) }; calendar.setHeaderLevels(headerLevels); calendar.setLaneFields(new ListGridField[]{ new ListGridField("title", "Developer", 120)}); calendar.setLanes(TimelineLaneData.getRecords()); calendar.setData(TimelineData.getRecords()); calendar.draw(); } }
So it is impossible to create an event with these settings using the "+" button . Is this a bug?
So what to do here? Remove the + button ? (how?)
I created this testcase because of an exception when calling:
Code:
calendar.setEventEditorCustomizer(new EventEditorCustomizer() { @Override public boolean showEventEditor(final CalendarEvent calendarEvent, Boolean isNewEvent) { Integer eventId = calendarEvent.getAttributeAsInt("f_id"); if (eventId == null) { SC.logWarn("CalendarEvent: " + calendarEvent); SC.logWarn("Get Event Lane: " + calendar.getEventLane(calendarEvent)); SC.logWarn("Name: " + calendar.getEventLane(calendarEvent).getName()); AbwesenheitEventEditWindow w = new AbwesenheitEventEditWindow(AbwesenheitsplanungWindow.this, Optional.of(calendarEvent), getCalendar(), Optional.fromNullable((Record) null), calendar.getEventLane(calendarEvent).getName()); getCalendar().addChild(w); w.show(); } else { }
So, again, I would like to remove the + button in this case. Or what to do? What would you recommend?
Using power 6.0-p20161005
Comment