Adam Shaw 8 лет назад
Родитель
Сommit
d64e3f5a4a
3 измененных файлов с 5 добавлено и 18 удалено
  1. 0 15
      src/models/EventInstanceChangeset.js
  2. 4 2
      src/models/EventInstanceRepo.js
  3. 1 1
      src/models/EventPeriod.js

+ 0 - 15
src/models/EventInstanceChangeset.js

@@ -1,15 +0,0 @@
-
-var EventInstanceChangeset = EventInstanceRepo.extend({
-
-	removals: null,
-
-
-	constructor: function(removals, adds) {
-		EventInstanceRepo.call(this);
-
-		this.removals = removals || [];
-
-		(adds || []).forEach(this.addEventInstance.bind(this));
-	}
-
-});

+ 4 - 2
src/models/EventInstanceRepo.js

@@ -1,10 +1,12 @@
 
-var EventInstanceRepo = Class.extend({
+var EventInstanceChangeset = Class.extend({
 
+	removals: null,
 	byDefId: null,
 
 
-	constructor: function() {
+	constructor: function(removals, adds) {
+		this.removals = removals || [];
 		this.byDefId = {};
 	},
 

+ 1 - 1
src/models/EventPeriod.js

@@ -31,7 +31,7 @@ var EventPeriod = Class.extend(EmitterMixin, {
 		this.requestsByUid = {};
 		this.eventDefsByUid = {};
 		this.eventDefsById = {};
-		this.instanceRepo = new EventInstanceRepo();
+		this.instanceRepo = new EventInstanceChangeset();
 	},