Răsfoiți Sursa

module TimeGridRenderUtils

Adam Shaw 8 ani în urmă
părinte
comite
e8b90518d9

+ 2 - 0
tests/view-dates/next.js

@@ -1,4 +1,6 @@
 import { expectActiveRange } from './ViewDateUtils';
+import * as TimeGridRenderUtils from '../view-render/TimeGridRenderUtils';
+
 
 describe('next', function() {
 	pushOptions({

+ 14 - 17
tests/view-render/TimeGridRenderUtils.js

@@ -1,18 +1,15 @@
 
-var TimeGridRenderUtils = {
-
-	getTimeAxisInfo: function() {
-		return $('.fc-slats tr[data-time]').map(function(i, tr) {
-			return {
-				text: $(tr).find('.fc-time').text(),
-				isMajor: !$(tr).hasClass('fc-minor')
-			};
-		}).get();
-	},
-
-	// for https://github.com/fullcalendar/fullcalendar-scheduler/issues/363
-	isStructureValid: function() {
-		return $('.fc-time-grid .fc-content-skeleton').length === 1;
-	}
-
-};
+export function getTimeAxisInfo() {
+	return $('.fc-slats tr[data-time]').map(function(i, tr) {
+		return {
+			text: $(tr).find('.fc-time').text(),
+			isMajor: !$(tr).hasClass('fc-minor')
+		};
+	}).get();
+}
+
+
+// for https://github.com/fullcalendar/fullcalendar-scheduler/issues/363
+export function isStructureValid() {
+	return $('.fc-time-grid .fc-content-skeleton').length === 1;
+}

+ 2 - 0
tests/view-render/slotDuration.js

@@ -1,3 +1,5 @@
+import * as TimeGridRenderUtils from './TimeGridRenderUtils';
+
 
 describe('slotDuration', function() {
 	pushOptions({

+ 2 - 0
tests/view-type/changeView.js

@@ -1,4 +1,6 @@
 import { expectActiveRange } from './ViewDateUtils';
+import * as TimeGridRenderUtils from '../view-render/TimeGridRenderUtils';
+
 
 describe('changeView', function() {
 	pushOptions({