Do not use JS to initialize the schedule

- Only use JS for the drag&drop functionality and to the set/alter the time and rooms of the EventSchedule object.

- Introduce has_many :events, through: :event_schedules association to get unscheduled event easily
This commit is contained in:
Ana 2016-07-31 18:41:27 +02:00
parent 71dab6b79c
commit a394293500
12 changed files with 66 additions and 125 deletions

View file

@ -17,6 +17,8 @@
.h4
Unscheduled events
.unscheduled-events
- @unscheduled_events.each do |e|
= render partial: 'event', locals: { event: e }
.col-md-10
%ul.nav.nav-tabs
- @dates.each do |date|
@ -30,5 +32,5 @@
:javascript
$(document).ready( function() {
Schedule.loadEvents("#{@conference.short_title}", "#{@schedule_id}");
Schedule.initialize("#{@conference.short_title}", "#{@schedule_id}");
});