CalendarMonthView do not respect baseCSSClassName of CalendarItem.
When using CalendarMonthView like the following code, the calendar widget will not respect the baseCSSClassName attribute, the CalendarItem is always use "calendarItem" as their CSS class.
It's caused by calendarviews.js hard coded the css class to be "calendarItem" when adding CalendarItem to CalendarView.
I've created a patch to fix this problem.
class MySnippet {
def test (xhtml: NodeSeq) = {
val c = Calendar.getInstance
val meta = MonthViewMeta (Calendar.SUNDAY, Locale.getDefault)
c.set (2010, 0, 0)
val tt = CalendarMonthView (c, meta, cals, Empty, Empty, Empty)
println (tt)
bind ("cal", xhtml, "widget" -> tt)
}
def cals = {
val c1 = Calendar.getInstance
val c2 = Calendar.getInstance
c1.set (2010, 0, 5, 10, 0)
c2.set (2010, 0, 6, 10, 0)
val calitem1 = CalendarItem ("4", c1, CalendarType.MEETING).
optional (
_.subject ("Red Item"),
_.description ("Background should be read")
)
val calitem2 = CalendarItem ("5", c2, CalendarType.MEETING).
optional (
_.subject ("Green Item"),
_.description ("Background should be green"),
_.baseCSSClassName ("greenItem")
)
List (calitem1, calitem2)
}
}
It's caused by calendarviews.js hard coded the css class to be "calendarItem" when adding CalendarItem to CalendarView.
I've created a patch to fix this problem.
Leave a comment
on 2010-06-24 16:13 *
By brianhsu
Attachment 0001-Fix-Calendar-widget-do-not-respect-baseCSSClassname.patch added
file:cnFSyQF1Cr36B1eJe5cbLr: Fix Calendar widget ignore the baseCSSClassname attribute of CalendarItem.
on 2010-06-24 16:47 *
By brianhsu
Attachment 0002-Fix-callback-will-not-run-on-CalendarItem-if-cssClas.patch added
file:bEasWWF1Wr366SeJe5cbLA: Fix callback will not run after apply above patch.