Browse Source

those wrappers not all necessary

Adam Shaw 8 năm trước cách đây
mục cha
commit
16494c3eb8
1 tập tin đã thay đổi với 4 bổ sung24 xóa
  1. 4 24
      src/component/DateComponent.js

+ 4 - 24
src/component/DateComponent.js

@@ -122,16 +122,6 @@ var DateComponent = Component.extend({
 	},
 
 
-	requestDateRender: function(dateProfile) {
-		this.requestRender('date', 'init', this.executeDateRender, [ dateProfile ]);
-	},
-
-
-	requestDateUnrender: function() {
-		this.requestRender('date', 'destroy', this.executeDateUnrender);
-	},
-
-
 	executeDateRender: function(dateProfile, skipScroll) { // wrapper
 		this.renderDates(dateProfile);
 	},
@@ -293,16 +283,6 @@ var DateComponent = Component.extend({
 	// rendering
 
 
-	requestEventsRender: function(eventsPayload) {
-		this.requestRender('event', 'init', this.executeEventsRender, [ eventsPayload ]);
-	},
-
-
-	requestEventsUnrender: function() {
-		this.requestRender('event', 'destroy', this.executeEventsUnrender);
-	},
-
-
 	executeEventsRender: function(eventsPayload) { // wrapper
 		this.renderEventsPayload(eventsPayload);
 	},
@@ -744,9 +724,9 @@ DateComponent.watch('businessHoursInChildren', [ 'businessHours' ], function(dep
 
 
 DateComponent.watch('displayingDates', [ 'dateProfile' ], function(deps) {
-	this.requestDateRender(deps.dateProfile);
+	this.requestRender('date', 'init', this.executeDateRender, [ deps.dateProfile ]);
 }, function() {
-	this.requestDateUnrender();
+	this.requestRender('date', 'destroy', this.executeDateUnrender);
 });
 
 
@@ -759,7 +739,7 @@ DateComponent.watch('displayingBusinessHours', [ 'displayingDates', 'businessHou
 
 DateComponent.watch('displayingEvents', [ 'displayingDates', 'hasEvents' ], function() {
 	// pass currentEvents in case there were event mutations after initialEvents
-	this.requestEventsRender(this.get('currentEvents'));
+	this.requestRender('event', 'init', this.executeEventsRender, [ this.get('currentEvents') ]);
 }, function() {
-	this.requestEventsUnrender();
+	this.requestRender('event', 'destroy', this.executeEventsUnrender);
 });