mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-06-27 16:10:13 +08:00
Cleaning up jshint requirements
This commit is contained in:
+3
-4
@@ -1,4 +1,3 @@
|
||||
|
||||
module.exports = function(grunt) {
|
||||
|
||||
var _ = require('underscore');
|
||||
@@ -16,7 +15,7 @@ module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-karma');
|
||||
grunt.loadNpmTasks('grunt-bump');
|
||||
grunt.loadNpmTasks('lumbar');
|
||||
|
||||
|
||||
// This will eventually get passed to grunt.initConfig()
|
||||
// Initialize multitasks...
|
||||
var config = {
|
||||
@@ -63,7 +62,7 @@ module.exports = function(grunt) {
|
||||
'clean:modules',
|
||||
'lumbar:build',
|
||||
'concat:moduleVariables',
|
||||
//'jshint:builtModules',
|
||||
'jshint:builtModules',
|
||||
'uglify:modules'
|
||||
]);
|
||||
|
||||
@@ -384,7 +383,7 @@ module.exports = function(grunt) {
|
||||
*/
|
||||
|
||||
config.shell['assume-unchanged'] = {
|
||||
command: 'git update-index --assume-unchanged `git ls-files dist`'
|
||||
command: 'git ls-files -z dist/ | xargs -0 git update-index --assume-unchanged'
|
||||
};
|
||||
config.shell['no-assume-unchanged'] = {
|
||||
command: 'git update-index --no-assume-unchanged `git ls-files dist`'
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
var ajaxDefaults = {
|
||||
dataType: 'json',
|
||||
cache: false
|
||||
};
|
||||
function ResourceManager(options) {
|
||||
var t = this;
|
||||
// exports
|
||||
@@ -54,7 +50,7 @@ function ResourceManager(options) {
|
||||
function fetchResources(useCache, currentView) {
|
||||
// if useCache is not defined, default to true
|
||||
useCache = (typeof useCache !== 'undefined' ? useCache : true);
|
||||
if (cache != undefined && useCache) {
|
||||
if (cache !== undefined && useCache) {
|
||||
// get from cache
|
||||
return cache;
|
||||
} else {
|
||||
|
||||
@@ -167,7 +167,7 @@ function ResourceEventRenderer() {
|
||||
var resourceEvents = [];
|
||||
for (var i = 0; i < events.length; i++) {
|
||||
if (events[i].resources && $.inArray(resource.id, events[i].resources) >= 0) {
|
||||
resourceEvents.push(events[i])
|
||||
resourceEvents.push(events[i]);
|
||||
}
|
||||
}
|
||||
return resourceEvents;
|
||||
@@ -206,7 +206,7 @@ function ResourceEventRenderer() {
|
||||
slotSegmentContainer = getSlotSegmentContainer(),
|
||||
rtl, dis;
|
||||
|
||||
if (rtl = opt('isRTL')) {
|
||||
if (rtl === opt('isRTL')) {
|
||||
dis = -1;
|
||||
}else{
|
||||
dis = 1;
|
||||
@@ -282,7 +282,7 @@ function ResourceEventRenderer() {
|
||||
// record event sides and title positions
|
||||
for (i=0; i<segCnt; i++) {
|
||||
seg = segs[i];
|
||||
if (eventElement = seg.element) {
|
||||
if (eventElement === seg.element) {
|
||||
seg.vsides = vsides(eventElement, true);
|
||||
seg.hsides = hsides(eventElement, true);
|
||||
titleElement = eventElement.find('.fc-event-title');
|
||||
@@ -295,7 +295,7 @@ function ResourceEventRenderer() {
|
||||
// set all positions/dimensions at once
|
||||
for (i=0; i<segCnt; i++) {
|
||||
seg = segs[i];
|
||||
if (eventElement = seg.element) {
|
||||
if (eventElement === seg.element) {
|
||||
eventElement[0].style.width = Math.max(0, seg.outerWidth - seg.hsides) + 'px';
|
||||
height = Math.max(0, seg.outerHeight - seg.vsides);
|
||||
eventElement[0].style.height = height + 'px';
|
||||
|
||||
@@ -32,22 +32,22 @@ function ResourceView(element, calendar, viewName) {
|
||||
t.timePosition = timePosition;
|
||||
t.getIsCellAllDay = getIsCellAllDay;
|
||||
t.allDayRow = getAllDayRow;
|
||||
t.getCoordinateGrid = function() { return coordinateGrid }; // specifically for AgendaEventRenderer
|
||||
t.getHoverListener = function() { return hoverListener };
|
||||
t.getCoordinateGrid = function() { return coordinateGrid; }; // specifically for AgendaEventRenderer
|
||||
t.getHoverListener = function() { return hoverListener; };
|
||||
t.colLeft = colLeft;
|
||||
t.colRight = colRight;
|
||||
t.colContentLeft = colContentLeft;
|
||||
t.colContentRight = colContentRight;
|
||||
t.getDaySegmentContainer = function() { return daySegmentContainer };
|
||||
t.getSlotSegmentContainer = function() { return slotSegmentContainer };
|
||||
t.getMinMinute = function() { return minMinute };
|
||||
t.getMaxMinute = function() { return maxMinute };
|
||||
t.getSlotContainer = function() { return slotContainer };
|
||||
t.getRowCnt = function() { return 1 };
|
||||
t.getColCnt = function() { return colCnt };
|
||||
t.getColWidth = function() { return colWidth };
|
||||
t.getSnapHeight = function() { return snapHeight };
|
||||
t.getSnapMinutes = function() { return snapMinutes };
|
||||
t.getDaySegmentContainer = function() { return daySegmentContainer; };
|
||||
t.getSlotSegmentContainer = function() { return slotSegmentContainer; };
|
||||
t.getMinMinute = function() { return minMinute; };
|
||||
t.getMaxMinute = function() { return maxMinute; };
|
||||
t.getSlotContainer = function() { return slotContainer; };
|
||||
t.getRowCnt = function() { return 1; };
|
||||
t.getColCnt = function() { return colCnt; };
|
||||
t.getColWidth = function() { return colWidth; };
|
||||
t.getSnapHeight = function() { return snapHeight; };
|
||||
t.getSnapMinutes = function() { return snapMinutes; };
|
||||
t.defaultSelectionEnd = defaultSelectionEnd;
|
||||
t.renderDayOverlay = renderDayOverlay;
|
||||
t.renderSelection = renderSelection;
|
||||
@@ -55,13 +55,13 @@ function ResourceView(element, calendar, viewName) {
|
||||
t.reportDayClick = reportDayClick; // selection mousedown hack
|
||||
t.dragStart = dragStart;
|
||||
t.dragStop = dragStop;
|
||||
t.getResources = calendar.fetchResources;
|
||||
t.getResources = calendar.fetchResources;
|
||||
|
||||
// imports
|
||||
View.call(t, element, calendar, viewName);
|
||||
OverlayManager.call(t);
|
||||
SelectionManager.call(t);
|
||||
ResourceEventRenderer.call(t);
|
||||
ResourceEventRenderer.call(t);
|
||||
var opt = t.opt;
|
||||
var trigger = t.trigger;
|
||||
var renderOverlay = t.renderOverlay;
|
||||
@@ -149,7 +149,7 @@ function ResourceView(element, calendar, viewName) {
|
||||
function updateOptions() {
|
||||
|
||||
tm = opt('theme') ? 'ui' : 'fc';
|
||||
rtl = opt('isRTL')
|
||||
rtl = opt('isRTL');
|
||||
minMinute = parseTime(opt('minTime'));
|
||||
maxMinute = parseTime(opt('maxTime'));
|
||||
colFormat = opt('columnFormat');
|
||||
@@ -181,7 +181,7 @@ function ResourceView(element, calendar, viewName) {
|
||||
var i;
|
||||
var maxd;
|
||||
var minutes;
|
||||
var slotNormal = opt('slotMinutes') % 15 == 0;
|
||||
var slotNormal = opt('slotMinutes') % 15 === 0;
|
||||
|
||||
buildDayTable();
|
||||
|
||||
@@ -547,10 +547,10 @@ function ResourceView(element, calendar, viewName) {
|
||||
var date = cellToDate(0, 0);
|
||||
var rowMatch = this.parentNode.className.match(/fc-slot(\d+)/); // TODO: maybe use data
|
||||
|
||||
ev.data = resources()[col];
|
||||
ev.data = resources()[col];
|
||||
|
||||
if (rowMatch) {
|
||||
var mins = parseInt(rowMatch[1]) * opt('slotMinutes');
|
||||
var mins = parseInt(rowMatch[1], 10) * opt('slotMinutes');
|
||||
var hours = Math.floor(mins/60);
|
||||
date.setHours(hours);
|
||||
date.setMinutes(mins%60 + minMinute);
|
||||
|
||||
Reference in New Issue
Block a user