Sha256: 6ef613d0d8764e095eb032c432f7cdaca59da55786883edda08877b436916780

Contents?: true

Size: 1.22 KB

Versions: 3

Compression:

Stored size: 1.22 KB

Contents

/*
 * Smart event highlighting
 * Handles when events span rows, or don't have a background color
 */
$(document).ready(function() {
  var highlight_color = "#2EAC6A";
  
  // highlight events that have a background color
  $(".ec-event-bg").live("mouseover", function() {
    event_id = $(this).attr("data-event-id");
    $(".ec-event-"+event_id).css("background-color", highlight_color);
  });
  $(".ec-event-bg").live("mouseout", function() {
    event_id = $(this).attr("data-event-id");
    event_color = $(this).attr("data-color");
    $(".ec-event-"+event_id).css("background-color", event_color);
  });
  
  // highlight events that don't have a background color
  $(".ec-event-no-bg").live("mouseover", function() {
    ele = $(this);
    ele.css("color", "white");
    ele.find("a").css("color", "white");
    ele.find(".ec-bullet").css("background-color", "white");
    ele.css("background-color", highlight_color);
  });
  $(".ec-event-no-bg").live("mouseout", function() {
    ele = $(this);
    event_color = $(this).attr("data-color");
    ele.css("color", event_color);
    ele.find("a").css("color", event_color);
    ele.find(".ec-bullet").css("background-color", event_color);
    ele.css("background-color", "transparent");
  });
});

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
event-calendar-2.3.2 lib/generators/event_calendar/templates/jq_javascript.js
event-calendar-2.3.1 lib/generators/event_calendar/templates/jq_javascript.js
elevation_event_calendar-1.0.0 ./generators/event_calendar/templates/jq_javascript.js