 
 
   $scope.isNotClassEvent = (event) ->
-    if event.isClassEvent
+    if typeof event == Parse.Object.extend("Invite") or event.isClassEvent
       return false
     return true
 

    2. get the event they wanted to save
    3. save user's event in parse
    ###
    console.log('you just tried to save an event!')

    Event = Parse.Object.extend('Event')
    parseEvent = new Event




  # Add accepted invites to the calendar
  inviteList = currUser.get('Invite')
  Invite = Parse.Object.extend('Invite')
  inviteQuery = new Parse.Query(Invite)
  if inviteList
    k = 0
    while k < inviteList.length
      inviteMap = inviteList[k]
      if !inviteMap.pending
        inviteQuery.get(inviteMap.inviteId, {
          success: (invite) ->
            inviteArray = []

            endDate = invite.get 'eventDate'
            endDate.setHours(endDate.getHours() + 1)

            # FORMAT indEventsArray['$SCOPE_VAR'] = oneIndEvent.get 'PARSE_VAR'
            inviteArray['title'] = invite.get('eventTitle')
            inviteArray['location'] = invite.get 'location'
            inviteArray['message'] = invite.get 'description'
            inviteArray['type'] = "info"
            inviteArray['startsAt'] = invite.get 'eventDate'
            inviteArray['endsAt'] = endDate
            inviteArray['objId'] = invite.id
            inviteArray['isClassEvent'] = true

            masterIndEventsArray.push inviteArray
        })
      k++
    $scope.events = masterIndEventsArray
    $scope.$apply()

  init = ->
    $scope.email = Parse.User.current().getUsername()
