cubicweb.calendar.js¶
- This file contains Calendar utilities
- organization
Logilab
- copyright
2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
- contact
- class cubicweb.calendar.js.Calendar¶
Calendar (graphical) widget
public methods are :
- __init__ :
containerId
: the DOM node's ID where the calendar will be displayedinputId
: which input needs to be updated when a date is selectedyear
,month
: year and month to be displayedcssclass
: CSS class of the calendar widget (default is 'commandCal')- show() / hide():
show or hide the calendar widget
- toggle():
show (resp. hide) the calendar if it's hidden (resp. displayed)
- displayNextMonth(): (resp. displayPreviousMonth())
update the calendar to display next (resp. previous) month
- Calendar._uppercaseFirst(s)¶
utility function (the only use for now is inside the calendar)
- Calendar._domForRows(rows)¶
accepts the cells data and builds the corresponding TR nodes
rows, a list of list of couples (daynum, cssprops)
- Calendar._headdisplay(row)¶
builds the calendar headers
- Calendar.REGISTRY¶
keep track of each calendar created
- cubicweb.calendar.js.toggleCalendar(containerId, inputId, year, month)¶
popup / hide calendar associated to containerId
- cubicweb.calendar.js.toggleNextMonth(containerId)¶
ask for next month to calendar displayed in containerId
- cubicweb.calendar.js.togglePreviousMonth(containerId)¶
ask for previous month to calendar displayed in containerId
- cubicweb.calendar.js.dateSelected(cell, containerId)¶
callback called when the user clicked on a cell in the popup calendar