Sha256: 3021f6ef87b1e00bd74a884f44e3bc1ff73c12a7f66d6f50d46469090fc372bc

Contents?: true

Size: 1.36 KB

Versions: 50

Compression:

Stored size: 1.36 KB

Contents

/*
 * Smart event highlighting
 * Handles when events span rows, or don't have a background color
 */
jQuery(document).ready(function($) {
  var highlight_color = "#2EAC6A";
  
  // highlight events that have a background color
  $(".ec-event-bg").on("mouseover", function() {
    event_id = $(this).attr("data-event-id");
		event_class_name = $(this).attr("data-event-class");
    $(".ec-"+event_class_name+"-"+event_id).css("background-color", highlight_color);
  });
  $(".ec-event-bg").on("mouseout", function() {
    event_id = $(this).attr("data-event-id");
		event_class_name = $(this).attr("data-event-class");
    event_color = $(this).attr("data-color");
    $(".ec-"+event_class_name+"-"+event_id).css("background-color", event_color);
  });
  
  // highlight events that don't have a background color
  $(".ec-event-no-bg").on("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").on("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

50 entries across 50 versions & 1 rubygems

Version Path
enju_leaf-1.3.6 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.3.5 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.3.4 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.3.4.rc.2 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.3.4.rc.1 vendor/assets/javascripts/event_calendar.js
enju_leaf-2.0.0.beta.2 vendor/assets/javascripts/event_calendar.js
enju_leaf-2.0.0.beta.1 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.3.3.1 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.3.3 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.3.2 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.3.1 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.3.0 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.3.0.rc.1 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.3.0.beta.2 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.2.2 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.2.1 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.2.0 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.2.0.beta.4 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.2.0.beta.3 vendor/assets/javascripts/event_calendar.js
enju_leaf-1.2.0.beta.2 vendor/assets/javascripts/event_calendar.js