Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

CalendarMonthView do not respect baseCSSClassName of CalendarItem. #563

Closed
indrajitr opened this Issue · 4 comments

3 participants

@indrajitr
Owner

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.


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.

@github-importer

[[file:cnFSyQF1Cr36B1eJe5cbLr]]: Fix Calendar widget ignore the baseCSSClassname attribute of CalendarItem.

@github-importer

[[file:bEasWWF1Wr366SeJe5cbLA]]: Fix callback will not run after apply above patch.

@Shadowfiend
Owner

Don't know the latest state of this ticket, but if you run across it and it's still an issue, please file it on the liftmodules/widgets repository, as widgets are no longer in the main Lift repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.