can put in multiple days for end show, checks show_end epoch.

working on moving shows
This commit is contained in:
naomiaro 2010-12-09 14:33:34 -05:00
parent 8b404f3c62
commit 6ff92ee7b3
5 changed files with 118 additions and 76 deletions

View file

@ -113,13 +113,34 @@ function eventMouseout(event, jsEvent, view) {
}
function eventDrop(event, dayDelta, minuteDelta, allDay, revertFunc, jsEvent, ui, view) {
var x;
var url;
url = '/Schedule/move-show/format/json';
$.post(url,
{day: dayDelta, min: minuteDelta, showId: event.id},
function(json){
if(json.error) {
revertFunc();
}
});
}
function eventResize( event, dayDelta, minuteDelta, revertFunc, jsEvent, ui, view ) {
var x;
}
function openShowDialog() {
var url;
url = '/Schedule/add-show-dialog/format/json';
$.get(url, function(json){
var dialog = makeShowDialog(json.form);
dialog.dialog('open');
});
}
$(document).ready(function() {
$('#schedule_calendar').fullCalendar({
@ -130,6 +151,7 @@ $(document).ready(function() {
},
defaultView: 'agendaDay',
editable: false,
allDaySlot: false,
events: function(start, end, callback) {
var url, start_date, end_date;
@ -170,17 +192,7 @@ $(document).ready(function() {
})
$('#schedule_add_show').click(function() {
var url;
url = '/Schedule/add-show-dialog/format/json';
$.get(url, function(json){
var dialog = makeShowDialog(json.form);
dialog.dialog('open');
});
});
$('#schedule_add_show').click(openShowDialog);
});