3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>The source code</title>
5 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
6 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8 <body onload="prettyPrint();">
9 <pre class="prettyprint lang-js">/*!
10 * Ext JS Library 3.3.1
11 * Copyright(c) 2006-2010 Sencha Inc.
12 * licensing@sencha.com
13 * http://www.sencha.com/license
15 <div id="cls-Ext.calendar.DayHeaderView"></div>/**
16 * @class Ext.calendar.DayHeaderView
17 * @extends Ext.calendar.MonthView
18 * <p>This is the header area container within the day and week views where all-day events are displayed.
19 * Normally you should not need to use this class directly -- instead you should use {@link Ext.calendar.DayView DayView}
20 * which aggregates this class and the {@link Ext.calendar.DayBodyView DayBodyView} into the single unified view
21 * presented by {@link Ext.calendar.CalendarPanel CalendarPanel}.</p>
23 * @param {Object} config The config object
25 Ext.calendar.DayHeaderView = Ext.extend(Ext.calendar.MonthView, {
32 <div id="event-Ext.calendar.DayHeaderView-dayclick"></div>/**
34 * Fires after the user clicks within the day view container and not on an event element
35 * @param {Ext.calendar.DayBodyView} this
36 * @param {Date} dt The date/time that was clicked on
37 * @param {Boolean} allday True if the day clicked on represents an all-day box, else false. Clicks within the
38 * DayHeaderView always return true for this param.
39 * @param {Ext.Element} el The Element that was clicked on
43 afterRender: function() {
45 this.tpl = new Ext.calendar.DayHeaderTemplate({
47 showTodayText: this.showTodayText,
48 todayText: this.todayText,
49 showTime: this.showTime
53 this.addClass('ext-cal-day-header');
55 Ext.calendar.DayHeaderView.superclass.afterRender.call(this);
59 forceSize: Ext.emptyFn,
63 Ext.calendar.DayHeaderView.superclass.refresh.call(this);
64 this.recalcHeaderBox();
68 recalcHeaderBox: function() {
69 var tbl = this.el.child('.ext-cal-evt-tbl'),
72 this.el.setHeight(h + 7);
74 if (Ext.isIE && Ext.isStrict) {
75 this.el.child('.ext-cal-hd-ad-inner').setHeight(h + 4);
78 //TODO: figure out why Opera refuses to refresh height when
79 //the new height is lower than the previous one
80 // var ct = this.el.child('.ext-cal-hd-ct');
86 moveNext: function(noRefresh) {
87 this.moveDays(this.dayCount, noRefresh);
91 movePrev: function(noRefresh) {
92 this.moveDays( - this.dayCount, noRefresh);
96 onClick: function(e, t) {
97 var el = e.getTarget('td', 3),
101 if (el.id && el.id.indexOf(this.dayElIdDelimiter) > -1) {
102 parts = el.id.split(this.dayElIdDelimiter);
103 dt = parts[parts.length - 1];
105 this.fireEvent('dayclick', this, Date.parseDate(dt, 'Ymd'), true, Ext.get(this.getDayId(dt)));
109 Ext.calendar.DayHeaderView.superclass.onClick.apply(this, arguments);
113 Ext.reg('dayheaderview', Ext.calendar.DayHeaderView);