code style improvements (for jscs)

This commit is contained in:
Adam Shaw
2014-01-31 00:08:05 -08:00
parent 758a235d19
commit d2b85cf80c
8 changed files with 17 additions and 15 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ function CoordinateGrid(buildFunc) {
break;
}
}
return (r>=0 && c>=0) ? { row:r, col:c } : null;
return (r>=0 && c>=0) ? { row: r, col: c } : null;
};
+1 -1
View File
@@ -648,7 +648,7 @@ function DayEventRenderer() {
var eventEnd;
var helpers;
var eventCopy = $.extend({}, event);
var minCellOffset = dayOffsetToCellOffset( dateToDayOffset(event.start) );
var minCellOffset = dayOffsetToCellOffset(dateToDayOffset(event.start));
clearSelection();
$('body')
.css('cursor', direction + '-resize')
+1 -1
View File
@@ -481,7 +481,7 @@ function View(element, calendar, viewName) {
var out = date.clone();
inc = inc || 1;
while (
isHiddenDayHash[ ( out.day() + (isExclusive ? inc : 0) + 7 ) % 7 ]
isHiddenDayHash[(out.day() + (isExclusive ? inc : 0) + 7) % 7]
) {
out.add('days', inc);
}
+1 -1
View File
@@ -41,7 +41,7 @@ function transformOptions(sourceOptions, start, end, timezone) {
var success = sourceOptions.success;
var data = $.extend({}, sourceOptions.data || {}, {
'singleevents': true,
singleevents: true,
'max-results': 9999
});
+6 -4
View File
@@ -48,10 +48,12 @@ describe('fullCalendar constructor', function() {
editable: true
});
$('#calendar').fullCalendar('addEventSource', {
events: [{
title: eventName,
start: new Date()
}]
events: [
{
title: eventName,
start: new Date()
}
]
});
var el = $('div .fc-event');
var offsetBefore = el.offset();
+3 -3
View File
@@ -30,7 +30,7 @@ describe('hiddenDays', function() {
describe('when setting hiddenDays with 1', function() {
beforeEach(function() {
$('#cal').fullCalendar({
hiddenDays: [1]
hiddenDays: [ 1 ]
});
});
it('should return 6 days', function() {
@@ -52,7 +52,7 @@ describe('hiddenDays', function() {
describe('when setting hiddenDays with 3,5', function() {
beforeEach(function() {
$('#cal').fullCalendar({
hiddenDays: [3, 5]
hiddenDays: [ 3, 5 ]
});
});
it('should return 6 days', function() {
@@ -78,7 +78,7 @@ describe('hiddenDays', function() {
describe('when setting all hiddenDays', function() {
it('should expect to throw an exception', function() {
var options = {
hiddenDays: [0, 1, 2, 3, 4, 5, 6]
hiddenDays: [ 0, 1, 2, 3, 4, 5, 6 ]
};
expect(function() {
$('#cal').fullCalendar(options);
+3 -3
View File
@@ -7,7 +7,7 @@ describe('minTime', function() {
var numToStringConverter = function(timeIn) {
var time = (timeIn % 12);
if ($.inArray(timeIn, [0, 12]) != -1) {
if ($.inArray(timeIn, [ 0, 12 ]) != -1) {
time = 12;
}
var amPm = 'am';
@@ -44,7 +44,7 @@ describe('minTime', function() {
describe('when using a whole number', function() {
var hourNumbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
var hourNumbers = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 ];
describe('in agendaWeek', function() {
beforeEach(function() {
@@ -85,7 +85,7 @@ describe('minTime', function() {
describe('when using default slotInterval and \'uneven\' minTime', function() {
var hourNumbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22];
var hourNumbers = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 ];
describe('in agendaWeek', function() {
beforeEach(function() {
+1 -1
View File
@@ -55,7 +55,7 @@ describe('slotDuration', function() {
describe('when slotMinutes is set to a series of times', function() {
var slotMinutesList = [10, 12, 15, 17, 20, 30, 35, 45, 60, 62, 120, 300];
var slotMinutesList = [ 10, 12, 15, 17, 20, 30, 35, 45, 60, 62, 120, 300 ];
describe('in agendaWeek', function() {
beforeEach(function() {