2013-01-07 16:45:48 +01:00
|
|
|
.schedule-content
|
2013-01-11 15:00:54 +01:00
|
|
|
%h2
|
|
|
|
|
= "Schedule for #{@conference.title}"
|
|
|
|
|
#unscheduled.unscheduled
|
|
|
|
|
.unscheduled-header
|
|
|
|
|
Unscheduled Events
|
|
|
|
|
#schedule.schedule
|
|
|
|
|
.schedule-dates-header
|
|
|
|
|
%ul#date-tabs
|
2013-01-07 16:45:48 +01:00
|
|
|
- @dates.each do |date|
|
2013-01-11 15:00:54 +01:00
|
|
|
%li.date-selector
|
2014-06-12 19:49:54 +03:00
|
|
|
= link_to "#{date}", "#", id: "#{date}-selector", onclick: "Schedule.changeDay('#{date}')"
|
2013-01-11 15:00:54 +01:00
|
|
|
.schedule-rooms-container
|
|
|
|
|
= render 'day_tab'
|
2013-01-07 16:45:48 +01:00
|
|
|
|
|
|
|
|
:javascript
|
|
|
|
|
$(document).ready( function() {
|
2013-01-11 15:00:54 +01:00
|
|
|
//Schedule.loadDaysAndTracks("#{@conference.short_title}");
|
|
|
|
|
var conference = "#{@conference.short_title}"
|
|
|
|
|
Schedule.loadEvents("#{@conference.short_title}", "#{@dates.first}");
|
|
|
|
|
$('.schedule-room-slot').droppable({
|
|
|
|
|
accept: '.schedule-event',
|
|
|
|
|
tolerance: "pointer",
|
|
|
|
|
drop: function(event, ui) {
|
|
|
|
|
$(ui.draggable).appendTo(this);
|
|
|
|
|
var myId = $(ui.draggable).attr("guid");
|
|
|
|
|
var myRoom = $(this).attr("room-guid")
|
|
|
|
|
var myDate = $(this).attr("date");
|
|
|
|
|
var myTime = $(this).attr("hour");
|
|
|
|
|
var length = $(ui.draggable).attr("length");
|
|
|
|
|
$(ui.draggable).css("left", 0);
|
|
|
|
|
$(ui.draggable).css("top", 0);
|
|
|
|
|
$(this).css("background-color", "#ffffff");
|
|
|
|
|
|
|
|
|
|
// 15 minute slots on the schedule are 30px,
|
|
|
|
|
// thus the magic multiplier here
|
|
|
|
|
$(ui.draggable).height(length * 2 - 7);
|
|
|
|
|
$(ui.draggable).width($(this).width() - 10);
|
|
|
|
|
Schedule.save(conference, myId, myRoom, myDate, myTime);
|
|
|
|
|
},
|
|
|
|
|
over: function(event, ui) {
|
|
|
|
|
$(this).css("background-color", "#009ED8");
|
|
|
|
|
},
|
|
|
|
|
out: function(event, ui) {
|
|
|
|
|
$(this).css("background-color", "#ffffff");
|
|
|
|
|
}
|
|
|
|
|
});
|
2013-01-07 16:45:48 +01:00
|
|
|
});
|