# HG changeset patch # User Laura Médioni # Date 1395066107 -3600 # Node ID 5213dfe9cddb7cf967d58b4b21774f946c9b24c2 # Parent 6bc480ec5665ef704014ac168620d038248ed701 Enables css customization in CalendarView now a custom css class can be set on the calendar div (closes #3654043). diff -r 6bc480ec5665 -r 5213dfe9cddb cubicweb/web/views/calendar.py --- a/cubicweb/web/views/calendar.py Thu Sep 17 12:47:39 2015 +0200 +++ b/cubicweb/web/views/calendar.py Mon Mar 17 15:21:47 2014 +0100 @@ -184,13 +184,16 @@ }, } - def call(self): + def call(self, cssclass=""): self._cw.add_css(('fullcalendar.css', 'cubicweb.calendar.css')) self._cw.add_js(('jquery.ui.js', 'fullcalendar.min.js', 'jquery.qtip.min.js', 'fullcalendar.locale.js')) self.calendar_id = 'cal' + make_uid('uid') self.add_onload() # write calendar div to load jquery fullcalendar object - self.w(u'
' % self.calendar_id) + if cssclass: + self.w(u'
' % (cssclass, self.calendar_id)) + else: + self.w(u'
' % (cssclass, self.calendar_id)) def add_onload(self): fullcalendar_options = self.fullcalendar_options.copy()