add show/schedule now on one page.
This commit is contained in:
parent
b61f2af59b
commit
675f1ae86a
8 changed files with 64 additions and 113 deletions
|
@ -117,6 +117,11 @@ function setAddShowEvents() {
|
|||
.click(function(event){
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
var y = $("#schedule_calendar").width();
|
||||
var z = $("#schedule-add-show").width();
|
||||
$("#schedule_calendar").width(y+z+50);
|
||||
$("#schedule_calendar").fullCalendar('render');
|
||||
$("#add-show-form").hide();
|
||||
});
|
||||
|
||||
|
@ -130,33 +135,4 @@ function setAddShowEvents() {
|
|||
$(document).ready(function() {
|
||||
|
||||
setAddShowEvents();
|
||||
|
||||
$("#fullcalendar_show_display").fullCalendar({
|
||||
header: {
|
||||
left: 'prev, next, today',
|
||||
center: 'title',
|
||||
right: 'agendaDay, agendaWeek, month'
|
||||
},
|
||||
defaultView: 'month',
|
||||
editable: false,
|
||||
allDaySlot: false,
|
||||
axisFormat: 'H:mm',
|
||||
timeFormat: {
|
||||
agenda: 'H:mm{ - H:mm}',
|
||||
month: 'H:mm{ - H:mm}'
|
||||
},
|
||||
|
||||
events: getFullCalendarEvents,
|
||||
|
||||
//callbacks
|
||||
eventRender: eventRender
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(window).load(function() {
|
||||
var mainHeight = document.documentElement.clientHeight - 200 - 50;
|
||||
|
||||
$('#fullcalendar_show_display').fullCalendar('option', 'contentHeight', mainHeight);
|
||||
$('#fullcalendar_show_display').fullCalendar('render');
|
||||
});
|
||||
|
|
|
@ -28,11 +28,11 @@ function viewDisplay( view ) {
|
|||
var calendarEl = this;
|
||||
|
||||
var select = $('<select class="schedule_change_slots input_select"/>')
|
||||
.append('<option value="5">5 min</option>')
|
||||
.append('<option value="10">10 min</option>')
|
||||
.append('<option value="15">15 min</option>')
|
||||
.append('<option value="30">30 min</option>')
|
||||
.append('<option value="60">60 min</option>')
|
||||
.append('<option value="5">5m</option>')
|
||||
.append('<option value="10">10m</option>')
|
||||
.append('<option value="15">15m</option>')
|
||||
.append('<option value="30">30m</option>')
|
||||
.append('<option value="60">60m</option>')
|
||||
.change(function(){
|
||||
var x = $(this).val();
|
||||
var opt = view.calendar.options;
|
||||
|
@ -56,10 +56,14 @@ function viewDisplay( view ) {
|
|||
if($('.fc-header-left tbody td').length === 5) {
|
||||
$('.fc-header-left tbody tr:first')
|
||||
.append('<td><span class="fc-header-space"></span></td>')
|
||||
.append('<td><a href="#" class="add-button"><span class="add-icon"></span>Add Show</a></td>')
|
||||
.append('<td><a href="#" class="add-button"><span class="add-icon"></span>Show</a></td>')
|
||||
.find('td:last > a')
|
||||
.click(function(){
|
||||
|
||||
$("#add-show-form").show();
|
||||
var y = $("#schedule_calendar").width();
|
||||
var z = $("#schedule-add-show").width();
|
||||
$("#schedule_calendar").width(y-z-50);
|
||||
$("#schedule_calendar").fullCalendar('render');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue