3 * Copyright(c) 2006-2010 Ext JS, Inc.
5 * http://www.extjs.com/license
8 * @class Ext.calendar.DayViewTemplate
9 * @extends Ext.XTemplate
10 * <p>This is the template used to render the all-day event container used in {@link Ext.calendar.DayView DayView} and
11 * {@link Ext.calendar.WeekView WeekView}. Internally this class simply defers to instances of {@link Ext.calerndar.DayHeaderTemplate}
12 * and {@link Ext.calerndar.DayBodyTemplate} to perform the actual rendering logic, but it also provides the overall calendar view
13 * container that contains them both. As such this is the template that should be used when rendering day or week views.</p>
14 * <p>This template is automatically bound to the underlying event store by the
15 * calendar components and expects records of type {@link Ext.calendar.EventRecord}.</p>
17 * @param {Object} config The config object
19 Ext.calendar.DayViewTemplate = function(config){
21 Ext.apply(this, config);
23 this.headerTpl = new Ext.calendar.DayHeaderTemplate(config);
24 this.headerTpl.compile();
26 this.bodyTpl = new Ext.calendar.DayBodyTemplate(config);
27 this.bodyTpl.compile();
29 Ext.calendar.DayViewTemplate.superclass.constructor.call(this,
30 '<div class="ext-cal-inner-ct">',
37 Ext.extend(Ext.calendar.DayViewTemplate, Ext.XTemplate, {
39 applyTemplate : function(o){
40 return Ext.calendar.DayViewTemplate.superclass.applyTemplate.call(this, {
41 headerTpl: this.headerTpl.apply(o),
42 bodyTpl: this.bodyTpl.apply(o)
47 Ext.calendar.DayViewTemplate.prototype.apply = Ext.calendar.DayViewTemplate.prototype.applyTemplate;