Parcourir la source

hook for manipulating event data

Adam Shaw il y a 9 ans
Parent
commit
381a260637
2 fichiers modifiés avec 9 ajouts et 1 suppressions
  1. 8 0
      src/EventManager.js
  2. 1 1
      src/main.js

+ 8 - 0
src/EventManager.js

@@ -517,6 +517,8 @@ function EventManager(options) { // assumed to be a calendar
 			assignDatesToEvent(start, end, allDay, out);
 		}
 
+		t.normalizeEvent(out); // hook for external use. a prototype method
+
 		return out;
 	}
 
@@ -1049,6 +1051,12 @@ function EventManager(options) { // assumed to be a calendar
 }
 
 
+// hook for external libs to manipulate event properties upon creation.
+// should manipulate the event in-place.
+Calendar.prototype.normalizeEvent = function(event) {
+};
+
+
 // Returns a list of events that the given event should be compared against when being considered for a move to
 // the specified span. Attached to the Calendar's prototype because EventManager is a mixin for a Calendar.
 Calendar.prototype.getPeerEvents = function(span, event) {

+ 1 - 1
src/main.js

@@ -1,7 +1,7 @@
 
 var FC = $.fullCalendar = {
 	version: "<%= meta.version %>",
-	internalApiVersion: 3
+	internalApiVersion: 4
 };
 var fcViews = FC.views = {};