|
|
@@ -13,6 +13,7 @@ var BasicView = View.extend({
|
|
|
|
|
|
weekNumberWidth: null, // width of all the week-number cells running down the side
|
|
|
|
|
|
+ headContainerEl: null, // div that hold's the dayGrid's rendered date header
|
|
|
headRowEl: null, // the fake row element of the day-of-week header
|
|
|
|
|
|
|
|
|
@@ -58,18 +59,25 @@ var BasicView = View.extend({
|
|
|
this.weekNumbersVisible = this.opt('weekNumbers');
|
|
|
this.dayGrid.numbersVisible = this.dayNumbersVisible || this.weekNumbersVisible;
|
|
|
|
|
|
- this.el.addClass('fc-basic-view').html(this.renderHtml());
|
|
|
-
|
|
|
- this.headRowEl = this.el.find('thead .fc-row');
|
|
|
+ this.el.addClass('fc-basic-view').html(this.renderSkeletonHtml());
|
|
|
+ this.renderHead();
|
|
|
|
|
|
this.scrollerEl = this.el.find('.fc-day-grid-container');
|
|
|
- this.dayGrid.coordMap.containerEl = this.scrollerEl; // constrain clicks/etc to the dimensions of the scroller
|
|
|
|
|
|
this.dayGrid.setElement(this.el.find('.fc-day-grid'));
|
|
|
this.dayGrid.renderDates(this.hasRigidRows());
|
|
|
},
|
|
|
|
|
|
|
|
|
+ // render the day-of-week headers
|
|
|
+ renderHead: function() {
|
|
|
+ this.headContainerEl =
|
|
|
+ this.el.find('.fc-head-container')
|
|
|
+ .html(this.dayGrid.getHeadHtml());
|
|
|
+ this.headRowEl = this.headContainerEl.find('.fc-row');
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
// Unrenders the content of the view. Since we haven't separated skeleton rendering from date rendering,
|
|
|
// always completely kill the dayGrid's rendering.
|
|
|
unrenderDates: function() {
|
|
|
@@ -85,14 +93,12 @@ var BasicView = View.extend({
|
|
|
|
|
|
// Builds the HTML skeleton for the view.
|
|
|
// The day-grid component will render inside of a container defined by this HTML.
|
|
|
- renderHtml: function() {
|
|
|
+ renderSkeletonHtml: function() {
|
|
|
return '' +
|
|
|
'<table>' +
|
|
|
'<thead class="fc-head">' +
|
|
|
'<tr>' +
|
|
|
- '<td class="' + this.widgetHeaderClass + '">' +
|
|
|
- this.dayGrid.headHtml() + // render the day-of-week headers
|
|
|
- '</td>' +
|
|
|
+ '<td class="fc-head-container ' + this.widgetHeaderClass + '"></td>' +
|
|
|
'</tr>' +
|
|
|
'</thead>' +
|
|
|
'<tbody class="fc-body">' +
|