so now, when you add a PTO scheduled date, the calendar on your PTO page automatically updates to show this event :-)

This commit is contained in:
Ken Johnson
2013-05-31 10:31:35 -04:00
parent a6a38c773e
commit a599ca9862
2 changed files with 18 additions and 2 deletions
+2 -1
View File
@@ -127,7 +127,7 @@
<script type="text/javascript">
$('#calendar').fullCalendar({
events: <%= get_pto_schedule_schedule_index_path.inspect.html_safe %>,
events: <%= get_pto_schedule_schedule_index_path(:format => "json").inspect.html_safe %>,
})
@@ -234,6 +234,7 @@ $("#cal_update_submit").click(function(event) {
$('#failure').show(500).delay(1500).fadeOut();
} else {
$('#success').show(500).delay(1500).fadeOut();
$('#calendar').fullCalendar('refetchEvents')
}
},
error: function(event) {