issue_221_quick_remove_source.html 1.5 KB

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