Просмотр исходного кода

pass dateProfile to renderDates

Adam Shaw 8 лет назад
Родитель
Сommit
f156a76ad8
5 измененных файлов с 7 добавлено и 8 удалено
  1. 2 2
      src/View.js
  2. 1 1
      src/agenda/AgendaView.js
  3. 1 1
      src/agenda/TimeGrid.js
  4. 1 2
      src/basic/BasicView.js
  5. 2 2
      src/component/DateComponent.js

+ 2 - 2
src/View.js

@@ -281,8 +281,8 @@ var View = FC.View = InteractiveDateComponent.extend({
 			this.render(); // TODO: deprecate
 		}
 
-		this.renderDates();
-		this.updateSize();
+		this.renderDates(dateProfile);
+		this.updateSize(); // TODO: queue up somehow
 		this.startNowIndicator();
 
 		if (!skipScroll) {

+ 1 - 1
src/agenda/AgendaView.js

@@ -65,7 +65,7 @@ var AgendaView = FC.AgendaView = View.extend({
 
 
 	// Renders the view into `this.el`, which has already been assigned
-	renderDates: function() {
+	renderDates: function(dateProfile) {
 
 		this.el.addClass('fc-agenda-view').html(this.renderSkeletonHtml());
 		this.renderHead();

+ 1 - 1
src/agenda/TimeGrid.js

@@ -180,7 +180,7 @@ var TimeGrid = FC.TimeGrid = InteractiveDateComponent.extend(StandardInteraction
 
 	// Renders the time grid into `this.el`, which should already be assigned.
 	// Relies on the view's colCnt. In the future, this component should probably be self-sufficient.
-	renderDates: function() {
+	renderDates: function(dateProfile) {
 		this.el.html(this.renderHtml());
 		this.colEls = this.el.find('.fc-day, .fc-disabled-day');
 		this.slatContainerEl = this.el.find('.fc-slats');

+ 1 - 2
src/basic/BasicView.js

@@ -65,8 +65,7 @@ var BasicView = FC.BasicView = View.extend({
 
 
 	// Renders the view into `this.el`, which should already be assigned
-	renderDates: function() {
-		var dateProfile = this.get('dateProfile');
+	renderDates: function(dateProfile) {
 
 		this.dayGrid.breakOnWeeks = /year|month|week/.test(dateProfile.currentRangeUnit);
 

+ 2 - 2
src/component/DateComponent.js

@@ -108,7 +108,7 @@ var DateComponent = Component.extend({
 
 
 	executeDateRender: function(dateProfile, skipScroll) { // wrapper
-		this.renderDates();
+		this.renderDates(dateProfile);
 	},
 
 
@@ -118,7 +118,7 @@ var DateComponent = Component.extend({
 
 
 	// date-cell content only
-	renderDates: function() {
+	renderDates: function(dateProfile) {
 		// subclasses should implement
 	},