Sha256: 5b8302b4610576e06733290b48e1729375131e1eb36f5b24af4df20935d7ea40
Contents?: true
Size: 1.29 KB
Versions: 41
Compression:
Stored size: 1.29 KB
Contents
//= require social_stream.timeline SocialStream.Event = (function(SS, $, undefined) { var indexCallbacks = []; var addIndexCallback = function(callback){ indexCallbacks.push(callback); } var index = function(){ $.each(indexCallbacks, function(i, callback){ callback(); }); } var color = function(){ SocialStream.Events.current.eventColor; } var fixDates = function(){ $(".event").each(function(){ dateString = $(this).find("time").attr("datetime"); date = new Date(dateString); var dayEl = $(this).find(".event_day"); if (dayEl.length) { dayEl.text($.datepicker.formatDate('d', date)); } var monthEl = $(this).find(".event_month"); if (monthEl.length) { monthEl.text($.datepicker.formatDate('M', date)); } var hourEl = $(this).find(".event_hour"); if(hourEl.length) { var minutes = date.getMinutes(); if (minutes<10) minutes = "0" + minutes; hourEl.text(date.getHours() + ':' + minutes); } }); } addIndexCallback(fixDates); SocialStream.Timeline.addInitCallback(index); return { addIndexCallback: addIndexCallback, color: color, index: index } })(SocialStream, jQuery);
Version data entries
41 entries across 41 versions & 2 rubygems