Parcourir la source

isRtl -> in tests and demos

Adam Shaw il y a 7 ans
Parent
commit
2ee727ccb0
38 fichiers modifiés avec 95 ajouts et 93 suppressions
  1. 1 1
      locale/ar-dz.js
  2. 1 1
      locale/ar-kw.js
  3. 1 1
      locale/ar-ly.js
  4. 1 1
      locale/ar-ma.js
  5. 1 1
      locale/ar-sa.js
  6. 1 1
      locale/ar-tn.js
  7. 1 1
      locale/ar.js
  8. 1 1
      locale/fa.js
  9. 1 1
      locale/he.js
  10. 2 2
      tests/automated/legacy/Agenda-render.js
  11. 7 7
      tests/automated/legacy/DayGrid-events.js
  12. 4 4
      tests/automated/legacy/agenda-view.js
  13. 4 4
      tests/automated/legacy/background-events.js
  14. 4 4
      tests/automated/legacy/basic-view.js
  15. 9 9
      tests/automated/legacy/dateClick.js
  16. 2 2
      tests/automated/legacy/destroy.js
  17. 4 4
      tests/automated/legacy/dir.js
  18. 2 2
      tests/automated/legacy/eventLimit-popover.js
  19. 2 2
      tests/automated/legacy/firstDay.js
  20. 3 3
      tests/automated/legacy/header-rendering.js
  21. 3 3
      tests/automated/legacy/nowIndicator.js
  22. 7 5
      tests/automated/legacy/select-callback.js
  23. 3 3
      tests/automated/legacy/select-method.js
  24. 2 2
      tests/automated/legacy/weekLabel.js
  25. 6 6
      tests/automated/lib/dom-geom.js
  26. 1 1
      tests/manual/day_render.html
  27. 2 2
      tests/manual/droppable.html
  28. 8 8
      tests/manual/dynamic-options.html
  29. 1 1
      tests/manual/hiddenDays.html
  30. 1 1
      tests/manual/issue_740_event_resizing.html
  31. 1 1
      tests/manual/issue_757_removeEvents.html
  32. 1 1
      tests/manual/locale.html
  33. 1 1
      tests/manual/options.html
  34. 1 1
      tests/manual/selectable.html
  35. 2 2
      tests/manual/slot_event_overlap.html
  36. 1 1
      tests/manual/stacking.html
  37. 1 1
      tests/manual/triggers.html
  38. 1 1
      tests/manual/week_numbers.html

+ 1 - 1
locale/ar-dz.js

@@ -5,7 +5,7 @@ defineLocale("ar-dz", {
     dow: 0, // Sunday is the first day of the week.
     dow: 0, // Sunday is the first day of the week.
     doy: 4  // The week that contains Jan 1st is the first week of the year.
     doy: 4  // The week that contains Jan 1st is the first week of the year.
   },
   },
-  isRtl: true,
+  dir: 'rtl',
   buttonText: {
   buttonText: {
     prev: "السابق",
     prev: "السابق",
     next: "التالي",
     next: "التالي",

+ 1 - 1
locale/ar-kw.js

@@ -5,7 +5,7 @@ defineLocale("ar-kw", {
     dow: 0, // Sunday is the first day of the week.
     dow: 0, // Sunday is the first day of the week.
     doy: 12  // The week that contains Jan 1st is the first week of the year.
     doy: 12  // The week that contains Jan 1st is the first week of the year.
   },
   },
-  isRtl: true,
+  dir: 'rtl',
   buttonText: {
   buttonText: {
     prev: "السابق",
     prev: "السابق",
     next: "التالي",
     next: "التالي",

+ 1 - 1
locale/ar-ly.js

@@ -5,7 +5,7 @@ defineLocale("ar-ly", {
     dow: 6, // Saturday is the first day of the week.
     dow: 6, // Saturday is the first day of the week.
     doy: 12  // The week that contains Jan 1st is the first week of the year.
     doy: 12  // The week that contains Jan 1st is the first week of the year.
   },
   },
-  isRtl: true,
+  dir: 'rtl',
   buttonText: {
   buttonText: {
     prev: "السابق",
     prev: "السابق",
     next: "التالي",
     next: "التالي",

+ 1 - 1
locale/ar-ma.js

@@ -5,7 +5,7 @@ defineLocale("ar-ma", {
     dow: 6, // Saturday is the first day of the week.
     dow: 6, // Saturday is the first day of the week.
     doy: 12  // The week that contains Jan 1st is the first week of the year.
     doy: 12  // The week that contains Jan 1st is the first week of the year.
   },
   },
-  isRtl: true,
+  dir: 'rtl',
   buttonText: {
   buttonText: {
     prev: "السابق",
     prev: "السابق",
     next: "التالي",
     next: "التالي",

+ 1 - 1
locale/ar-sa.js

@@ -5,7 +5,7 @@ defineLocale("ar-sa", {
     dow: 0, // Sunday is the first day of the week.
     dow: 0, // Sunday is the first day of the week.
     doy: 6  // The week that contains Jan 1st is the first week of the year.
     doy: 6  // The week that contains Jan 1st is the first week of the year.
   },
   },
-  isRtl: true,
+  dir: 'rtl',
   buttonText: {
   buttonText: {
     prev: "السابق",
     prev: "السابق",
     next: "التالي",
     next: "التالي",

+ 1 - 1
locale/ar-tn.js

@@ -5,7 +5,7 @@ defineLocale("ar-tn", {
     dow: 1, // Monday is the first day of the week.
     dow: 1, // Monday is the first day of the week.
     doy: 4 // The week that contains Jan 4th is the first week of the year.
     doy: 4 // The week that contains Jan 4th is the first week of the year.
   },
   },
-  isRtl: true,
+  dir: 'rtl',
   buttonText: {
   buttonText: {
     prev: "السابق",
     prev: "السابق",
     next: "التالي",
     next: "التالي",

+ 1 - 1
locale/ar.js

@@ -5,7 +5,7 @@ defineLocale("ar", {
     dow: 6, // Saturday is the first day of the week.
     dow: 6, // Saturday is the first day of the week.
     doy: 12  // The week that contains Jan 1st is the first week of the year.
     doy: 12  // The week that contains Jan 1st is the first week of the year.
   },
   },
-  isRtl: true,
+  dir: 'rtl',
   buttonText: {
   buttonText: {
     prev: "السابق",
     prev: "السابق",
     next: "التالي",
     next: "التالي",

+ 1 - 1
locale/fa.js

@@ -5,7 +5,7 @@ defineLocale("fa", {
     dow: 6, // Saturday is the first day of the week.
     dow: 6, // Saturday is the first day of the week.
     doy: 12 // The week that contains Jan 1st is the first week of the year.
     doy: 12 // The week that contains Jan 1st is the first week of the year.
   },
   },
-  isRtl: true,
+  dir: 'rtl',
   buttonText: {
   buttonText: {
     prev: "قبلی",
     prev: "قبلی",
     nex: "بعدی",
     nex: "بعدی",

+ 1 - 1
locale/he.js

@@ -1,7 +1,7 @@
 import { defineLocale } from 'fullcalendar';
 import { defineLocale } from 'fullcalendar';
 
 
 defineLocale("he", {
 defineLocale("he", {
-  isRtl: true,
+  dir: 'rtl',
   buttonText: {
   buttonText: {
     prev: "הקודם",
     prev: "הקודם",
     next: "הבא",
     next: "הבא",

+ 2 - 2
tests/automated/legacy/Agenda-render.js

@@ -11,7 +11,7 @@ describe('Agenda view rendering', function() {
 
 
   describe('when LTR', function() {
   describe('when LTR', function() {
     pushOptions({
     pushOptions({
-      isRtl: false
+      dir: 'ltr'
     })
     })
 
 
     it('renders the axis on the left', function() {
     it('renders the axis on the left', function() {
@@ -25,7 +25,7 @@ describe('Agenda view rendering', function() {
 
 
   describe('when RTL', function() {
   describe('when RTL', function() {
     pushOptions({
     pushOptions({
-      isRtl: true
+      dir: 'rtl'
     })
     })
 
 
     it('renders the axis on the right', function() {
     it('renders the axis on the right', function() {

+ 7 - 7
tests/automated/legacy/DayGrid-events.js

@@ -8,13 +8,13 @@ describe('DayGrid event rendering', function() {
   })
   })
 
 
   describe('when LTR', function() {
   describe('when LTR', function() {
-    initMonthTesting(false)
+    initMonthTesting('ltr')
   })
   })
   describe('when RTL', function() {
   describe('when RTL', function() {
-    initMonthTesting(true)
+    initMonthTesting('rtl')
   })
   })
 
 
-  function initMonthTesting(isRtl) {
+  function initMonthTesting(dir) {
     it('correctly renders an event starting before view\'s start', function() {
     it('correctly renders an event starting before view\'s start', function() {
       var options = {}
       var options = {}
       options.events = [
       options.events = [
@@ -184,9 +184,9 @@ describe('DayGrid event rendering', function() {
     })
     })
 
 
     function testSeg(calendarOptions, testSegOptions) {
     function testSeg(calendarOptions, testSegOptions) {
-      calendarOptions.isRtl = isRtl
+      calendarOptions.dir = dir
       initCalendar(calendarOptions)
       initCalendar(calendarOptions)
-      directionallyTestSeg(testSegOptions, isRtl)
+      directionallyTestSeg(testSegOptions, dir)
     }
     }
   }
   }
 
 
@@ -250,7 +250,7 @@ describe('DayGrid event rendering', function() {
     - isStart
     - isStart
     - isEnd
     - isEnd
   */
   */
-  function directionallyTestSeg(opts, isRtl) {
+  function directionallyTestSeg(opts, dir) {
     var el = opts.el ? $(opts.el) : getFirstEventEl()
     var el = opts.el ? $(opts.el) : getFirstEventEl()
 
 
     var row = opts.row || 0
     var row = opts.row || 0
@@ -259,7 +259,7 @@ describe('DayGrid event rendering', function() {
 
 
     var leftCol
     var leftCol
     var rightCol
     var rightCol
-    if (isRtl) {
+    if (dir === 'rtl') {
       leftCol = rowTds.length - opts.lastCol - 1
       leftCol = rowTds.length - opts.lastCol - 1
       rightCol = rowTds.length - opts.firstCol - 1
       rightCol = rowTds.length - opts.firstCol - 1
     } else {
     } else {

+ 4 - 4
tests/automated/legacy/agenda-view.js

@@ -12,10 +12,10 @@ const AXIS_CLASS = 'fc-axis'
 
 
 describe('agenda view rendering', function() {
 describe('agenda view rendering', function() {
 
 
-  describe('when isRtl is false', function() {
+  describe('when dir is ltr', function() {
     pushOptions({
     pushOptions({
       defaultView: 'agendaWeek',
       defaultView: 'agendaWeek',
-      isRtl: false
+      dir: 'ltr'
     })
     })
 
 
     it('should have have days ordered sun to sat', function() {
     it('should have have days ordered sun to sat', function() {
@@ -32,10 +32,10 @@ describe('agenda view rendering', function() {
     })
     })
   })
   })
 
 
-  describe('when isRtl is true', function() {
+  describe('when dir is rtl', function() {
     pushOptions({
     pushOptions({
       defaultView: 'agendaWeek',
       defaultView: 'agendaWeek',
-      isRtl: true
+      dir: 'rtl'
     })
     })
 
 
     it('should have have days ordered sat to sun', function() {
     it('should have have days ordered sat to sun', function() {

+ 4 - 4
tests/automated/legacy/background-events.js

@@ -122,7 +122,7 @@ describe('background events', function() {
     })
     })
 
 
     describe('when RTL', function() {
     describe('when RTL', function() {
-      pushOptions({isRtl: true})
+      pushOptions({dir: 'rtl'})
 
 
       it('render correctly on a single day', function(done) {
       it('render correctly on a single day', function(done) {
         var options = {}
         var options = {}
@@ -320,7 +320,7 @@ describe('background events', function() {
       })
       })
 
 
       describe('when RTL', function() {
       describe('when RTL', function() {
-        pushOptions({ isRtl: true })
+        pushOptions({ dir: 'rtl' })
 
 
         it('render correctly on a single day', function(done) {
         it('render correctly on a single day', function(done) {
           var options = {}
           var options = {}
@@ -485,7 +485,7 @@ describe('background events', function() {
       })
       })
     })
     })
     describe('when RTL', function() {
     describe('when RTL', function() {
-      pushOptions({ isRtl: true })
+      pushOptions({ dir: 'rtl' })
       it('render correctly on one day', function(done) {
       it('render correctly on one day', function(done) {
         var options = {}
         var options = {}
         options.events = [ {
         options.events = [ {
@@ -699,7 +699,7 @@ describe('background events', function() {
       })
       })
 
 
       describe('when RTL', function() {
       describe('when RTL', function() {
-        pushOptions({ isRtl: true })
+        pushOptions({ dir: 'rtl' })
         it('render correctly on one day', function(done) {
         it('render correctly on one day', function(done) {
           var options = {}
           var options = {}
           options.events = [ {
           options.events = [ {

+ 4 - 4
tests/automated/legacy/basic-view.js

@@ -5,10 +5,10 @@ describe('basic view rendering', function() {
     defaultView: 'month'
     defaultView: 'month'
   })
   })
 
 
-  describe('when isRtl is false', function() {
+  describe('when dir is ltr', function() {
 
 
     pushOptions({
     pushOptions({
-      isRtl: false
+      dir: 'ltr'
     })
     })
 
 
     it('should have days ordered sun to sat', function() {
     it('should have days ordered sun to sat', function() {
@@ -24,10 +24,10 @@ describe('basic view rendering', function() {
     })
     })
   })
   })
 
 
-  describe('when isRtl is true', function() {
+  describe('when dir is rtl', function() {
 
 
     pushOptions({
     pushOptions({
-      isRtl: true
+      dir: 'rtl'
     })
     })
 
 
     it('should have days ordered sat to sun', function() {
     it('should have days ordered sat to sun', function() {

+ 9 - 9
tests/automated/legacy/dateClick.js

@@ -5,10 +5,10 @@ describe('dateClick', function() {
     timeZone: 'UTC'
     timeZone: 'UTC'
   });
   });
 
 
-  [ false, true ].forEach(function(isRtl) {
-    describe('when isRtl is ' + isRtl, function() {
+  [ 'ltr', 'rtl' ].forEach(function(dir) {
+    describe('when dir is ' + dir, function() {
 
 
-      pushOptions({ isRtl: isRtl });
+      pushOptions({ dir });
 
 
       [ false, true ].forEach(function(selectable) {
       [ false, true ].forEach(function(selectable) {
         describe('when selectable is ' + selectable, function() {
         describe('when selectable is ' + selectable, function() {
@@ -30,7 +30,7 @@ describe('dateClick', function() {
 
 
               initCalendar(options)
               initCalendar(options)
 
 
-              var dayCell = $('.fc-day:eq(10)') // 2014-05-07 (regardless of isRtl)
+              var dayCell = $('.fc-day:eq(10)') // 2014-05-07 (regardless of dir)
 
 
               // for simulating the mousedown/mouseup/click (relevant for selectable)
               // for simulating the mousedown/mouseup/click (relevant for selectable)
               dayCell.simulate('drag')
               dayCell.simulate('drag')
@@ -54,7 +54,7 @@ describe('dateClick', function() {
 
 
               initCalendar(options)
               initCalendar(options)
 
 
-              // 2014-05-28 (regardless of isRtl)
+              // 2014-05-28 (regardless of dir)
               var dayContent = $('.fc-agenda-view .fc-day-grid .fc-day:eq(3)')
               var dayContent = $('.fc-agenda-view .fc-day-grid .fc-day:eq(3)')
 
 
               // for simulating the mousedown/mouseup/click (relevant for selectable)
               // for simulating the mousedown/mouseup/click (relevant for selectable)
@@ -79,7 +79,7 @@ describe('dateClick', function() {
 
 
               initCalendar(options)
               initCalendar(options)
 
 
-              // the middle is 2014-05-28T09:00:00 (regardless of isRtl)
+              // the middle is 2014-05-28T09:00:00 (regardless of dir)
               var slotRow = $('.fc-slats tr:eq(18) td:not(.fc-time)')
               var slotRow = $('.fc-slats tr:eq(18) td:not(.fc-time)')
 
 
               // for simulating the mousedown/mouseup/click (relevant for selectable)
               // for simulating the mousedown/mouseup/click (relevant for selectable)
@@ -106,7 +106,7 @@ describe('dateClick', function() {
 
 
               initCalendar(options)
               initCalendar(options)
 
 
-              // the middle is 2014-05-28T11:00:00 (regardless of isRtl)
+              // the middle is 2014-05-28T11:00:00 (regardless of dir)
               var slotRow = $('.fc-slats tr:eq(18) td:not(.fc-time)')
               var slotRow = $('.fc-slats tr:eq(18) td:not(.fc-time)')
 
 
               // for simulating the mousedown/mouseup/click (relevant for selectable)
               // for simulating the mousedown/mouseup/click (relevant for selectable)
@@ -134,7 +134,7 @@ describe('dateClick', function() {
 
 
       initCalendar(options)
       initCalendar(options)
 
 
-      var dayCell = $('.fc-day:eq(10)') // 2014-05-07 (regardless of isRtl)
+      var dayCell = $('.fc-day:eq(10)') // 2014-05-07 (regardless of dir)
 
 
       // for simulating the mousedown/mouseup/click (relevant for selectable)
       // for simulating the mousedown/mouseup/click (relevant for selectable)
       dayCell.simulate('drag', {
       dayCell.simulate('drag', {
@@ -178,7 +178,7 @@ describe('dateClick', function() {
 
 
       initCalendar(options)
       initCalendar(options)
 
 
-      var dayCell = $('.fc-day:eq(10)') // 2014-05-07 (regardless of isRtl)
+      var dayCell = $('.fc-day:eq(10)') // 2014-05-07 (regardless of dir)
       $.simulateTouchClick(dayCell)
       $.simulateTouchClick(dayCell)
     })
     })
   })
   })

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

@@ -5,7 +5,7 @@ describe('destroy', function() {
   describe('when calendar is LTR', function() {
   describe('when calendar is LTR', function() {
     it('cleans up all classNames on the root element', function() {
     it('cleans up all classNames on the root element', function() {
       initCalendar({
       initCalendar({
-        isRtl: false
+        dir: 'ltr'
       })
       })
       currentCalendar.destroy()
       currentCalendar.destroy()
       expect($('#calendar')[0].className).toBe('')
       expect($('#calendar')[0].className).toBe('')
@@ -15,7 +15,7 @@ describe('destroy', function() {
   describe('when calendar is RTL', function() {
   describe('when calendar is RTL', function() {
     it('cleans up all classNames on the root element', function() {
     it('cleans up all classNames on the root element', function() {
       initCalendar({
       initCalendar({
-        isRtl: true
+        dir: 'rtl'
       })
       })
       currentCalendar.destroy()
       currentCalendar.destroy()
       expect($('#calendar')[0].className).toBe('')
       expect($('#calendar')[0].className).toBe('')

+ 4 - 4
tests/automated/legacy/isRTL.js → tests/automated/legacy/dir.js

@@ -1,10 +1,10 @@
-describe('isRtl', function() {
+describe('dir', function() {
 
 
   it('has it\'s default value computed differently based off of the locale', function() {
   it('has it\'s default value computed differently based off of the locale', function() {
     initCalendar({
     initCalendar({
       locale: 'ar' // Arabic is RTL
       locale: 'ar' // Arabic is RTL
     })
     })
-    expect(currentCalendar.getOption('isRtl')).toEqual(true)
+    expect(currentCalendar.getOption('dir')).toEqual('rtl')
   })
   })
 
 
   // NOTE: don't put tests related to other options in here!
   // NOTE: don't put tests related to other options in here!
@@ -12,14 +12,14 @@ describe('isRtl', function() {
 
 
   it('adapts to dynamic option change', function() {
   it('adapts to dynamic option change', function() {
     initCalendar({
     initCalendar({
-      isRtl: false
+      dir: 'ltr'
     })
     })
     var $el = $(currentCalendar.el)
     var $el = $(currentCalendar.el)
 
 
     expect($el).toHaveClass('fc-ltr')
     expect($el).toHaveClass('fc-ltr')
     expect($el).not.toHaveClass('fc-rtl')
     expect($el).not.toHaveClass('fc-rtl')
 
 
-    currentCalendar.setOption('isRtl', true)
+    currentCalendar.setOption('dir', 'rtl')
 
 
     expect($el).toHaveClass('fc-rtl')
     expect($el).toHaveClass('fc-rtl')
     expect($el).not.toHaveClass('fc-ltr')
     expect($el).not.toHaveClass('fc-ltr')

+ 2 - 2
tests/automated/legacy/eventLimit-popover.js

@@ -29,7 +29,7 @@ describe('eventLimit popover', function() {
 
 
     it('aligns horizontally with left edge of cell if LTR', function() {
     it('aligns horizontally with left edge of cell if LTR', function() {
       initCalendar({
       initCalendar({
-        isRtl: false
+        dir: 'ltr'
       })
       })
       init()
       init()
       var cellLeft = $('.fc-day-grid .fc-row:eq(0) .fc-bg td:not(.fc-axis):eq(2)').offset().left
       var cellLeft = $('.fc-day-grid .fc-row:eq(0) .fc-bg td:not(.fc-axis):eq(2)').offset().left
@@ -40,7 +40,7 @@ describe('eventLimit popover', function() {
 
 
     it('aligns horizontally with left edge of cell if RTL', function() {
     it('aligns horizontally with left edge of cell if RTL', function() {
       initCalendar({
       initCalendar({
-        isRtl: true
+        dir: 'rtl'
       })
       })
       init()
       init()
       var cell = $('.fc-day-grid .fc-row:eq(0) .fc-bg td:not(.fc-axis):eq(4)')
       var cell = $('.fc-day-grid .fc-row:eq(0) .fc-bg td:not(.fc-axis):eq(4)')

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

@@ -159,10 +159,10 @@ describe('First Day', function() {
     })
     })
   })
   })
 
 
-  describe('when first day is set to Tuesday and isRtl is true', function() {
+  describe('when first day is set to Tuesday and dir is rtl', function() {
     pushOptions({
     pushOptions({
       firstDay: 2,
       firstDay: 2,
-      isRtl: true
+      dir: 'rtl'
     })
     })
     it('should put days mon, sun, sat ...', function() {
     it('should put days mon, sun, sat ...', function() {
       initCalendar()
       initCalendar()

+ 3 - 3
tests/automated/legacy/header-rendering.js

@@ -69,15 +69,15 @@ describe('header rendering', function() {
   })
   })
 
 
   describe('renders left and right literally', function() {
   describe('renders left and right literally', function() {
-    [ true, false ].forEach(function(isRtl) {
-      describe('when isRtl is ' + isRtl, function() {
+    [ 'ltr', 'rtl' ].forEach(function(dir) {
+      describe('when dir is ' + dir, function() {
         pushOptions({
         pushOptions({
           header: {
           header: {
             left: 'prev',
             left: 'prev',
             center: 'today',
             center: 'today',
             right: 'next'
             right: 'next'
           },
           },
-          isRtl: isRtl
+          dir
         })
         })
         it('should have prev in left', function() {
         it('should have prev in left', function() {
           initCalendar()
           initCalendar()

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

@@ -38,11 +38,11 @@ describe('now indicator', function() {
         options.nowIndicator = true
         options.nowIndicator = true
       });
       });
 
 
-      [ false, true ].forEach(function(isRtl) {
+      [ 'ltr', 'rtl' ].forEach(function(dir) {
 
 
-        describe('when ' + (isRtl ? 'RTL' : 'LTR'), function() {
+        describe('when ' + dir, function() {
           beforeEach(function() {
           beforeEach(function() {
-            options.isRtl = isRtl
+            options.dir = dir
           })
           })
 
 
           it('doesn\'t render when out of view', function() {
           it('doesn\'t render when out of view', function() {

+ 7 - 5
tests/automated/legacy/select-callback.js

@@ -14,10 +14,12 @@ describe('select callback', function() {
     currentCalendar.destroy()
     currentCalendar.destroy()
   });
   });
 
 
-  [ false, true ].forEach(function(isRtl) {
-    describe('when isRtl is ' + isRtl, function() {
+  [ 'ltr', 'rtl' ].forEach(function(dir) {
+    let dirSign = dir === 'rtl' ? -1 : 1
+
+    describe('when dir is ' + dir, function() {
       beforeEach(function() {
       beforeEach(function() {
-        options.isRtl = isRtl
+        options.dir = dir
       })
       })
       describe('when in month view', function() {
       describe('when in month view', function() {
         beforeEach(function() {
         beforeEach(function() {
@@ -115,7 +117,7 @@ describe('select callback', function() {
             spyOn(options, 'select').and.callThrough()
             spyOn(options, 'select').and.callThrough()
             initCalendar(options)
             initCalendar(options)
             $('.fc-agenda-view .fc-day-grid .fc-day:eq(3)').simulate('drag', { // will be 2014-05-28 for LTR and RTL
             $('.fc-agenda-view .fc-day-grid .fc-day:eq(3)').simulate('drag', { // will be 2014-05-28 for LTR and RTL
-              dx: $('.fc-sun').outerWidth() * (isRtl ? -1 : 1), // the width of one column
+              dx: $('.fc-sun').outerWidth() * dirSign, // the width of one column
               callback: function() {
               callback: function() {
                 expect(options.select).toHaveBeenCalled()
                 expect(options.select).toHaveBeenCalled()
                 done()
                 done()
@@ -208,7 +210,7 @@ describe('select callback', function() {
             spyOn(options, 'select').and.callThrough()
             spyOn(options, 'select').and.callThrough()
             initCalendar(options)
             initCalendar(options)
             $('.fc-slats tr:eq(18) td:not(.fc-time)').simulate('drag', { // middle will be 2014-05-28T09:00:00
             $('.fc-slats tr:eq(18) td:not(.fc-time)').simulate('drag', { // middle will be 2014-05-28T09:00:00
-              dx: $('.fc-day-header:first').outerWidth() * 0.9 * (isRtl ? -1 : 1), // one day ahead
+              dx: $('.fc-day-header:first').outerWidth() * 0.9 * dirSign, // one day ahead
               dy: $('.fc-slats tr:eq(18)').outerHeight() * 2, // move down two slots
               dy: $('.fc-slats tr:eq(18)').outerHeight() * 2, // move down two slots
               callback: function() {
               callback: function() {
                 expect(options.select).toHaveBeenCalled()
                 expect(options.select).toHaveBeenCalled()

+ 3 - 3
tests/automated/legacy/select-method.js

@@ -17,10 +17,10 @@ describe('select method', function() {
     - for basic/month views, when given timed dates, should really be all-day
     - for basic/month views, when given timed dates, should really be all-day
   */
   */
 
 
-  [ false, true ].forEach(function(isRtl) {
-    describe('when isRtl is ' + isRtl, function() {
+  [ 'ltr', 'rtl' ].forEach(function(dir) {
+    describe('when dir is ' + dir, function() {
       beforeEach(function() {
       beforeEach(function() {
-        options.isRtl = isRtl
+        options.dir = dir
       })
       })
       describe('when in month view', function() {
       describe('when in month view', function() {
         beforeEach(function() {
         beforeEach(function() {

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

@@ -31,7 +31,7 @@ describe('weekLabel', function() {
 
 
       it('renders correctly when customized and LTR', function() {
       it('renders correctly when customized and LTR', function() {
         initCalendar({
         initCalendar({
-          isRtl: false,
+          dir: 'ltr',
           weekLabel: 'YO'
           weekLabel: 'YO'
         })
         })
         expect(getRenderedWeekNumberTitle()).toBe('YO')
         expect(getRenderedWeekNumberTitle()).toBe('YO')
@@ -39,7 +39,7 @@ describe('weekLabel', function() {
 
 
       it('renders correctly when customized and RTL', function() {
       it('renders correctly when customized and RTL', function() {
         initCalendar({
         initCalendar({
-          isRtl: true,
+          dir: 'rtl',
           weekLabel: 'YO'
           weekLabel: 'YO'
         })
         })
         expect(getRenderedWeekNumberTitle()).toBe('YO')
         expect(getRenderedWeekNumberTitle()).toBe('YO')

+ 6 - 6
tests/automated/lib/dom-geom.js

@@ -33,7 +33,7 @@ export function getBoundingRect(el) {
 }
 }
 
 
 
 
-export function getLeadingBoundingRect(els, isRtl) {
+export function getLeadingBoundingRect(els, dir = 'ltr') {
   els = $(els)
   els = $(els)
   expect(els.length).toBeGreaterThan(0)
   expect(els.length).toBeGreaterThan(0)
   let best = null
   let best = null
@@ -41,7 +41,7 @@ export function getLeadingBoundingRect(els, isRtl) {
     const rect = getBoundingRect(node)
     const rect = getBoundingRect(node)
     if (!best) {
     if (!best) {
       best = rect
       best = rect
-    } else if (isRtl) {
+    } else if (dir === 'rtl') {
       if (rect.right > best.right) {
       if (rect.right > best.right) {
         best = rect
         best = rect
       }
       }
@@ -55,7 +55,7 @@ export function getLeadingBoundingRect(els, isRtl) {
 }
 }
 
 
 
 
-export function getTrailingBoundingRect(els, isRtl) {
+export function getTrailingBoundingRect(els, dir = 'ltr') {
   els = $(els)
   els = $(els)
   expect(els.length).toBeGreaterThan(0)
   expect(els.length).toBeGreaterThan(0)
   let best = null
   let best = null
@@ -63,7 +63,7 @@ export function getTrailingBoundingRect(els, isRtl) {
     const rect = getBoundingRect(node)
     const rect = getBoundingRect(node)
     if (!best) {
     if (!best) {
       best = rect
       best = rect
-    } else if (isRtl) {
+    } else if (dir === 'rtl') {
       if (rect.left < best.left) {
       if (rect.left < best.left) {
         best = rect
         best = rect
       }
       }
@@ -77,12 +77,12 @@ export function getTrailingBoundingRect(els, isRtl) {
 }
 }
 
 
 
 
-export function sortBoundingRects(els, isRtl) {
+export function sortBoundingRects(els, dir) {
   const rects = els.map(function(i, node) {
   const rects = els.map(function(i, node) {
     return getBoundingRect(node)
     return getBoundingRect(node)
   })
   })
   rects.sort(function(a, b) {
   rects.sort(function(a, b) {
-    if (isRtl) {
+    if (dir === 'rtl') {
       return b.right - a.right
       return b.right - a.right
     } else {
     } else {
       return a.left - b.left
       return a.left - b.left

+ 1 - 1
tests/manual/day_render.html

@@ -27,7 +27,7 @@
       },
       },
       weekNumbers: true,
       weekNumbers: true,
       //selectable: true,
       //selectable: true,
-      //isRtl: true,
+      //dir: 'rtl',
 
 
       header: {
       header: {
         left: 'prev,next today',
         left: 'prev,next today',

+ 2 - 2
tests/manual/droppable.html

@@ -27,7 +27,7 @@
 
 
       //firstDay: 1,
       //firstDay: 1,
       //hiddenDays: [ 4, 6 ], // hide thursday and saturday
       //hiddenDays: [ 4, 6 ], // hide thursday and saturday
-      //isRtl: true,
+      //dir: 'rtl',
       //minTime: '6:30am',
       //minTime: '6:30am',
 
 
       header: {
       header: {
@@ -92,7 +92,7 @@
     $('#sortable-events').sortable();
     $('#sortable-events').sortable();
 
 
     $('#calendar2').fullCalendar({
     $('#calendar2').fullCalendar({
-      //isRtl: true,
+      //dir: 'rtl',
       droppable: true,
       droppable: true,
       dropAccept: '.for-calendar2',
       dropAccept: '.for-calendar2',
       /*
       /*

+ 8 - 8
tests/manual/dynamic-options.html

@@ -12,17 +12,17 @@
 
 
   $(document).ready(function() {
   $(document).ready(function() {
     var theme = false;
     var theme = false;
-    var isRtl = false;
+    var dir = 'ltr';
     var businessHours = false;
     var businessHours = false;
 
 
     $('#change-theme-button').on('click', function() {
     $('#change-theme-button').on('click', function() {
-      theme = !theme;
+      theme = theme ? false : 'jquery-ui';
       $('#calendar').fullCalendar('option', 'theme', theme);
       $('#calendar').fullCalendar('option', 'theme', theme);
     });
     });
 
 
     $('#change-dir-button').on('click', function() {
     $('#change-dir-button').on('click', function() {
-      isRtl = !isRtl;
-      $('#calendar').fullCalendar('option', 'isRtl', isRtl);
+      dir = dir === 'ltr' ? 'rtl' : 'ltr';
+      $('#calendar').fullCalendar('option', 'dir', dir);
     });
     });
 
 
     $('#change-businessHours-button').on('click', function() {
     $('#change-businessHours-button').on('click', function() {
@@ -31,19 +31,19 @@
     });
     });
 
 
     $('#change-all-button').on('click', function() {
     $('#change-all-button').on('click', function() {
-      theme = !theme;
-      isRtl = !isRtl;
+      theme = theme ? false : 'jquery-ui';
+      dir = dir === 'ltr' ? 'rtl' : 'ltr';
       businessHours = !businessHours;
       businessHours = !businessHours;
       $('#calendar').fullCalendar('option', {
       $('#calendar').fullCalendar('option', {
         theme: theme,
         theme: theme,
-        isRtl: isRtl,
+        dir: dir,
         businessHours: businessHours
         businessHours: businessHours
       });
       });
     });
     });
 
 
     $('#calendar').fullCalendar({
     $('#calendar').fullCalendar({
       theme: theme,
       theme: theme,
-      isRtl: isRtl,
+      dir: dir,
       businessHours: businessHours,
       businessHours: businessHours,
       header: {
       header: {
         left: 'prev,next today',
         left: 'prev,next today',

+ 1 - 1
tests/manual/hiddenDays.html

@@ -27,7 +27,7 @@
       month: 6, // july
       month: 6, // july
 
 
       //weekNumbers: true,
       //weekNumbers: true,
-      isRtl: true,
+      dir: 'rtl',
       //selectable: true,
       //selectable: true,
       //firstDay: 2,
       //firstDay: 2,
       //weekends: false,
       //weekends: false,

+ 1 - 1
tests/manual/issue_740_event_resizing.html

@@ -23,7 +23,7 @@
       },
       },
       weekends: false,
       weekends: false,
       //firstDay: 1,
       //firstDay: 1,
-      //isRtl: true,
+      //dir: 'rtl',
       editable: true,
       editable: true,
       events: [
       events: [
         {
         {

+ 1 - 1
tests/manual/issue_757_removeEvents.html

@@ -22,7 +22,7 @@
         right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
         right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
       },
       },
       editable: true,
       editable: true,
-      //isRtl: true,
+      //dir: 'rtl',
       year: 2011,
       year: 2011,
       month: 0,
       month: 0,
       events: [
       events: [

+ 1 - 1
tests/manual/locale.html

@@ -30,7 +30,7 @@
       
       
       editable: true,
       editable: true,
       
       
-      isRtl: true,
+      dir: 'rtl',
       firstDay: 1,
       firstDay: 1,
       //weekends: false,
       //weekends: false,
       //hiddenDays: [ 4 ], // hide thursday
       //hiddenDays: [ 4 ], // hide thursday

+ 1 - 1
tests/manual/options.html

@@ -74,7 +74,7 @@
       //dayClick: function(date) {
       //dayClick: function(date) {
       //  console.log(date);
       //  console.log(date);
       //},
       //},
-      //isRtl: true,
+      //dir: 'rtl',
 
 
       eventColor: 'green',
       eventColor: 'green',
       eventTextColor: 'yellow',
       eventTextColor: 'yellow',

+ 1 - 1
tests/manual/selectable.html

@@ -28,7 +28,7 @@
       defaultView: 'month',
       defaultView: 'month',
       
       
       //firstDay: 1,
       //firstDay: 1,
-      //isRtl: true,
+      //dir: 'rtl',
       //minTime: 7,
       //minTime: 7,
       //weekends: false,
       //weekends: false,
       //allDaySlot: false,
       //allDaySlot: false,

+ 2 - 2
tests/manual/slot_event_overlap.html

@@ -60,7 +60,7 @@
       month: 6, // July
       month: 6, // July
       date: 31,
       date: 31,
       events: 'slot_event_overlap.json',
       events: 'slot_event_overlap.json',
-      isRtl: true,
+      dir: 'rtl',
       _eventsPositioned: function() {
       _eventsPositioned: function() {
         testOverlap($('#calendar-rtl'), true, true);
         testOverlap($('#calendar-rtl'), true, true);
       }
       }
@@ -79,7 +79,7 @@
       month: 6, // July
       month: 6, // July
       date: 31,
       date: 31,
       events: 'slot_event_overlap.json',
       events: 'slot_event_overlap.json',
-      isRtl: true,
+      dir: 'rtl',
       slotEventOverlap: false,
       slotEventOverlap: false,
       _eventsPositioned: function() {
       _eventsPositioned: function() {
         testOverlap($('#calendar-rtl-nooverlap'), false, true);
         testOverlap($('#calendar-rtl-nooverlap'), false, true);

+ 1 - 1
tests/manual/stacking.html

@@ -28,7 +28,7 @@
 
 
       editable: true,
       editable: true,
 
 
-      //isRtl: true,
+      //dir: 'rtl',
       //hiddenDays: [ 3 ],
       //hiddenDays: [ 3 ],
 
 
       /*
       /*

+ 1 - 1
tests/manual/triggers.html

@@ -33,7 +33,7 @@
         right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
         right: 'month,agendaWeek,basicWeek,agendaDay,basicDay'
       },
       },
       editable: true,
       editable: true,
-      //isRtl: true,
+      //dir: 'rtl',
 
 
       viewDisplay: function(view) {
       viewDisplay: function(view) {
         console.log('viewDisplay');
         console.log('viewDisplay');

+ 1 - 1
tests/manual/week_numbers.html

@@ -26,7 +26,7 @@
 
 
       firstDay: 1,
       firstDay: 1,
       selectable: true,
       selectable: true,
-      //isRtl: true,
+      //dir: 'rtl',
       //theme: true,
       //theme: true,
 
 
       editable: true,
       editable: true,