Browse Source

some fixes. kill hasDayInteractions

Adam Shaw 8 years ago
parent
commit
93ab50ee2d

+ 2 - 7
src/component/CoordChronoComponentMixin.js

@@ -11,9 +11,6 @@ var CoordChronoComponentMixin = {
 
 
 	hitsNeededDepth: 0, // necessary because multiple callers might need the same hits
 	hitsNeededDepth: 0, // necessary because multiple callers might need the same hits
 
 
-	// self-config, overridable by subclasses
-	hasDayInteractions: true, // can user click/select ranges of time?
-
 	dragListeners: null,
 	dragListeners: null,
 
 
 	eventPointingClass: EventPointing,
 	eventPointingClass: EventPointing,
@@ -69,10 +66,8 @@ var CoordChronoComponentMixin = {
 	setElement: function(el) {
 	setElement: function(el) {
 		ChronoComponent.prototype.setElement.apply(this, arguments);
 		ChronoComponent.prototype.setElement.apply(this, arguments);
 
 
-		if (this.hasDayInteractions) {
-			new DateClicking(this).bindToEl(this.el);
-			new DateSelecting(this).bindToEl(this.el);
-		}
+		new DateClicking(this).bindToEl(this.el);
+		new DateSelecting(this).bindToEl(this.el);
 
 
 		this.eventPointing = new this.eventPointingClass(this);
 		this.eventPointing = new this.eventPointingClass(this);
 		this.eventDragging = new this.eventDraggingClass(this);
 		this.eventDragging = new this.eventDraggingClass(this);

+ 1 - 1
src/component/interaction/DateClicking.js

@@ -14,7 +14,7 @@ var DateClicking = Class.extend({
 		- getHitEl
 		- getHitEl
 	*/
 	*/
 	constructor: function(component) {
 	constructor: function(component) {
-		this.view = component.view;
+		this.view = component._getView();
 		this.component = component;
 		this.component = component;
 
 
 		this.dragListener = this.buildDragListener();
 		this.dragListener = this.buildDragListener();

+ 1 - 1
src/component/interaction/DateSelecting.js

@@ -16,7 +16,7 @@ var DateSelecting = Class.extend({
 	*/
 	*/
 	constructor: function(component) {
 	constructor: function(component) {
 		this.component = component;
 		this.component = component;
-		this.view = component.view;
+		this.view = component._getView();
 
 
 		this.dragListener = this.buildDragListener();
 		this.dragListener = this.buildDragListener();
 		component.registerDragListener(this.dragListener);
 		component.registerDragListener(this.dragListener);

+ 1 - 8
src/component/interaction/EventPointing.js

@@ -11,15 +11,8 @@ var EventPointing = Class.extend({
 		- publiclyTrigger
 		- publiclyTrigger
 	*/
 	*/
 	constructor: function(component) {
 	constructor: function(component) {
-		this.view = component.view;
+		this.view = component._getView();
 		this.component = component;
 		this.component = component;
-
-		this.bind();
-	},
-
-
-	bind: function() {
-		this.bindToEl(this.component.el);
 	},
 	},
 
 
 
 

+ 1 - 1
src/component/interaction/ExternalDropping.js

@@ -18,7 +18,7 @@ var ExternalDropping = Class.extend(ListenerMixin, {
 		- unrenderDrag
 		- unrenderDrag
 	*/
 	*/
 	constructor: function(component) {
 	constructor: function(component) {
-		this.view = component.view;
+		this.view = component._getView();
 		this.component = component;
 		this.component = component;
 	},
 	},
 
 

+ 0 - 1
src/list/ListView.js

@@ -12,7 +12,6 @@ var ListView = View.extend(CoordChronoComponentMixin, SegChronoComponentMixin, {
 	dayDates: null, // localized ambig-time moment array
 	dayDates: null, // localized ambig-time moment array
 	dayRanges: null, // UnzonedRange[], of start-end of each day
 	dayRanges: null, // UnzonedRange[], of start-end of each day
 	segSelector: '.fc-list-item', // which elements accept event actions
 	segSelector: '.fc-list-item', // which elements accept event actions
-	hasDayInteractions: false, // no day selection or day clicking
 
 
 
 
 	initialize: function() {
 	initialize: function() {