Wicket FullCalendar和Bootstrap各有一个版本

时间:2015-03-04 15:53:51

标签: jquery twitter-bootstrap fullcalendar wicket

我正在尝试使用最新的Wicket FullCalendar 2.3代码,但我在启动时遇到了javascript错误。

Uncaught TypeError: undefined is not a function CalendarPage?0:139 
(anonymous function)jquery.min.js:2 
n.Callbacks.jjquery.min.js:2 
n.Callbacks.k.fireWithjquery.min.js:2 
n.extend.readyjquery.min.js:2

我正在使用带有fullcalendar代码的jquery以及用于其他UI组件的最新版本的bootstrap 3.3.2。

我遇到版本错误。 Bootstrap需要jquery 1.9或更高版本,但fullcalendar需要1.8。我在它们之间来回切换,但错误并没有自行解决。

那里有兼容的版本吗?

Config config = new Config();
        config.setSelectable(true);
        config.setSelectHelper(false);

        EventSource reservations = new EventSource();
        reservations.setTitle("Reservations");
        reservations
                .setEventsProvider(new RandomEventsProvider("Reservation "));
        reservations.setEditable(true);
        reservations.setBackgroundColor("#63BA68");
        reservations.setBorderColor("#63BA68");
        config.add(reservations);

        EventSource downtimes = new EventSource();
        downtimes.setTitle("Maintenance");
        downtimes.setBackgroundColor("#B1ADAC");
        downtimes.setBorderColor("#B1ADAC");
        downtimes.setEventsProvider(new RandomEventsProvider("Maintenance "));
        config.add(downtimes);

        EventSource other = new EventSource();
        other.setTitle("Other Reservations");
        other.setBackgroundColor("#E6CC7F");
        other.setBorderColor("#E6CC7F");
        other.setEventsProvider(new RandomEventsProvider("Other Reservations "));
        config.add(other);

        config.getHeader().setLeft("prev,next today");
        config.getHeader().setCenter("title");
        config.getHeader().setRight("month,agendaWeek");

        config.setLoading("function(bool) { if (bool) $(\"#loading\").show(); else $(\"#loading\").hide(); }");

        config.setWeekends(false);
        config.setMinTime(new LocalTime(6, 30));
        config.setMaxTime(new LocalTime(17, 30));
        config.setAllDaySlot(false);
        FullCalendar calendar = new FullCalendar("cal", config) {

            @Override
            protected void onViewDisplayed(View view, CalendarResponse response) {

                info("View displayed. viewType: " + view.getType().name()
                        + ", start: " + view.getStart() + ", end: "
                        + view.getEnd());
                response.getTarget().add(feedback);
            }
        };
        calendar.setMarkupId("calendar");
        add(calendar);
        add(new EventSourceSelector("selector", calendar));

0 个答案:

没有答案