瀏覽代碼

access utils via FullCalendar, not $.fullCalendar

Adam Shaw 7 年之前
父節點
當前提交
def58cecc4
共有 61 個文件被更改,包括 292 次插入276 次删除
  1. 4 3
      demos/agenda-views.html
  2. 4 3
      demos/background-events.html
  3. 4 3
      demos/basic-views.html
  4. 4 3
      demos/default.html
  5. 4 5
      demos/external-dragging.html
  6. 6 4
      demos/gcal.html
  7. 7 5
      demos/json.html
  8. 4 3
      demos/list-views.html
  9. 19 13
      demos/locales.html
  10. 4 3
      demos/selectable.html
  11. 6 4
      demos/themes.html
  12. 7 4
      demos/timezones.html
  13. 4 3
      demos/week-numbers.html
  14. 2 2
      tests/automated/event-drag/TimeGridEventDragUtils.js
  15. 3 3
      tests/automated/event-render/TimeGridEventRenderUtils.js
  16. 2 3
      tests/automated/globals.js
  17. 2 2
      tests/automated/hacks.js
  18. 1 1
      tests/automated/legacy/ListView.js
  19. 2 2
      tests/automated/legacy/businessHours.js
  20. 1 1
      tests/automated/legacy/computeEdges.js
  21. 1 1
      tests/automated/legacy/computerInnerRect.js
  22. 7 7
      tests/automated/legacy/current-date.js
  23. 3 4
      tests/automated/legacy/custom-view-class.js
  24. 2 2
      tests/automated/legacy/custom-view-duration.js
  25. 1 1
      tests/automated/legacy/emitter.js
  26. 1 1
      tests/automated/legacy/external-dnd-advanced.js
  27. 23 23
      tests/automated/legacy/formatRange.js
  28. 23 23
      tests/automated/legacy/moment-ambig.js
  29. 18 18
      tests/automated/legacy/moment-construct.js
  30. 11 11
      tests/automated/legacy/moment-formatting.js
  31. 9 9
      tests/automated/legacy/moment-misc.js
  32. 3 3
      tests/automated/legacy/monthNames.js
  33. 3 3
      tests/automated/legacy/monthNamesShort.js
  34. 6 6
      tests/automated/legacy/navLinks.js
  35. 1 2
      tests/automated/legacy/nowIndicator.js
  36. 1 1
      tests/automated/legacy/unselectAuto.js
  37. 1 1
      tests/automated/legacy/weekViewRender.js
  38. 1 1
      tests/automated/lib/day-grid.js
  39. 3 3
      tests/automated/lib/moment.js
  40. 4 4
      tests/automated/lib/time-grid.js
  41. 2 3
      tests/automated/performance/rerenders.js
  42. 1 1
      tests/automated/util/Model.js
  43. 1 1
      tests/automated/util/RenderQueue.js
  44. 1 1
      tests/automated/util/TaskQueue.js
  45. 1 1
      tests/automated/view-dates/validRange.js
  46. 4 4
      tests/automated/view-dates/visibleRange.js
  47. 1 1
      tests/automated/view-render/DayGridRenderUtils.js
  48. 1 1
      tests/automated/view-render/ViewRenderUtils.js
  49. 6 7
      tests/automated/view-type/exposed-classes.js
  50. 3 3
      tests/manual/es6-class-extend.html
  51. 1 1
      tests/manual/gcal.html
  52. 8 8
      tests/manual/issue_221_quick_remove_source.html
  53. 4 4
      tests/manual/issue_417_refetchEvents.html
  54. 4 4
      tests/manual/issue_554.html
  55. 5 5
      tests/manual/issue_586_refetchEvents.html
  56. 7 7
      tests/manual/issue_616.html
  57. 9 9
      tests/manual/issue_679.html
  58. 1 1
      tests/manual/locales-datepicker.html
  59. 10 10
      tests/manual/methods.html
  60. 1 1
      tests/manual/sources.html
  61. 9 9
      tests/manual/sources_new.html

+ 4 - 3
demos/agenda-views.html

@@ -5,13 +5,13 @@
 <link href='../dist/fullcalendar.css' rel='stylesheet' />
 <link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
 <script src='../node_modules/moment/moment.js'></script>
-<script src='../node_modules/jquery/dist/jquery.js'></script>
 <script src='../dist/fullcalendar.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
+    var calendarEl = document.getElementById('calendar');
 
-    $('#calendar').fullCalendar({
+    var calendar = new FullCalendar.Calendar(calendarEl, {
       header: {
         left: 'prev,next today',
         center: 'title',
@@ -79,6 +79,7 @@
       ]
     });
 
+    calendar.render();
   });
 
 </script>

+ 4 - 3
demos/background-events.html

@@ -5,13 +5,13 @@
 <link href='../dist/fullcalendar.css' rel='stylesheet' />
 <link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
 <script src='../node_modules/moment/moment.js'></script>
-<script src='../node_modules/jquery/dist/jquery.js'></script>
 <script src='../dist/fullcalendar.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
+    var calendarEl = document.getElementById('calendar');
 
-    $('#calendar').fullCalendar({
+    var calendar = new FullCalendar.Calendar(calendarEl, {
       header: {
         left: 'prev,next today',
         center: 'title',
@@ -75,6 +75,7 @@
       ]
     });
 
+    calendar.render();
   });
 
 </script>

+ 4 - 3
demos/basic-views.html

@@ -5,13 +5,13 @@
 <link href='../dist/fullcalendar.css' rel='stylesheet' />
 <link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
 <script src='../node_modules/moment/moment.js'></script>
-<script src='../node_modules/jquery/dist/jquery.js'></script>
 <script src='../dist/fullcalendar.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
+    var calendarEl = document.getElementById('calendar');
 
-    $('#calendar').fullCalendar({
+    var calendar = new FullCalendar.Calendar(calendarEl, {
       header: {
         left: 'prev,next today',
         center: 'title',
@@ -79,6 +79,7 @@
       ]
     });
 
+    calendar.render();
   });
 
 </script>

+ 4 - 3
demos/default.html

@@ -5,13 +5,13 @@
 <link href='../dist/fullcalendar.css' rel='stylesheet' />
 <link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
 <script src='../node_modules/moment/moment.js'></script>
-<script src='../node_modules/jquery/dist/jquery.js'></script>
 <script src='../dist/fullcalendar.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
+    var calendarEl = document.getElementById('calendar');
 
-    $('#calendar').fullCalendar({
+    var calendar = new FullCalendar.Calendar(calendarEl, {
       defaultDate: '2018-03-12',
       editable: true,
       eventLimit: true, // allow "more" link when too many events
@@ -73,6 +73,7 @@
       ]
     });
 
+    calendar.render();
   });
 
 </script>

+ 4 - 5
demos/external-dragging.html

@@ -10,8 +10,7 @@
 <script src='../dist/fullcalendar.js'></script>
 <script>
 
-  $(document).ready(function() {
-
+  document.addEventListener('DOMContentLoaded', function() {
 
     /* initialize the external events
     -----------------------------------------------------------------*/
@@ -33,11 +32,11 @@
 
     });
 
-
     /* initialize the calendar
     -----------------------------------------------------------------*/
 
-    $('#calendar').fullCalendar({
+    var calendarEl = document.getElementById('calendar');
+    var calendar = new FullCalendar.Calendar(calendarEl, {
       header: {
         left: 'prev,next today',
         center: 'title',
@@ -53,7 +52,7 @@
         }
       }
     });
-
+    calendar.render();
 
   });
 

+ 6 - 4
demos/gcal.html

@@ -5,14 +5,14 @@
 <link href='../dist/fullcalendar.css' rel='stylesheet' />
 <link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
 <script src='../node_modules/moment/moment.js'></script>
-<script src='../node_modules/jquery/dist/jquery.js'></script>
 <script src='../dist/fullcalendar.js'></script>
 <script src='../dist/gcal.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
+    var calendarEl = document.getElementById('calendar');
 
-    $('#calendar').fullCalendar({
+    var calendar = new FullCalendar.Calendar(calendarEl, {
 
       header: {
         left: 'prev,next today',
@@ -37,11 +37,13 @@
       },
 
       loading: function(bool) {
-        $('#loading').toggle(bool);
+        document.getElementById('loading').style.display =
+          bool ? 'block' : 'none';
       }
 
     });
 
+    calendar.render();
   });
 
 </script>

+ 7 - 5
demos/json.html

@@ -5,13 +5,13 @@
 <link href='../dist/fullcalendar.css' rel='stylesheet' />
 <link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
 <script src='../node_modules/moment/moment.js'></script>
-<script src='../node_modules/jquery/dist/jquery.js'></script>
 <script src='../dist/fullcalendar.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
+    var calendarEl = document.getElementById('calendar');
 
-    $('#calendar').fullCalendar({
+    var calendar = new FullCalendar.Calendar(calendarEl, {
       header: {
         left: 'prev,next today',
         center: 'title',
@@ -24,14 +24,16 @@
       events: {
         url: 'php/get-events.php',
         error: function() {
-          $('#script-warning').show();
+          document.getElementById('script-warning').style.display = 'block'
         }
       },
       loading: function(bool) {
-        $('#loading').toggle(bool);
+        document.getElementById('loading').style.display =
+          bool ? 'block' : 'none';
       }
     });
 
+    calendar.render();
   });
 
 </script>

+ 4 - 3
demos/list-views.html

@@ -5,13 +5,13 @@
 <link href='../dist/fullcalendar.css' rel='stylesheet' />
 <link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
 <script src='../node_modules/moment/moment.js'></script>
-<script src='../node_modules/jquery/dist/jquery.js'></script>
 <script src='../dist/fullcalendar.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
+    var calendarEl = document.getElementById('calendar');
 
-    $('#calendar').fullCalendar({
+    var calendar = new FullCalendar.Calendar(calendarEl, {
       header: {
         left: 'prev,next today',
         center: 'title',
@@ -88,6 +88,7 @@
       ]
     });
 
+    calendar.render();
   });
 
 </script>

+ 19 - 13
demos/locales.html

@@ -5,15 +5,16 @@
 <link href='../dist/fullcalendar.css' rel='stylesheet' />
 <link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
 <script src='../node_modules/moment/moment.js'></script>
-<script src='../node_modules/jquery/dist/jquery.js'></script>
 <script src='../dist/fullcalendar.js'></script>
 <script src='../dist/locale-all.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
     var initialLocaleCode = 'en';
+    var localeSelectorEl = document.getElementById('locale-selector');
+    var calendarEl = document.getElementById('calendar');
 
-    $('#calendar').fullCalendar({
+    var calendar = new FullCalendar.Calendar(calendarEl, {
       header: {
         left: 'prev,next today',
         center: 'title',
@@ -84,22 +85,27 @@
       ]
     });
 
+    calendar.render();
+
     // build the locale selector's options
-    $.each($.fullCalendar.locales, function(localeCode) {
-      $('#locale-selector').append(
-        $('<option/>')
-          .attr('value', localeCode)
-          .prop('selected', localeCode == initialLocaleCode)
-          .text(localeCode)
-      );
-    });
+    var localeHash = FullCalendar.locales;
+    var localeCode;
+    var optionEl;
+    for (localeCode in localeHash) {
+      optionEl = document.createElement('option');
+      optionEl.value = localeCode;
+      optionEl.selected = localeCode == initialLocaleCode;
+      optionEl.innerText = localeCode;
+      localeSelectorEl.appendChild(optionEl);
+    }
 
     // when the selected option changes, dynamically change the calendar option
-    $('#locale-selector').on('change', function() {
+    localeSelectorEl.addEventListener('change', function() {
       if (this.value) {
-        $('#calendar').fullCalendar('option', 'locale', this.value);
+        calendar.option('locale', this.value);
       }
     });
+
   });
 
 </script>

+ 4 - 3
demos/selectable.html

@@ -5,13 +5,13 @@
 <link href='../dist/fullcalendar.css' rel='stylesheet' />
 <link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
 <script src='../node_modules/moment/moment.js'></script>
-<script src='../node_modules/jquery/dist/jquery.js'></script>
 <script src='../dist/fullcalendar.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
+    var calendarEl = document.getElementById('calendar');
 
-    $('#calendar').fullCalendar({
+    var calendar = new FullCalendar.Calendar(calendarEl, {
       header: {
         left: 'prev,next today',
         center: 'title',
@@ -94,6 +94,7 @@
       ]
     });
 
+    calendar.render();
   });
 
 </script>

+ 6 - 4
demos/themes.html

@@ -6,17 +6,18 @@
 <link href='../dist/fullcalendar.css' rel='stylesheet' />
 <link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
 <script src='../node_modules/moment/moment.js'></script>
-<script src='../node_modules/jquery/dist/jquery.js'></script>
 <script src='../dist/fullcalendar.js'></script>
 <script src='js/theme-chooser.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
+    var calendarEl = document.getElementById('calendar');
+    var calendar;
 
     initThemeChooser({
 
       init: function(themeSystem) {
-        $('#calendar').fullCalendar({
+        calendar = new FullCalendar.Calendar(calendarEl, {
           themeSystem: themeSystem,
           header: {
             left: 'prev,next today',
@@ -85,10 +86,11 @@
             }
           ]
         });
+        calendar.render();
       },
 
       change: function(themeSystem) {
-        $('#calendar').fullCalendar('option', 'themeSystem', themeSystem);
+        calendar.option('themeSystem', themeSystem);
       }
 
     });

+ 7 - 4
demos/timezones.html

@@ -9,9 +9,10 @@
 <script src='../dist/fullcalendar.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
+    var calendarEl = document.getElementById('calendar');
 
-    $('#calendar').fullCalendar({
+    var calendar = new FullCalendar.Calendar(calendarEl, {
       header: {
         left: 'prev,next today',
         center: 'title',
@@ -34,7 +35,7 @@
       eventRender: function(event, el) {
         // render the timezone offset below the event title
         if (event.start.hasZone()) {
-          el.find('.fc-title').after(
+          $(el).find('.fc-title').after(
             $('<div class="tzo"/>').text(event.start.format('Z'))
           );
         }
@@ -47,6 +48,8 @@
       }
     });
 
+    calendar.render();
+
     // load the list of available timezones, build the <select> options
     $.getJSON('php/get-timezones.php', function(timezones) {
       $.each(timezones, function(i, timezone) {
@@ -60,7 +63,7 @@
 
     // when the timezone selector changes, dynamically change the calendar option
     $('#timezone-selector').on('change', function() {
-      $('#calendar').fullCalendar('option', 'timezone', this.value || false);
+      calendar.option('timezone', this.value || false);
     });
   });
 

+ 4 - 3
demos/week-numbers.html

@@ -5,13 +5,13 @@
 <link href='../dist/fullcalendar.css' rel='stylesheet' />
 <link href='../dist/fullcalendar.print.css' rel='stylesheet' media='print' />
 <script src='../node_modules/moment/moment.js'></script>
-<script src='../node_modules/jquery/dist/jquery.js'></script>
 <script src='../dist/fullcalendar.js'></script>
 <script>
 
-  $(document).ready(function() {
+  document.addEventListener('DOMContentLoaded', function() {
+    var calendarEl = document.getElementById('calendar');
 
-    $('#calendar').fullCalendar({
+    var calendar = new FullCalendar.Calendar(calendarEl, {
       header: {
         left: 'prev,next today',
         center: 'title',
@@ -84,6 +84,7 @@
       ]
     });
 
+    calendar.render();
   });
 
 </script>

+ 2 - 2
tests/automated/event-drag/TimeGridEventDragUtils.js

@@ -4,8 +4,8 @@ import { computeSpanRects } from '../event-render/TimeGridEventRenderUtils'
 
 export function drag(startDate, endDate, debug) {
 
-  startDate = $.fullCalendar.moment.parseZone(startDate)
-  endDate = $.fullCalendar.moment.parseZone(endDate)
+  startDate = FullCalendar.moment.parseZone(startDate)
+  endDate = FullCalendar.moment.parseZone(endDate)
 
   var startRect = computeSpanRects(
     startDate,

+ 3 - 3
tests/automated/event-render/TimeGridEventRenderUtils.js

@@ -12,8 +12,8 @@ TODO: check isStart/isEnd.
 */
 export function checkEventRendering(start, end) {
 
-  start = $.fullCalendar.moment.parseZone(start)
-  end = $.fullCalendar.moment.parseZone(end)
+  start = FullCalendar.moment.parseZone(start)
+  end = FullCalendar.moment.parseZone(end)
 
   var expectedRects = computeSpanRects(start, end)
   var eventEls = $('.fc-event') // sorted by DOM order. not good for RTL
@@ -132,7 +132,7 @@ function computeDays() {
   var days = dayEls.map(function(i, node) {
     var rect = node.getBoundingClientRect()
     return $.extend({}, rect, {
-      date: $.fullCalendar.moment.parseZone(
+      date: FullCalendar.moment.parseZone(
         $(node).data('date')
       )
     })

+ 2 - 3
tests/automated/globals.js

@@ -53,7 +53,6 @@ window.spyOnCalendarCallback = function(name, func) {
 }
 
 window.initCalendar = function(options, el) {
-  var Calendar = $.fullCalendar.Calendar
   var $el
 
   if (options) {
@@ -66,7 +65,7 @@ window.initCalendar = function(options, el) {
     $el = $('<div id="calendar">').appendTo('body')
   }
 
-  window.currentCalendar = new Calendar($el[0], getCurrentOptions()) // set the global
+  window.currentCalendar = new FullCalendar.Calendar($el[0], getCurrentOptions()) // set the global
 
   return window.currentCalendar.render()
 }
@@ -125,7 +124,7 @@ const timezoneScenarios = {
     description: 'when no timezone',
     value: null,
     moment: function(str) {
-      return $.fullCalendar.moment.parseZone(str)
+      return FullCalendar.moment.parseZone(str)
     }
   },
   local: {

+ 2 - 2
tests/automated/hacks.js

@@ -2,12 +2,12 @@
 beforeEach(function() {
 
   // HACK. PhantomJS fails otherwise
-  $.fullCalendar.Calendar.defaults.windowResizeDelay = 200
+  FullCalendar.Calendar.defaults.windowResizeDelay = 200
 
   // On real devices, when a click-like touch interaction happens, there is a preiod of time where mouse events
   // are ignores. Since ignore peroid is global, and might span across tests, disable it.
   // The simulates touch events do not fire these mouse events anyway.
-  $.fullCalendar.touchMouseIgnoreWait = 0
+  FullCalendar.touchMouseIgnoreWait = 0
 
   // increase the default timeout
   jasmine.DEFAULT_TIMEOUT_INTERVAL = 30000

+ 1 - 1
tests/automated/legacy/ListView.js

@@ -443,7 +443,7 @@ describe('ListView rendering', function() {
       return {
         mainText: el.find('.fc-list-heading-main').text() || '',
         altText: el.find('.fc-list-heading-alt').text() || '',
-        date: $.fullCalendar.moment(el.data('date'))
+        date: FullCalendar.moment(el.data('date'))
       }
     }).get()
   }

+ 2 - 2
tests/automated/legacy/businessHours.js

@@ -200,8 +200,8 @@ describe('businessHours', function() {
       end = obj.end
     }
 
-    start = $.fullCalendar.moment.parseZone(start)
-    end = $.fullCalendar.moment.parseZone(end)
+    start = FullCalendar.moment.parseZone(start)
+    end = FullCalendar.moment.parseZone(end)
 
     var startTime = start.time()
     var endTime

+ 1 - 1
tests/automated/legacy/computeEdges.js

@@ -2,7 +2,7 @@ import { getStockScrollbarWidths } from '../lib/dom-misc'
 
 describe('computeEdges', function() {
 
-  var computeEdges = $.fullCalendar.computeEdges
+  var computeEdges = FullCalendar.computeEdges
 
   defineTests(
     'when margin',

+ 1 - 1
tests/automated/legacy/computerInnerRect.js

@@ -11,7 +11,7 @@ describe('computeInnerRect', function() {
   var PADDING_RIGHT = 6
   var PADDING_TOP = 7
   var PADDING_BOTTOM = 8
-  var computeInnerRect = $.fullCalendar.computeInnerRect
+  var computeInnerRect = FullCalendar.computeInnerRect
 
   describeValues({
     'when LTR': 'ltr',

+ 7 - 7
tests/automated/legacy/current-date.js

@@ -29,7 +29,7 @@ describe('current date', function() {
       })
       it('should initialize at the date, given a Moment object', function() {
         var options = {}
-        options.defaultDate = $.fullCalendar.moment('2011-03-10')
+        options.defaultDate = FullCalendar.moment('2011-03-10')
         initCalendar(options)
         expectViewDates('2011-03-06', '2011-03-13')
         expect(currentCalendar.getDate()).toEqualMoment('2011-03-10')
@@ -67,7 +67,7 @@ describe('current date', function() {
       })
       it('should go to a date when given a moment object', function() {
         initCalendar()
-        currentCalendar.gotoDate($.fullCalendar.moment('2015-04-01'))
+        currentCalendar.gotoDate(FullCalendar.moment('2015-04-01'))
         expectViewDates('2015-03-29', '2015-04-05')
       })
     })
@@ -247,16 +247,16 @@ describe('current date', function() {
     var calculatedEnd
     var title
 
-    start = $.fullCalendar.moment(start)
-    calculatedEnd = end ? $.fullCalendar.moment(end) : start.clone().add(1, 'days')
+    start = FullCalendar.moment(start)
+    calculatedEnd = end ? FullCalendar.moment(end) : start.clone().add(1, 'days')
     expect(start).toEqualMoment(view.start)
     expect(calculatedEnd).toEqualMoment(view.end)
 
-    titleStart = titleStart ? $.fullCalendar.moment(titleStart) : start
-    titleEnd = titleEnd ? $.fullCalendar.moment(titleEnd) : calculatedEnd
+    titleStart = titleStart ? FullCalendar.moment(titleStart) : start
+    titleEnd = titleEnd ? FullCalendar.moment(titleEnd) : calculatedEnd
 
     if (titleEnd) {
-      title = $.fullCalendar.formatRange(
+      title = FullCalendar.formatRange(
         titleStart,
         titleEnd.clone().add(-1, 'ms'),
         TITLE_FORMAT,

+ 3 - 4
tests/automated/legacy/custom-view-class.js

@@ -1,8 +1,7 @@
 describe('custom view class', function() {
 
   it('calls all standard methods with correct parameters', function() {
-    var FC = $.fullCalendar
-    var View = FC.View
+    var View = FullCalendar.View
     var CustomView
 
     var methods = {
@@ -40,7 +39,7 @@ describe('custom view class', function() {
     spyOn(methods, 'destroySelection').and.callThrough()
 
     CustomView = View.extend(methods)
-    FC.views.custom = CustomView
+    FullCalendar.views.custom = CustomView
 
     initCalendar({
       defaultView: 'custom',
@@ -71,7 +70,7 @@ describe('custom view class', function() {
 
     expect(methods.destroySelection).toHaveBeenCalled()
 
-    delete FC.views.custom
+    delete FullCalendar.views.custom
   })
 
 })

+ 2 - 2
tests/automated/legacy/custom-view-duration.js

@@ -383,7 +383,7 @@ describe('custom view', function() {
     })
 
     it('falls back to view name when view lacks metadata', function() {
-      $.fullCalendar.views.crazy = $.fullCalendar.View.extend()
+      FullCalendar.views.crazy = FullCalendar.View.extend()
       var options = {
         views: {}
       }
@@ -393,7 +393,7 @@ describe('custom view', function() {
       options.defaultView = 'crazy'
       initCalendar(options)
       expect($('.fc-crazy-button')).toHaveText('crazy')
-      delete $.fullCalendar.views.crazy
+      delete FullCalendar.views.crazy
     })
   })
 })

+ 1 - 1
tests/automated/legacy/emitter.js

@@ -1,6 +1,6 @@
 
 describe('emitter', function() {
-  var EmitterMixin = $.fullCalendar.EmitterMixin
+  var EmitterMixin = FullCalendar.EmitterMixin
 
   it('calls a handler', function() {
     var o = new EmitterMixin()

+ 1 - 1
tests/automated/legacy/external-dnd-advanced.js

@@ -389,7 +389,7 @@ describe('advanced external dnd', function() {
       expect(typeof ui).toBe('object')
     }
     options.eventReceive = function(event) {
-      if ($.fullCalendar.moment.parseZone(date).hasTime()) { // dropped on an all-day slot
+      if (FullCalendar.moment.parseZone(date).hasTime()) { // dropped on an all-day slot
         expect(event.start).toEqualMoment(date)
       } else { // event might have a time, which it is allowed to keep
         expect(event.start.clone().stripTime()).toEqualMoment(date)

+ 23 - 23
tests/automated/legacy/formatRange.js

@@ -1,73 +1,73 @@
 describe('formatRange', function() {
 
   it('doesn\'t do any splitting when dates have different years', function() {
-    var s = $.fullCalendar.formatRange('2014-01-01', '2015-01-01', 'MMMM Do YYYY')
+    var s = FullCalendar.formatRange('2014-01-01', '2015-01-01', 'MMMM Do YYYY')
     expect(s).toEqual('January 1st 2014 - January 1st 2015')
   })
 
   it('splits correctly on day when dates have same month', function() {
-    var s = $.fullCalendar.formatRange('2014-01-01', '2014-01-05', 'MMMM Do YYYY')
+    var s = FullCalendar.formatRange('2014-01-01', '2014-01-05', 'MMMM Do YYYY')
     expect(s).toEqual('January 1st - 5th 2014')
   })
 
   it('splits correctly on day when dates have same month and smaller unit in front', function() {
-    var s = $.fullCalendar.formatRange('2014-01-01', '2014-01-05', 'dddd MMMM Do YYYY')
+    var s = FullCalendar.formatRange('2014-01-01', '2014-01-05', 'dddd MMMM Do YYYY')
     expect(s).toEqual('Wednesday January 1st - Sunday January 5th 2014')
   })
 
   it('splits correctly on the time when dates have the same day', function() {
-    var s = $.fullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T08:00:00', 'MMMM Do YYYY h:mma')
+    var s = FullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T08:00:00', 'MMMM Do YYYY h:mma')
     expect(s).toEqual('January 1st 2014 6:00am - 8:00am')
   })
 
   it('splits correctly on the time when dates have the same day and hour but different am/pm', function() {
-    var s = $.fullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T18:00:00', 'MMMM Do YYYY h:mma')
+    var s = FullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T18:00:00', 'MMMM Do YYYY h:mma')
     expect(s).toEqual('January 1st 2014 6:00am - 6:00pm')
   })
 
   it('splits correctly on the time when the dates have the same hour', function() {
-    var s = $.fullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T06:30:00', 'MMMM Do YYYY h:mma')
+    var s = FullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T06:30:00', 'MMMM Do YYYY h:mma')
     expect(s).toEqual('January 1st 2014 6:00am - 6:30am')
   })
 
   it('doesn\'t split a period (German)', function() {
     var date1 = moment('2014-08-11').locale('de')
     var date2 = moment('2014-08-17').locale('de')
-    var s = $.fullCalendar.formatRange(date1, date2, 'll')
+    var s = FullCalendar.formatRange(date1, date2, 'll')
     expect(s).toEqual('11. - 17. Aug. 2014')
   })
 
   it('doesn\'t split a period (Czech)', function() {
     var date1 = moment('2017-01-15').locale('cs')
     var date2 = moment('2017-01-21').locale('cs')
-    var s = $.fullCalendar.formatRange(date1, date2, 'D. M. YYYY')
+    var s = FullCalendar.formatRange(date1, date2, 'D. M. YYYY')
     expect(s).toEqual('15. - 21. 1. 2017')
   })
 
   it('uses non-standalone version of month (Russian)', function() {
     var date1 = moment('2015-01-02').locale('ru')
     var date2 = moment('2015-01-08').locale('ru')
-    var s = $.fullCalendar.formatRange(date1, date2, 'DD MMMM YYYY')
+    var s = FullCalendar.formatRange(date1, date2, 'DD MMMM YYYY')
     expect(s).toEqual('02 - 08 января 2015')
   })
 
   it('outputs the single date when the dates have the same day and time', function() {
-    var s = $.fullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T06:00:00', 'MMMM Do YYYY h:mma')
+    var s = FullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T06:00:00', 'MMMM Do YYYY h:mma')
     expect(s).toEqual('January 1st 2014 6:00am')
   })
 
   it('outputs the single date when the dates have the same day and the format string is vague', function() {
-    var s = $.fullCalendar.formatRange('2014-01-01', '2014-01-01', 'MMMM Do YYYY')
+    var s = FullCalendar.formatRange('2014-01-01', '2014-01-01', 'MMMM Do YYYY')
     expect(s).toEqual('January 1st 2014')
   })
 
   it('outputs the single week number when dates have the same week and format string is week', function() {
-    var s = $.fullCalendar.formatRange('2014-01-01', '2014-01-01', 'W')
+    var s = FullCalendar.formatRange('2014-01-01', '2014-01-01', 'W')
     expect(s).toEqual('1')
   })
 
   it('uses a custom separator', function() {
-    var s = $.fullCalendar.formatRange(
+    var s = FullCalendar.formatRange(
       '2014-01-01T06:00:00',
       '2014-01-01T06:30:00',
       'MMMM Do YYYY h:mma',
@@ -79,47 +79,47 @@ describe('formatRange', function() {
   describe('when called with isRTL', function() {
 
     it('doesn\'t do any splitting when dates have different years', function() {
-      var s = $.fullCalendar.formatRange('2014-01-01', '2015-01-01', 'MMMM Do YYYY', null, true)
+      var s = FullCalendar.formatRange('2014-01-01', '2015-01-01', 'MMMM Do YYYY', null, true)
       expect(s).toEqual('January 1st 2015 - January 1st 2014')
     })
 
     it('splits correctly on day when dates have same month', function() {
-      var s = $.fullCalendar.formatRange('2014-01-01', '2014-01-05', 'MMMM Do YYYY', null, true)
+      var s = FullCalendar.formatRange('2014-01-01', '2014-01-05', 'MMMM Do YYYY', null, true)
       expect(s).toEqual('January 5th - 1st 2014')
     })
 
     it('splits correctly on day when dates have same month and smaller unit in front', function() {
-      var s = $.fullCalendar.formatRange('2014-01-01', '2014-01-05', 'dddd MMMM Do YYYY', null, true)
+      var s = FullCalendar.formatRange('2014-01-01', '2014-01-05', 'dddd MMMM Do YYYY', null, true)
       expect(s).toEqual('Sunday January 5th - Wednesday January 1st 2014')
     })
 
     it('splits correctly on the time when dates have the same day', function() {
-      var s = $.fullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T08:00:00', 'MMMM Do YYYY h:mma', null, true)
+      var s = FullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T08:00:00', 'MMMM Do YYYY h:mma', null, true)
       expect(s).toEqual('January 1st 2014 8:00am - 6:00am')
     })
 
     it('splits correctly on the time when dates have the same day and hour but different am/pm', function() {
-      var s = $.fullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T18:00:00', 'MMMM Do YYYY h:mma', null, true)
+      var s = FullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T18:00:00', 'MMMM Do YYYY h:mma', null, true)
       expect(s).toEqual('January 1st 2014 6:00pm - 6:00am')
     })
 
     it('splits correctly on the time when the dates have the same hour', function() {
-      var s = $.fullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T06:30:00', 'MMMM Do YYYY h:mma', null, true)
+      var s = FullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T06:30:00', 'MMMM Do YYYY h:mma', null, true)
       expect(s).toEqual('January 1st 2014 6:30am - 6:00am')
     })
 
     it('outputs the single date when the dates have the same day and time', function() {
-      var s = $.fullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T06:00:00', 'MMMM Do YYYY h:mma', null, true)
+      var s = FullCalendar.formatRange('2014-01-01T06:00:00', '2014-01-01T06:00:00', 'MMMM Do YYYY h:mma', null, true)
       expect(s).toEqual('January 1st 2014 6:00am')
     })
 
     it('outputs the single date when the dates have the same day and the format string is vague', function() {
-      var s = $.fullCalendar.formatRange('2014-01-01', '2014-01-01', 'MMMM Do YYYY', null, true)
+      var s = FullCalendar.formatRange('2014-01-01', '2014-01-01', 'MMMM Do YYYY', null, true)
       expect(s).toEqual('January 1st 2014')
     })
 
     it('uses a custom separator', function() {
-      var s = $.fullCalendar.formatRange(
+      var s = FullCalendar.formatRange(
         '2014-01-01T06:00:00',
         '2014-01-01T06:30:00',
         'MMMM Do YYYY h:mma',
@@ -162,7 +162,7 @@ describe('formatRange', function() {
   })
 
   it('splits correctly on day when dates have same month, when given real moments', function() {
-    var s = $.fullCalendar.formatRange(
+    var s = FullCalendar.formatRange(
       moment.utc('2014-01-01'),
       moment.utc('2015-01-01'),
       'MMMM Do YYYY'

+ 23 - 23
tests/automated/legacy/moment-ambig.js

@@ -2,42 +2,42 @@
 describe('ambiguously-zoned moment', function() {
 
   it('has a false hasZone', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08T10:00:00')
+    var mom = FullCalendar.moment.parseZone('2014-06-08T10:00:00')
     expect(mom.hasZone()).toBe(false)
   })
 
   it('has a true hasTime', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08T10:00:00')
+    var mom = FullCalendar.moment.parseZone('2014-06-08T10:00:00')
     expect(mom.hasTime()).toBe(true)
   })
 
   it('has a zero zone', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08T10:00:00')
+    var mom = FullCalendar.moment.parseZone('2014-06-08T10:00:00')
     expect(mom.utcOffset()).toBe(0)
   })
 
   it('formats without a zone part', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08T10:00:00')
+    var mom = FullCalendar.moment.parseZone('2014-06-08T10:00:00')
     expect(mom.format()).toBe('2014-06-08T10:00:00')
   })
 
   it('formats via toISOString without a zone part', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08T10:00:00')
+    var mom = FullCalendar.moment.parseZone('2014-06-08T10:00:00')
     expect(mom.toISOString()).toBe('2014-06-08T10:00:00')
   })
 
   it('formats via toISOString for locales with non-trivial formatting', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08T10:00:00').locale('ar')
+    var mom = FullCalendar.moment.parseZone('2014-06-08T10:00:00').locale('ar')
     expect(mom.toISOString()).toBe('2014-06-08T10:00:00')
   })
 
   it('formats ISO8601 via format() for locales with non-trivial formatting', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08T10:00:00').locale('ar')
+    var mom = FullCalendar.moment.parseZone('2014-06-08T10:00:00').locale('ar')
     expect(mom.format()).toBe('2014-06-08T10:00:00')
   })
 
   it('is correctly cloned', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08T10:00:00')
+    var mom = FullCalendar.moment.parseZone('2014-06-08T10:00:00')
     var clone = mom.clone()
     expect(clone.hasZone()).toBe(false)
     expect(clone.format()).toBe('2014-06-08T10:00:00')
@@ -47,7 +47,7 @@ describe('ambiguously-zoned moment', function() {
   })
 
   it('can be given a zone via utc', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08T10:00:00')
+    var mom = FullCalendar.moment.parseZone('2014-06-08T10:00:00')
     expect(mom.hasTime()).toBe(true)
     expect(mom.hasZone()).toBe(false)
     expect(mom.utcOffset()).toBe(0)
@@ -58,7 +58,7 @@ describe('ambiguously-zoned moment', function() {
   })
 
   it('can be given a zone via local', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08T10:00:00')
+    var mom = FullCalendar.moment.parseZone('2014-06-08T10:00:00')
     var equivDate = new Date(Date.UTC(2014, 5, 8, 10, 0, 0))
     expect(mom.toArray()).toEqual([ 2014, 5, 8, 10, 0, 0, 0 ])
     expect(mom.hasTime()).toBe(true)
@@ -72,7 +72,7 @@ describe('ambiguously-zoned moment', function() {
   })
 
   it('can be given a zone via zone', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08T10:00:00')
+    var mom = FullCalendar.moment.parseZone('2014-06-08T10:00:00')
     expect(mom.hasTime()).toBe(true)
     expect(mom.hasZone()).toBe(false)
     expect(mom.utcOffset()).toBe(0)
@@ -87,33 +87,33 @@ describe('ambiguously-zoned moment', function() {
 describe('ambiguously-timed moment', function() {
 
   it('has a false hasTime', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08')
+    var mom = FullCalendar.moment.parseZone('2014-06-08')
     expect(mom.hasTime()).toBe(false)
   })
 
   it('has a false hasZone', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08')
+    var mom = FullCalendar.moment.parseZone('2014-06-08')
     expect(mom.hasZone()).toBe(false)
   })
 
   it('has a zero time', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08')
+    var mom = FullCalendar.moment.parseZone('2014-06-08')
     var time = mom.time()
     expect(+time).toBe(0)
   })
 
   it('formats without a zone part', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08')
+    var mom = FullCalendar.moment.parseZone('2014-06-08')
     expect(mom.format()).toBe('2014-06-08')
   })
 
   it('formats via toISOString without a time part', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08')
+    var mom = FullCalendar.moment.parseZone('2014-06-08')
     expect(mom.toISOString()).toBe('2014-06-08')
   })
 
   it('is correctly cloned', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08')
+    var mom = FullCalendar.moment.parseZone('2014-06-08')
     var clone = mom.clone()
     expect(clone.hasTime()).toBe(false)
     expect(clone.format()).toBe('2014-06-08')
@@ -123,7 +123,7 @@ describe('ambiguously-timed moment', function() {
   })
 
   it('can be given a time', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08')
+    var mom = FullCalendar.moment.parseZone('2014-06-08')
     expect(mom.hasTime()).toBe(false)
     var time = moment.duration({ hours: 1, minutes: 25 })
     mom.time(time)
@@ -132,7 +132,7 @@ describe('ambiguously-timed moment', function() {
   })
 
   it('can be given a time and zone via utc', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08')
+    var mom = FullCalendar.moment.parseZone('2014-06-08')
     expect(mom.hasTime()).toBe(false)
     expect(mom.hasZone()).toBe(false)
     expect(mom.utcOffset()).toBe(0)
@@ -143,7 +143,7 @@ describe('ambiguously-timed moment', function() {
   })
 
   it('can be given a time and zone via local', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08')
+    var mom = FullCalendar.moment.parseZone('2014-06-08')
     var equivDate = new Date(2014, 5, 8, 10, 0, 0)
     expect(mom.toArray()).toEqual([ 2014, 5, 8, 0, 0, 0, 0 ])
     expect(mom.hasTime()).toBe(false)
@@ -157,7 +157,7 @@ describe('ambiguously-timed moment', function() {
   })
 
   it('can be given a time and zone via zone', function() {
-    var mom = $.fullCalendar.moment.parseZone('2014-06-08')
+    var mom = FullCalendar.moment.parseZone('2014-06-08')
     expect(mom.hasTime()).toBe(false)
     expect(mom.hasZone()).toBe(false)
     expect(mom.utcOffset()).toBe(0)
@@ -172,7 +172,7 @@ describe('ambiguously-timed moment', function() {
 describe('unambiguous moment', function() {
 
   it('can be made ambiguously-zoned via stripZone', function() {
-    var mom = $.fullCalendar.moment.utc('2014-06-08T10:00:00-0000')
+    var mom = FullCalendar.moment.utc('2014-06-08T10:00:00-0000')
     expect(mom.hasZone()).toBe(true)
     expect(mom.hasTime()).toBe(true)
     mom.stripZone()
@@ -182,7 +182,7 @@ describe('unambiguous moment', function() {
   })
 
   it('can be made ambigously-timed via stripTime', function() {
-    var mom = $.fullCalendar.moment.utc('2014-06-08T10:00:00-0000')
+    var mom = FullCalendar.moment.utc('2014-06-08T10:00:00-0000')
     expect(mom.hasTime()).toBe(true)
     expect(mom.hasZone()).toBe(true)
     mom.stripTime()

+ 18 - 18
tests/automated/legacy/moment-construct.js

@@ -1,15 +1,15 @@
 describe('moment constructor', function() {
 
-  describe('$.fullCalendar.moment', function() {
-    testDefaultProcessing($.fullCalendar.moment)
+  describe('FullCalendar.moment', function() {
+    testDefaultProcessing(FullCalendar.moment)
   })
 
-  describe('$.fullCalendar.moment.utc', function() {
-    testForcedUTCProcessing($.fullCalendar.moment.utc)
+  describe('FullCalendar.moment.utc', function() {
+    testForcedUTCProcessing(FullCalendar.moment.utc)
   })
 
-  describe('$.fullCalendar.moment.parseZone', function() {
-    testLiteralProcessing($.fullCalendar.moment.parseZone)
+  describe('FullCalendar.moment.parseZone', function() {
+    testLiteralProcessing(FullCalendar.moment.parseZone)
   })
 
   describe('Calendar::moment', function() {
@@ -136,7 +136,7 @@ describe('moment constructor', function() {
     describe('when given an existing FullCalendar moment', function() {
 
       it('remains ambiguously-zoned', function() {
-        var noTzMoment = $.fullCalendar.moment.parseZone('2014-05-28T00:00:00')
+        var noTzMoment = FullCalendar.moment.parseZone('2014-05-28T00:00:00')
         var newMoment = construct(noTzMoment)
         expect(newMoment.toArray()).toEqual([ 2014, 4, 28, 0, 0, 0, 0 ])
         expect(newMoment.hasTime()).toBe(true)
@@ -145,7 +145,7 @@ describe('moment constructor', function() {
       })
 
       it('remains ambiguously-timed', function() {
-        var noTimeMoment = $.fullCalendar.moment('2014-05-28')
+        var noTimeMoment = FullCalendar.moment('2014-05-28')
         var newMoment = construct(noTimeMoment)
         expect(newMoment.toArray()).toEqual([ 2014, 4, 28, 0, 0, 0, 0 ])
         expect(newMoment.hasTime()).toBe(false)
@@ -155,7 +155,7 @@ describe('moment constructor', function() {
     });
 
     [
-      { description: 'when given an existing FullCalendar moment', moment: $.fullCalendar.moment },
+      { description: 'when given an existing FullCalendar moment', moment: FullCalendar.moment },
       { description: 'when given an existing basic moment', moment: moment }
     ]
       .forEach(function(scenario) {
@@ -289,7 +289,7 @@ describe('moment constructor', function() {
     describe('when given an existing FullCalendar moment', function() {
 
       it('converts to local when ambiguously-zoned', function() {
-        var noTzMoment = $.fullCalendar.moment.parseZone('2014-05-28T00:00:00')
+        var noTzMoment = FullCalendar.moment.parseZone('2014-05-28T00:00:00')
         var newMoment = construct(noTzMoment)
         var dateEquiv = new Date(2014, 4, 28)
         expect(newMoment.toArray()).toEqual([ 2014, 4, 28, 0, 0, 0, 0 ])
@@ -299,7 +299,7 @@ describe('moment constructor', function() {
       })
 
       it('remains ambiguously-timed', function() {
-        var noTimeMoment = $.fullCalendar.moment('2014-05-28')
+        var noTimeMoment = FullCalendar.moment('2014-05-28')
         var newMoment = construct(noTimeMoment)
         expect(newMoment.toArray()).toEqual([ 2014, 4, 28, 0, 0, 0, 0 ])
         expect(newMoment.hasTime()).toBe(false)
@@ -309,7 +309,7 @@ describe('moment constructor', function() {
     });
 
     [
-      { description: 'when given an existing FullCalendar moment', moment: $.fullCalendar.moment },
+      { description: 'when given an existing FullCalendar moment', moment: FullCalendar.moment },
       { description: 'when given an existing basic moment', moment: moment }
     ]
       .forEach(function(scenario) {
@@ -439,7 +439,7 @@ describe('moment constructor', function() {
     describe('when given an existing FullCalendar moment', function() {
 
       it('converts to UTC when ambiguously-zoned', function() {
-        var noTzMoment = $.fullCalendar.moment.utc('2014-05-28T00:00:00')
+        var noTzMoment = FullCalendar.moment.utc('2014-05-28T00:00:00')
         var newMoment = construct(noTzMoment)
         expect(newMoment.toArray()).toEqual([ 2014, 4, 28, 0, 0, 0, 0 ])
         expect(newMoment.hasTime()).toBe(true)
@@ -448,7 +448,7 @@ describe('moment constructor', function() {
       })
 
       it('remains ambiguously-timed', function() {
-        var noTimeMoment = $.fullCalendar.moment('2014-05-28')
+        var noTimeMoment = FullCalendar.moment('2014-05-28')
         var newMoment = construct(noTimeMoment)
         expect(newMoment.toArray()).toEqual([ 2014, 4, 28, 0, 0, 0, 0 ])
         expect(newMoment.hasTime()).toBe(false)
@@ -458,7 +458,7 @@ describe('moment constructor', function() {
     });
 
     [
-      { description: 'when given an existing FullCalendar moment', moment: $.fullCalendar.moment },
+      { description: 'when given an existing FullCalendar moment', moment: FullCalendar.moment },
       { description: 'when given an existing basic moment', moment: moment }
     ]
       .forEach(function(scenario) {
@@ -588,7 +588,7 @@ describe('moment constructor', function() {
     describe('when given an existing FullCalendar moment', function() {
 
       it('remains ambiguously-zoned', function() {
-        var noTzMoment = $.fullCalendar.moment.parseZone('2014-05-28T00:00:00')
+        var noTzMoment = FullCalendar.moment.parseZone('2014-05-28T00:00:00')
         var newMoment = construct(noTzMoment)
         expect(newMoment.toArray()).toEqual([ 2014, 4, 28, 0, 0, 0, 0 ])
         expect(newMoment.hasTime()).toBe(true)
@@ -597,7 +597,7 @@ describe('moment constructor', function() {
       })
 
       it('remains ambiguously-timed', function() {
-        var noTimeMoment = $.fullCalendar.moment('2014-05-28')
+        var noTimeMoment = FullCalendar.moment('2014-05-28')
         var newMoment = construct(noTimeMoment)
         expect(newMoment.toArray()).toEqual([ 2014, 4, 28, 0, 0, 0, 0 ])
         expect(newMoment.hasTime()).toBe(false)
@@ -607,7 +607,7 @@ describe('moment constructor', function() {
     });
 
     [
-      { description: 'when given an existing FullCalendar moment', moment: $.fullCalendar.moment },
+      { description: 'when given an existing FullCalendar moment', moment: FullCalendar.moment },
       { description: 'when given an existing basic moment', moment: moment }
     ]
       .forEach(function(scenario) {

+ 11 - 11
tests/automated/legacy/moment-formatting.js

@@ -2,7 +2,7 @@
 describe('moment date formatting', function() {
 
   it('should let vanilla momentjs formatting to work correctly', function() {
-    var mom = $.fullCalendar.moment.utc('2014-05-20T14:00:00')
+    var mom = FullCalendar.moment.utc('2014-05-20T14:00:00')
     var s1 = mom.format('dddd, MMMM Do YYYY, h:mm:ss a')
     var s2 = mom.format('ddd, hA Z')
     expect(s1).toEqual('Tuesday, May 20th 2014, 2:00:00 pm')
@@ -10,26 +10,26 @@ describe('moment date formatting', function() {
   })
 
   it('should allow momentjs text escaping', function() {
-    var mom = $.fullCalendar.moment.utc('2014-05-20T14:00:00')
+    var mom = FullCalendar.moment.utc('2014-05-20T14:00:00')
     var s = mom.format('MMMM Do YYYY [TIME:] h:mm:ss a')
     expect(s).toEqual('May 20th 2014 TIME: 2:00:00 pm')
   })
 
   it('should correctly output LT (regression)', function() {
-    var mom = $.fullCalendar.moment.utc('2014-05-20T06:00:00')
+    var mom = FullCalendar.moment.utc('2014-05-20T06:00:00')
     var s = mom.format('ddd, LT')
     expect(s).toEqual('Tue, 6:00 AM')
   })
 
   it('should correctly output hT (regression)', function() {
-    var mom = $.fullCalendar.moment.utc('2014-05-20T06:00:00')
+    var mom = FullCalendar.moment.utc('2014-05-20T06:00:00')
     var s = mom.format('ddd, hT')
     expect(s).toEqual('Tue, 6A')
   })
 
   it('should output A/P with the \'T\' formatting character', function() {
-    var mom1 = $.fullCalendar.moment.utc('2014-05-20T06:00:00')
-    var mom2 = $.fullCalendar.moment.utc('2014-05-20T14:00:00')
+    var mom1 = FullCalendar.moment.utc('2014-05-20T06:00:00')
+    var mom2 = FullCalendar.moment.utc('2014-05-20T14:00:00')
     var s1 = mom1.format('ddd, h T')
     var s2 = mom2.format('ddd, h T')
     expect(s1).toEqual('Tue, 6 A')
@@ -37,8 +37,8 @@ describe('moment date formatting', function() {
   })
 
   it('should output A/P with the \'t\' formatting character', function() {
-    var mom1 = $.fullCalendar.moment.utc('2014-05-20T06:00:00')
-    var mom2 = $.fullCalendar.moment.utc('2014-05-20T14:00:00')
+    var mom1 = FullCalendar.moment.utc('2014-05-20T06:00:00')
+    var mom2 = FullCalendar.moment.utc('2014-05-20T14:00:00')
     var s1 = mom1.format('ddd, h t')
     var s2 = mom2.format('ddd, h t')
     expect(s1).toEqual('Tue, 6 a')
@@ -46,19 +46,19 @@ describe('moment date formatting', function() {
   })
 
   it('should output non-zero numbers enclosed in parenthesis', function() {
-    var mom = $.fullCalendar.moment.utc('2014-05-20T06:30:00')
+    var mom = FullCalendar.moment.utc('2014-05-20T06:30:00')
     var s = mom.format('ddd h(:mm)a')
     expect(s).toEqual('Tue 6:30am')
   })
 
   it('should not output zero numbers enclosed in parenthesis', function() {
-    var mom = $.fullCalendar.moment.utc('2014-05-20T06:00:00')
+    var mom = FullCalendar.moment.utc('2014-05-20T06:00:00')
     var s = mom.format('ddd h(:mm)a')
     expect(s).toEqual('Tue 6am')
   })
 
   it('should allow escaping of parenthesis as literal text', function() {
-    var mom = $.fullCalendar.moment.utc('2014-05-20T06:00:00')
+    var mom = FullCalendar.moment.utc('2014-05-20T06:00:00')
     var s1 = mom.format('ddd h[(]:mm)a')
     // var s2 = mom.format('ddd h(:mm[)]a'); // we currently cant nest [] inside ()
     expect(s1).toEqual('Tue 6(:00)am')

+ 9 - 9
tests/automated/legacy/moment-misc.js

@@ -6,13 +6,13 @@ describe('FCMoment::time', function() {
     // is taken care of in moment-ambig.js
 
     it('should return 00:00 for a moment with 00:00 time', function() {
-      var mom = $.fullCalendar.moment.utc('2014-06-08T00:00:00')
+      var mom = FullCalendar.moment.utc('2014-06-08T00:00:00')
       var time = mom.time()
       expect(time).toEqualDuration('00:00')
     })
 
     it('should return the time of a moment with a time', function() {
-      var mom = $.fullCalendar.moment.utc('2014-06-08T07:30:00')
+      var mom = FullCalendar.moment.utc('2014-06-08T07:30:00')
       var time = mom.time()
       expect(time).toEqualDuration('07:30')
     })
@@ -26,21 +26,21 @@ describe('FCMoment::time', function() {
     describe('when setting with a Duration', function() {
 
       it('should give a moment with 00:00 a time', function() {
-        var mom = $.fullCalendar.moment.utc('2014-06-08T00:00:00')
+        var mom = FullCalendar.moment.utc('2014-06-08T00:00:00')
         var dur = moment.duration('13:25')
         mom.time(dur)
         expect(mom).toEqualMoment('2014-06-08T13:25:00+00:00')
       })
 
       it('should overwrite the time of a moment with a time', function() {
-        var mom = $.fullCalendar.moment.utc('2014-06-08T05:00:00')
+        var mom = FullCalendar.moment.utc('2014-06-08T05:00:00')
         var dur = moment.duration('13:25')
         mom.time(dur)
         expect(mom).toEqualMoment('2014-06-08T13:25:00+00:00')
       })
 
       it('should move to next day if greater than 24 hours', function() {
-        var mom = $.fullCalendar.moment.utc('2014-06-08T00:00:00')
+        var mom = FullCalendar.moment.utc('2014-06-08T00:00:00')
         var dur = moment.duration('1.01:00:00') // 1 day, 1 hour
         mom.time(dur)
         expect(mom).toEqualMoment('2014-06-09T01:00:00+00:00')
@@ -50,15 +50,15 @@ describe('FCMoment::time', function() {
     describe('when setting with another Moment', function() {
 
       it('should give a moment with 00:00 a time', function() {
-        var mom1 = $.fullCalendar.moment.utc('2014-06-09T00:00:00')
-        var mom2 = $.fullCalendar.moment.utc('2014-07-22T05:30:00') // a Tues, so .days() -> 2
+        var mom1 = FullCalendar.moment.utc('2014-06-09T00:00:00')
+        var mom2 = FullCalendar.moment.utc('2014-07-22T05:30:00') // a Tues, so .days() -> 2
         mom1.time(mom2)
         expect(mom1).toEqualMoment('2014-06-09T05:30:00+00:00')
       })
 
       it('should overwrite the time of a moment with a time', function() {
-        var mom1 = $.fullCalendar.moment.utc('2014-06-09T04:15:00')
-        var mom2 = $.fullCalendar.moment.utc('2014-07-22T05:30:00') // a Tues, so .days() -> 2
+        var mom1 = FullCalendar.moment.utc('2014-06-09T04:15:00')
+        var mom2 = FullCalendar.moment.utc('2014-07-22T05:30:00') // a Tues, so .days() -> 2
         mom1.time(mom2)
         expect(mom1).toEqualMoment('2014-06-09T05:30:00+00:00')
       })

+ 3 - 3
tests/automated/legacy/monthNames.js

@@ -28,7 +28,7 @@ describe('month name', function() {
 
         moment.months().forEach(function(month, index, months) {
           it('should be ' + month, function(done) {
-            settings.defaultDate = $.fullCalendar.moment(referenceDate).add(index, 'months')
+            settings.defaultDate = FullCalendar.moment(referenceDate).add(index, 'months')
             settings.eventAfterAllRender = function() {
               expect($('.fc-toolbar h2')).toContainText(month)
               done()
@@ -51,7 +51,7 @@ describe('month name', function() {
               var localeMonths = moment.months()
               var localeMonth = localeMonths[index]
 
-              settings.defaultDate = $.fullCalendar.moment(referenceDate).add(index, 'months')
+              settings.defaultDate = FullCalendar.moment(referenceDate).add(index, 'months')
               settings.eventAfterAllRender = function() {
                 if (viewClass === 'month') { // with month view check for occurence of the monthname in the title
                   expect($('.fc-toolbar h2')).toContainText(localeMonth)
@@ -85,7 +85,7 @@ describe('month name', function() {
 
         months.forEach(function(month, index, months) { // `month` is our custom month name
           it('should be the translated name for ' + month, function(done) {
-            settings.defaultDate = $.fullCalendar.moment(referenceDate).add(index, 'months')
+            settings.defaultDate = FullCalendar.moment(referenceDate).add(index, 'months')
             settings.monthNames = months
             settings.eventAfterAllRender = function() {
               expect($('.fc-toolbar h2')).toContainText(month)

+ 3 - 3
tests/automated/legacy/monthNamesShort.js

@@ -28,7 +28,7 @@ describe('short month name', function() {
 
         moment.monthsShort().forEach(function(monthShort, index) {
           it('should be ' + monthShort, function(done) {
-            settings.defaultDate = $.fullCalendar.moment(referenceDate).add(index, 'months')
+            settings.defaultDate = FullCalendar.moment(referenceDate).add(index, 'months')
             settings.eventAfterAllRender = function() {
               expect($('.fc-toolbar h2')).toContainText(monthShort)
               done()
@@ -51,7 +51,7 @@ describe('short month name', function() {
               var localeMonthsShort = moment.monthsShort()
               var localeMonthShort = localeMonthsShort[index]
 
-              settings.defaultDate = $.fullCalendar.moment(referenceDate).add(index, 'months')
+              settings.defaultDate = FullCalendar.moment(referenceDate).add(index, 'months')
               settings.eventAfterAllRender = function() {
                 expect($('.fc-toolbar h2')).toContainText(localeMonthShort)
                 done()
@@ -81,7 +81,7 @@ describe('short month name', function() {
 
         monthsShort.forEach(function(monthShort, index) { // `monthShort` will be our custom month name
           it('should be the translated name for ' + monthShort, function(done) {
-            settings.defaultDate = $.fullCalendar.moment(referenceDate).add(index, 'months')
+            settings.defaultDate = FullCalendar.moment(referenceDate).add(index, 'months')
             settings.monthNamesShort = monthsShort
             settings.eventAfterAllRender = function() {
               expect($('.fc-toolbar h2')).toContainText(monthShort)

+ 6 - 6
tests/automated/legacy/navLinks.js

@@ -150,7 +150,7 @@ describe('navLinks', function() {
   ------------------------------------------------------------------------------------------------------------------ */
 
   function expectDayView(viewName, dayDate) {
-    dayDate = $.fullCalendar.moment(dayDate)
+    dayDate = FullCalendar.moment(dayDate)
     expect(getCurrentViewName()).toBe(viewName)
     var dates = getDayGridDates()
     expect(dates.length).toBe(1)
@@ -158,7 +158,7 @@ describe('navLinks', function() {
   }
 
   function expectWeekView(viewName, firstDayDate) {
-    firstDayDate = $.fullCalendar.moment(firstDayDate)
+    firstDayDate = FullCalendar.moment(firstDayDate)
     expect(getCurrentViewName()).toBe(viewName)
     var dates = getDayGridDates()
     expect(dates.length).toBe(7)
@@ -172,7 +172,7 @@ describe('navLinks', function() {
   // day headers (for both day grid and time grid)
 
   function getDayHeaderLink(dayDate) {
-    dayDate = $.fullCalendar.moment(dayDate)
+    dayDate = FullCalendar.moment(dayDate)
     return $('.fc-day-header[data-date="' + dayDate.format('YYYY-MM-DD') + '"] a')
   }
 
@@ -183,7 +183,7 @@ describe('navLinks', function() {
   // day grid
 
   function getDayGridNumberEl(dayDate) {
-    dayDate = $.fullCalendar.moment(dayDate)
+    dayDate = FullCalendar.moment(dayDate)
     return $('.fc-day-top[data-date="' + dayDate.format('YYYY-MM-DD') + '"] .fc-day-number')
   }
 
@@ -197,14 +197,14 @@ describe('navLinks', function() {
 
   function getDayGridDates() {
     return $('.fc-day-grid .fc-day').map(function(i, el) {
-      return $.fullCalendar.moment($(el).data('date'))
+      return FullCalendar.moment($(el).data('date'))
     }).get()
   }
 
   // list view
 
   function getListDayHeaderLink(dayDate) {
-    dayDate = $.fullCalendar.moment(dayDate)
+    dayDate = FullCalendar.moment(dayDate)
     return $('.fc-list-heading[data-date="' + dayDate.format('YYYY-MM-DD') + '"] a.fc-list-heading-main')
   }
 

+ 1 - 2
tests/automated/legacy/nowIndicator.js

@@ -3,7 +3,6 @@ import { isElWithinRtl } from '../lib/dom-misc'
 import { getTimeGridLine } from '../lib/time-grid'
 
 describe('now indicator', function() {
-  var FC = $.fullCalendar
   var options
 
   beforeEach(function() {
@@ -71,7 +70,7 @@ describe('now indicator', function() {
     it('doesnt double render indicator arrow', function(done) {
 
       // force the indicator to update every second
-      var getNowIndicatorUnit = spyOnMethod(FC.TimeGrid, 'getNowIndicatorUnit', true)
+      var getNowIndicatorUnit = spyOnMethod(FullCalendar.TimeGrid, 'getNowIndicatorUnit', true)
         .and.returnValue('second')
 
       options.defaultDate = '2016-01-01' // does NOT have "now" in view

+ 1 - 1
tests/automated/legacy/unselectAuto.js

@@ -1,6 +1,6 @@
 
 describe('unselectAuto', function() {
-  var View = $.fullCalendar.View
+  var View = FullCalendar.View
   var options
 
   beforeEach(function() {

+ 1 - 1
tests/automated/legacy/weekViewRender.js

@@ -1,6 +1,6 @@
 describe('weekViewRender', function() {
 
-  var nowStr = $.fullCalendar.moment(new Date()).format('YYYY-MM-DD')
+  var nowStr = FullCalendar.moment(new Date()).format('YYYY-MM-DD')
 
   pushOptions({
     defaultDate: nowStr,

+ 1 - 1
tests/automated/lib/day-grid.js

@@ -1,6 +1,6 @@
 
 export function getDayGridDayEls(date) {
-  date = $.fullCalendar.moment.parseZone(date)
+  date = FullCalendar.moment.parseZone(date)
   return $(`.fc-day-grid .fc-day[data-date="${date.format('YYYY-MM-DD')}"]`)
 }
 

+ 3 - 3
tests/automated/lib/moment.js

@@ -18,8 +18,8 @@ beforeEach(function() {
     toEqualMoment() {
       return {
         compare: function(actual, expected) {
-          var actualStr = $.fullCalendar.moment.parseZone(actual).format()
-          var expectedStr = $.fullCalendar.moment.parseZone(expected).format()
+          var actualStr = FullCalendar.moment.parseZone(actual).format()
+          var expectedStr = FullCalendar.moment.parseZone(expected).format()
           var result = {
             pass: actualStr === expectedStr
           }
@@ -33,7 +33,7 @@ beforeEach(function() {
     toEqualNow() {
       return {
         compare: function(actual) {
-          var actualMoment = $.fullCalendar.moment.parseZone(actual)
+          var actualMoment = FullCalendar.moment.parseZone(actual)
           var result = {
             pass: Math.abs(actualMoment - new Date()) < 1000 // within a second of current datetime
           }

+ 4 - 4
tests/automated/lib/time-grid.js

@@ -44,7 +44,7 @@ export function selectTimeGrid(start, inclusiveEnd) {
 
 
 export function getTimeGridPoint(date) {
-  date = $.fullCalendar.moment.parseZone(date)
+  date = FullCalendar.moment.parseZone(date)
   var top = getTimeGridTop(date.time())
   var dayEls = getTimeGridDayEls(date)
   var dayRect
@@ -60,7 +60,7 @@ export function getTimeGridPoint(date) {
 
 
 export function getTimeGridLine(date) { // not in Scheduler
-  date = $.fullCalendar.moment.parseZone(date)
+  date = FullCalendar.moment.parseZone(date)
   var top = getTimeGridTop(date.time())
   var dayEls = getTimeGridDayEls(date)
   var dayRect
@@ -131,7 +131,7 @@ export function getTimeGridTop(targetTime) {
 
 
 export function getTimeGridDayEls(date) {
-  date = $.fullCalendar.moment.parseZone(date)
+  date = FullCalendar.moment.parseZone(date)
 
   return $('.fc-time-grid .fc-day[data-date="' + date.format('YYYY-MM-DD') + '"]')
 }
@@ -139,7 +139,7 @@ export function getTimeGridDayEls(date) {
 
 export function getTimeGridSlotEls(timeDuration) {
   timeDuration = moment.duration(timeDuration)
-  const date = $.fullCalendar.moment.utc('2016-01-01').time(timeDuration)
+  const date = FullCalendar.moment.utc('2016-01-01').time(timeDuration)
   if (date.date() === 1) { // ensure no time overflow/underflow
     return $(`.fc-time-grid .fc-slats tr[data-time="${date.format('HH:mm:ss')}"]`)
   } else {

+ 2 - 3
tests/automated/performance/rerenders.js

@@ -1,6 +1,6 @@
 
 // HACK: we know Scheduler introduces an extra rerender :(
-const SKIP_RERENDERS = Boolean($.fullCalendar.schedulerVersion)
+const SKIP_RERENDERS = Boolean(FullCalendar.schedulerVersion)
 if (SKIP_RERENDERS) {
   console.log('skipping rerenders')
 }
@@ -8,7 +8,6 @@ if (SKIP_RERENDERS) {
 // eslint-disable-next-line
 SKIP_RERENDERS ||
 describe('rerender performance', function() {
-  var FC = $.fullCalendar
 
   pushOptions({
     defaultDate: '2017-10-04',
@@ -37,7 +36,7 @@ describe('rerender performance', function() {
   ].forEach(function(settings) {
     settings.classes.forEach(function(className) {
       describe('for ' + className + ' in ' + settings.defaultView + ' view', function() {
-        var Class = FC[className]
+        var Class = FullCalendar[className]
 
         it('calls methods a limited number of times', function(done) {
           var executeDateRender = spyOnMethod(Class, 'executeDateRender')

+ 1 - 1
tests/automated/util/Model.js

@@ -1,6 +1,6 @@
 
 describe('Model', function() {
-  var Model = $.fullCalendar.Model
+  var Model = FullCalendar.Model
 
   describe('set/get', function() {
 

+ 1 - 1
tests/automated/util/RenderQueue.js

@@ -1,6 +1,6 @@
 
 describe('RenderQueue', function() {
-  var RenderQueue = $.fullCalendar.RenderQueue
+  var RenderQueue = FullCalendar.RenderQueue
 
   it('executes atomic events in sequence', function() {
     var ops = []

+ 1 - 1
tests/automated/util/TaskQueue.js

@@ -1,6 +1,6 @@
 
 describe('TaskQueue', function() {
-  var TaskQueue = $.fullCalendar.TaskQueue
+  var TaskQueue = FullCalendar.TaskQueue
 
   it('executes first task immediately', function() {
     var q = new TaskQueue()

+ 1 - 1
tests/automated/view-dates/validRange.js

@@ -102,7 +102,7 @@ describe('validRange', function() {
 
       it('can return a range object with moments', function() {
         var validRangeSpy = spyOnCalendarCallback('validRange', function() {
-          return { start: $.fullCalendar.moment.parseZone('2017-06-06') }
+          return { start: FullCalendar.moment.parseZone('2017-06-06') }
         })
 
         initCalendar()

+ 4 - 4
tests/automated/view-dates/visibleRange.js

@@ -13,8 +13,8 @@ describe('visibleRange', function() {
 
       describeOptions('visibleRange', {
         'of moment objects': {
-          start: $.fullCalendar.moment(startInput),
-          end: $.fullCalendar.moment(endInput)
+          start: FullCalendar.moment(startInput),
+          end: FullCalendar.moment(endInput)
         },
         'of strings': {
           start: startInput,
@@ -22,8 +22,8 @@ describe('visibleRange', function() {
         },
         'of a function that returns moment objects': function() {
           return {
-            start: $.fullCalendar.moment(startInput),
-            end: $.fullCalendar.moment(endInput)
+            start: FullCalendar.moment(startInput),
+            end: FullCalendar.moment(endInput)
           }
         },
         'of a function that returns strings': function() {

+ 1 - 1
tests/automated/view-render/DayGridRenderUtils.js

@@ -1,6 +1,6 @@
 
 export function getSingleDayEl(date) {
-  date = $.fullCalendar.moment.parseZone(date)
+  date = FullCalendar.moment.parseZone(date)
   var els = $('.fc-day-grid .fc-bg .fc-day[data-date="' + date.format('YYYY-MM-DD') + '"]')
   expect(els).toHaveLength(1)
   return els

+ 1 - 1
tests/automated/view-render/ViewRenderUtils.js

@@ -30,7 +30,7 @@ export function expectDay(date, bool) {
 
 
 function processWholeDay(date) {
-  date = $.fullCalendar.moment.parseZone(date)
+  date = FullCalendar.moment.parseZone(date)
   expect(date.hasTime()).toBe(false)
   expect(date.hasZone()).toBe(false)
   return date

+ 6 - 7
tests/automated/view-type/exposed-classes.js

@@ -2,15 +2,14 @@
 describe('internal View/Grid classes', function() {
 
   it('are exposed', function() {
-    var FC = $.fullCalendar
 
-    expect(typeof FC.AgendaView).toBe('function')
-    expect(typeof FC.BasicView).toBe('function')
-    expect(typeof FC.MonthView).toBe('function')
-    expect(typeof FC.ListView).toBe('function')
+    expect(typeof FullCalendar.AgendaView).toBe('function')
+    expect(typeof FullCalendar.BasicView).toBe('function')
+    expect(typeof FullCalendar.MonthView).toBe('function')
+    expect(typeof FullCalendar.ListView).toBe('function')
 
-    expect(typeof FC.DayGrid).toBe('function')
-    expect(typeof FC.TimeGrid).toBe('function')
+    expect(typeof FullCalendar.DayGrid).toBe('function')
+    expect(typeof FullCalendar.TimeGrid).toBe('function')
   })
 
 })

+ 3 - 3
tests/manual/es6-class-extend.html

@@ -9,7 +9,7 @@
 <script src='../../dist/fullcalendar.js'></script>
 <script>
 
-  let { AgendaView, TimeGrid } = $.fullCalendar;
+  let { AgendaView, TimeGrid } = FullCalendar;
 
   class CustomTimeGrid extends TimeGrid {
     constructor(...args) {
@@ -29,9 +29,9 @@
   }
 
   // ugly, because of https://github.com/fullcalendar/fullcalendar/issues/3657
-  $.fullCalendar.views.custom = {
+  FullCalendar.views.custom = {
     class: CustomView,
-    defaults: $.fullCalendar.views.agenda.defaults
+    defaults: FullCalendar.views.agenda.defaults
   };
 
   $(document).ready(function() {

+ 1 - 1
tests/manual/gcal.html

@@ -25,7 +25,7 @@
           className: 'holiday'
         },
         /*
-        $.fullCalendar.gcalFeed(
+        FullCalendar.gcalFeed(
           "http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic",
           {
             editable: true,

+ 8 - 8
tests/manual/issue_221_quick_remove_source.html

@@ -8,11 +8,11 @@
 <script src='../../dist/fullcalendar.js'></script>
 <script src='../../dist/gcal.js'></script>
 <script>
-  
-  var gcalFeed = $.fullCalendar.gcalFeed("http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic");
+
+  var gcalFeed = FullCalendar.gcalFeed("http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic");
 
   $(document).ready(function() {
-  
+
     var cal = $('#calendar').fullCalendar({
       header: {
         left: 'prev,next today',
@@ -27,12 +27,12 @@
         }
       }
     });
-    
+
     cal.fullCalendar('addEventSource', gcalFeed);
     cal.fullCalendar('removeEventSource', gcalFeed);
-    
+
     // events should not be rendered when jsonp returns!
-    
+
   });
 
 </script>
@@ -41,11 +41,11 @@
   .red-event a {
     background: red;
   }
-  
+
   .yellow-event a {
     background: yellow;
   }
-  
+
   .black-text-event a {
     color: #000;
   }

+ 4 - 4
tests/manual/issue_417_refetchEvents.html

@@ -17,12 +17,12 @@
   */
 
   $(document).ready(function() {
-  
+
     var date = new Date();
     var d = date.getDate();
     var m = date.getMonth();
     var y = date.getFullYear();
-    
+
     $('#calendar').fullCalendar({
       year: 2010,
       month: 9,
@@ -33,9 +33,9 @@
         right: 'month,agendaDay'
       },
       editable: true,
-      events: $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic')
+      events: FullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic')
     });
-    
+
   });
 
 </script>

+ 4 - 4
tests/manual/issue_554.html

@@ -10,12 +10,12 @@
 <script>
 
   $(document).ready(function() {
-  
+
     var date = new Date();
     var d = date.getDate();
     var m = date.getMonth();
     var y = date.getFullYear();
-    
+
     $('#calendar').fullCalendar({
       year: 2010,
       month: 9,
@@ -25,9 +25,9 @@
         center: 'title',
         right: 'month,agendaDay'
       },
-      events: $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic')
+      events: FullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic')
     });
-    
+
   });
 
 </script>

+ 5 - 5
tests/manual/issue_586_refetchEvents.html

@@ -10,12 +10,12 @@
 <script>
 
   $(document).ready(function() {
-  
+
     var date = new Date();
     var d = date.getDate();
     var m = date.getMonth();
     var y = date.getFullYear();
-    
+
     $('#calendar').fullCalendar({
       header: {
         left: 'prev,next today',
@@ -23,11 +23,11 @@
         right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
       },
       editable: true,
-      events: $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic')
+      events: FullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic')
     });
-    
+
   });
-  
+
   function doit() {
     var calendar = $('#calendar');
     calendar.fullCalendar('removeEvents');

+ 7 - 7
tests/manual/issue_616.html

@@ -10,12 +10,12 @@
 <script>
 
   $(document).ready(function() {
-  
+
     var date = new Date();
     var d = date.getDate();
     var m = date.getMonth();
     var y = date.getFullYear();
-    
+
     $('#calendar').fullCalendar({
       header: {
         left: 'prev,next today',
@@ -24,17 +24,17 @@
       },
       editable: true
     });
-    
+
   });
-  
-  
+
+
   function doit() {
     var calendar = $('#calendar');
-    var gcal = $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic');
+    var gcal = FullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic');
     calendar.fullCalendar('addEventSource', gcal);
     calendar.fullCalendar('refetchEvents');
   }
-  
+
 
 </script>
 <style>

+ 9 - 9
tests/manual/issue_679.html

@@ -10,12 +10,12 @@
 <script>
 
   $(document).ready(function() {
-  
+
     var date = new Date();
     var d = date.getDate();
     var m = date.getMonth();
     var y = date.getFullYear();
-    
+
     $('#calendar').fullCalendar({
       header: {
         left: 'prev,next today',
@@ -24,20 +24,20 @@
       },
       editable: true
     });
-    
+
   });
-  
-  
+
+
   function doit() {
     var calendar = $('#calendar');
-    var holidays = $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic');
-    var moon = $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic');
-    var australia = $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/en.australian%23holiday%40group.v.calendar.google.com/public/basic');
+    var holidays = FullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic');
+    var moon = FullCalendar.gcalFeed('http://www.google.com/calendar/feeds/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic');
+    var australia = FullCalendar.gcalFeed('http://www.google.com/calendar/feeds/en.australian%23holiday%40group.v.calendar.google.com/public/basic');
     calendar.fullCalendar('addEventSource', holidays);
     calendar.fullCalendar('addEventSource', moon);
     calendar.fullCalendar('addEventSource', australia);
   }
-  
+
 
 </script>
 <style>

+ 1 - 1
tests/manual/locales-datepicker.html

@@ -16,7 +16,7 @@
     var currentLocaleCode = 'en';
 
     // build the locale selector's options
-    $.each($.fullCalendar.locales, function(localeCode) {
+    $.each(FullCalendar.locales, function(localeCode) {
       $('#locale-selector').append(
         $('<option/>')
           .attr('value', localeCode)

+ 10 - 10
tests/manual/methods.html

@@ -10,7 +10,7 @@
 <script>
 
   var cal, staticEvents;
-  
+
   var date = new Date();
   var d = date.getDate();
   var m = date.getMonth();
@@ -81,7 +81,7 @@
       ]
     });
   });
-  
+
   function updateEventStart() {
     var event = cal.fullCalendar('clientEvents', 777)[0];
     event.start = new Date(y, m, d, 13, 30);
@@ -91,7 +91,7 @@
     //event.allDay = true;
     cal.fullCalendar('updateEvent', event);
   }
-  
+
   function updateRepeatingEvent() {
     var event = cal.fullCalendar('clientEvents', 999)[0];
     event.start = new Date(y, m, 4, 13, 30);
@@ -105,29 +105,29 @@
     cal.fullCalendar('updateEvent', event);
     //console.log(cal.fullCalendar('clientEvents', 2));
   }
-  
+
   function renderEvent(stick) {
     cal.fullCalendar('renderEvent', {
       start: new Date(y, m, 17),
       title: 'heyman'
     }, stick);
   }
-  
+
   function getView() {
     var view = cal.fullCalendar('getView');
     console.log(view.start + ' --- ' + view.end + ' "' + view.title + '"');
   }
-  
+
   function getDate() {
     console.log(cal.fullCalendar('getDate'));
   }
-  
+
   function optionGetter() {
     console.log(cal.fullCalendar('option', 'editable'));
   }
-  
-  var gcalFeed = $.fullCalendar.gcalFeed("http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic");
-  
+
+  var gcalFeed = FullCalendar.gcalFeed("http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic");
+
   var jsonFeed = "../demos/json-events.php";
 
 </script>

+ 1 - 1
tests/manual/sources.html

@@ -16,7 +16,7 @@
   var m = date.getMonth();
   var y = date.getFullYear();
 
-  var gcalFeed = $.fullCalendar.gcalFeed("http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic");
+  var gcalFeed = FullCalendar.gcalFeed("http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic");
 
   var jsonFeed = "../demos/json-events.php";
 

+ 9 - 9
tests/manual/sources_new.html

@@ -52,7 +52,7 @@ $(document).ready(function() {
   var d = date.getDate();
   var m = date.getMonth();
   var y = date.getFullYear();
-  
+
   $('#calendar').fullCalendar({
     header: {
       left: 'prev,next today',
@@ -70,7 +70,7 @@ $(document).ready(function() {
     selectHelper: true,
     dragOpacity: .5,
     eventSources: [
-    
+
       {
         url: 'http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic',
         color: 'orange',
@@ -80,14 +80,14 @@ $(document).ready(function() {
         },
         editable: true
       },
-      
+
       /*
-      $.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic', {
+      FullCalendar.gcalFeed('http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/basic', {
         color: 'orange',
         className: 'gcal'
       }),
       */
-      
+
       {
         url: "../demos/json-events.php",
         //editable: false,
@@ -99,7 +99,7 @@ $(document).ready(function() {
           console.log('json-events.php is done!!!', arguments);
         }
       },
-    
+
       {
         color: 'purple',
         //editable: false,
@@ -131,7 +131,7 @@ $(document).ready(function() {
           }
         ]
       },
-      
+
       {
         events: [
           {
@@ -159,7 +159,7 @@ $(document).ready(function() {
           }
         ]
       }
-      
+
     ],
     eventClick: function(event) {
       if (event.url) {
@@ -168,7 +168,7 @@ $(document).ready(function() {
       return false;
     }
   });
-  
+
 });
 
 </script>