issue_221_quick_remove_source.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel='stylesheet' href='../build/out/fullcalendar/fullcalendar.css' />
  5. <link rel='stylesheet' href='../build/out/fullcalendar/fullcalendar.print.css' media='print' />
  6. <script src='../build/deps.js'></script>
  7. <script src='../build/out/fullcalendar/fullcalendar.js'></script>
  8. <script src='../build/out/fullcalendar/gcal.js'></script>
  9. <script>
  10. var gcalFeed = $.fullCalendar.gcalFeed("http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic");
  11. $(document).ready(function() {
  12. var cal = $('#calendar').fullCalendar({
  13. header: {
  14. left: 'prev,next today',
  15. center: 'title',
  16. right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
  17. },
  18. loading: function(bool) {
  19. if (bool) {
  20. $('#loading').show();
  21. }else{
  22. $('#loading').hide();
  23. }
  24. }
  25. });
  26. cal.fullCalendar('addEventSource', gcalFeed);
  27. cal.fullCalendar('removeEventSource', gcalFeed);
  28. // events should not be rendered when jsonp returns!
  29. });
  30. </script>
  31. <style>
  32. .red-event a {
  33. background: red;
  34. }
  35. .yellow-event a {
  36. background: yellow;
  37. }
  38. .black-text-event a {
  39. color: #000;
  40. }
  41. button {
  42. font-size: 11px;
  43. }
  44. </style>
  45. </head>
  46. <body style='font-size:12px'>
  47. <div id='loading' style='position:absolute;top:0;left:0;display:none'>loading...</div>
  48. <div id='calendar' style='width:900px;margin:20px auto 0;font-family:arial'></div>
  49. </body>
  50. </html>