Skip to content

Instantly share code, notes, and snippets.

@ngstigator
Created August 22, 2012 21:25
Show Gist options
  • Select an option

  • Save ngstigator/3429536 to your computer and use it in GitHub Desktop.

Select an option

Save ngstigator/3429536 to your computer and use it in GitHub Desktop.
calendar-tweaks.js after JSHint
git diff themes/custom/fnfnext/js/calendar-tweaks.js
diff --git a/themes/custom/fnfnext/js/calendar-tweaks.js b/themes/custom/fnfnext/js/calendar-tweaks.js
index 4800379..32d789f 100644
--- a/themes/custom/fnfnext/js/calendar-tweaks.js
+++ b/themes/custom/fnfnext/js/calendar-tweaks.js
@@ -50,14 +50,14 @@ Drupal.behaviors.calendarTweaks = {
var event_days = get_event_days(events[i]);
for (var j = 0; j < event_days.length; j++) {
- var the_day = day_1.index() - 1 + event_days[j]
+ var the_day = day_1.index() - 1 + event_days[j];
event_time = '';
// Only display the time on the starting date
var day_j = new Date(current_year, current_month, event_days[j]);
if (events[i].start.getTime() >= day_j.getTime()) {
var m = events[i].start.getMinutes();
- if (m == 0) {
+ if (m === 0) {
m = '00';
}
event_time = '<span class="time">' + events[i].start.getHours() + ':' + m + '</span> ';
@@ -88,7 +88,7 @@ Drupal.behaviors.calendarTweaks = {
}
}
}
- }
+ };
/* Calculate the differences between start and end day to see if the event happens during several
var get_event_days = function(event) {
@@ -133,7 +133,7 @@ Drupal.behaviors.calendarTweaks = {
}
return event_days;
- }
+ };
// Link events when calendar first load and when pre/next button are clicked
$('#block-views-events-block-1 .fullcalendar')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment