 		$scope.$meteorCollection(share.Events).save(e).then (inserts) ->
 			e = _.first(inserts)
 			console.log "inserted new event with id: #{e._id}"
-			console.log e
-			updateEvents()
 ]

				left: 'title'
				center: ''
				right: 'today prev,next'

	updateEvents()

	# stuff for datepicker
	$scope.newDateFrom = new Date()

angular.module('app').controller 'calendarCtrl', ['$scope', '$meteor', '$window', ($scope, $meteor, $window) ->
	$scope.newEventType = 'CLOSED'

	# stuff for calendar
	closedEvents = 
		textColor: '#fff'
		color: '#D46A6A'
		events: $scope.$meteorCollection () -> share.Events.find {type: 'CLOSED'}
	eventEvents = 
		textColor: '#fff'
		color: '#A5C663'
		events: $scope.$meteorCollection () -> share.Events.find {type: 'EVENT'}
	jubiEvents = 
		textColor: '#fff'
		color: '#699'
		events: $scope.$meteorCollection () -> share.Events.find {type: 'JUBI'}

	$scope.eventSources = [closedEvents, eventEvents, jubiEvents]
	$scope.calendarConfig =
		calendar:
