issue_221_quick_remove_source.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html>
  3. <head>
  4. <script type='text/javascript' src='loader.js'></script>
  5. <script type='text/javascript'>
  6. var date = new Date();
  7. var d = date.getDate();
  8. var m = date.getMonth();
  9. var y = date.getFullYear();
  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>