issue_221_quick_remove_source.html 1.4 KB

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