Sha256: f6fbb96cdc8864acc6e61adfd169742a331f41bbbdd50b1a781b0000ca83d51b

Contents?: true

Size: 388 Bytes

Versions: 12

Compression:

Stored size: 388 Bytes

Contents

class CalendarEvent extends Spine.Model
  @configure 'CalendarEvent', 'held_on', 'active', 'element'

  @activateAllEventsOn: (date) ->
    for event in CalendarEvent.findAllByAttribute('held_on', date)
      event.updateAttributes(active: true)

  @deactivateAllEvents: () ->
    CalendarEvent.each((event) -> event.updateAttributes(active: false))

window.CalendarEvent = CalendarEvent

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
event_cal-2.0.2 vendor/assets/javascripts/models/calendarEvent.js.coffee
event_cal-2.0.1 vendor/assets/javascripts/models/calendarEvent.js.coffee
event_cal-2.0.0 vendor/assets/javascripts/models/calendarEvent.js.coffee
event_cal-1.3.0 vendor/assets/javascripts/models/calendarEvent.js.coffee
event_cal-1.2.5 vendor/assets/javascripts/models/calendarEvent.js.coffee
event_cal-1.2.4 vendor/assets/javascripts/models/calendarEvent.js.coffee
event_cal-1.2.3 vendor/assets/javascripts/models/calendarEvent.js.coffee
event_cal-1.2.2 vendor/assets/javascripts/models/calendarEvent.js.coffee
event_cal-1.2.1 vendor/assets/javascripts/models/calendarEvent.js.coffee
event_cal-1.2 vendor/assets/javascripts/models/calendarEvent.js.coffee
event_cal-1.1 vendor/assets/javascripts/models/calendarEvent.js.coffee
event_cal-1.0 vendor/assets/javascripts/models/calendarEvent.js.coffee