3 * Copyright(c) 2006-2010 Sencha Inc.
5 * http://www.sencha.com/license
8 * @class Ext.calendar.DayHeaderTemplate
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 the majority of the layout logic is deferred to an instance of
12 * {@link Ext.calendar.BoxLayoutTemplate}.</p>
13 * <p>This template is automatically bound to the underlying event store by the
14 * calendar components and expects records of type {@link Ext.calendar.EventRecord}.</p>
15 * <p>Note that this template would not normally be used directly. Instead you would use the {@link Ext.calendar.DayViewTemplate}
16 * that internally creates an instance of this template along with a {@link Ext.calendar.DayBodyTemplate}.</p>
18 * @param {Object} config The config object
20 Ext.calendar.DayHeaderTemplate = function(config){
22 Ext.apply(this, config);
24 this.allDayTpl = new Ext.calendar.BoxLayoutTemplate(config);
25 this.allDayTpl.compile();
27 Ext.calendar.DayHeaderTemplate.superclass.constructor.call(this,
28 '<div class="ext-cal-hd-ct">',
29 '<table class="ext-cal-hd-days-tbl" cellspacing="0" cellpadding="0">',
32 '<td class="ext-cal-gutter"></td>',
33 '<td class="ext-cal-hd-days-td"><div class="ext-cal-hd-ad-inner">{allDayTpl}</div></td>',
34 '<td class="ext-cal-gutter-rt"></td>',
42 Ext.extend(Ext.calendar.DayHeaderTemplate, Ext.XTemplate, {
43 applyTemplate : function(o){
44 return Ext.calendar.DayHeaderTemplate.superclass.applyTemplate.call(this, {
45 allDayTpl: this.allDayTpl.apply(o)
50 Ext.calendar.DayHeaderTemplate.prototype.apply = Ext.calendar.DayHeaderTemplate.prototype.applyTemplate;