Permalink
Browse files

Cut out all repeated content in calendar display. Just the nitty gritty.

  • Loading branch information...
1 parent 912b12a commit fbfcf57a39cb6218da872e1755d8d5dada839df3 @sbecker sbecker committed Feb 24, 2012
Showing with 9 additions and 9 deletions.
  1. +2 −2 _layouts/default.html
  2. +7 −7 javascripts/calagator_widget.js
View
4 _layouts/default.html
@@ -89,9 +89,9 @@ <h2 class="title">Introduction</h2>
<div class="clear"></div>
</div>
<div class="content">
- <h2 class="title">Calendar</h2>
+ <h2 class="title">Upcoming Meetings</h2>
<div class="inner">
- <p>Meetings take place on the fourth Wednesday of every month from 7-9pm at Jive Software. (<a href="http://calagator.org/venues/202391809">map</a>)
+ <p>Meetings take place on the fourth Wednesday of every month from 7-9pm at Jive Software. (<a href="http://calagator.org/venues/202391809">map</a>)</p>
<a rel="calendar" type="application/json" href="http://calagator.org/events/search.json?tag=pdxjs">Loading...</a>
<p class="first">
Follow the Portland JavaScript Admirers on
View
14 javascripts/calagator_widget.js
@@ -19,8 +19,8 @@ var Calagator = {
var calendar = Object.create(this);
calendar.href = jQuery(calendar_link).attr('href');
- calendar.container = jQuery(calendar_link).replaceWith('<div class="calendar"></div>');
- calendar.container = jQuery('div.calendar');
+ calendar.container = jQuery(calendar_link).replaceWith('<ul class="calendar"></ul>');
+ calendar.container = jQuery('ul.calendar');
calendar.events = [];
jQuery.getJSON(calendar.href + '&callback=?',
@@ -42,20 +42,20 @@ var Calagator = {
item.start_time = item.parse_date(data.start_time);
item.end_time = item.parse_date(data.end_time);
item.calendar = calendar;
- item.calendar.container.append('<div class="vevent">' + item.summary() + item.start_and_end() + ' ' + item.venue() + item.description() + '</div>');
+ item.calendar.container.append('<li class="vevent">' + item.link() + '</li>');
item.calendar.events.push(this);
}
},
- summary: function() {
+ link: function() {
var calagatorUrl = 'http://calagator.org/events/' + encodeURIComponent(this.data.id);
- return '<a href="' + calagatorUrl + '"><h3 class="summary title">' + this.data.title + '</h3></a>';
+ return '<a href="' + calagatorUrl + '" class="summary title">' + this.start_and_end() + '</a>';
},
print_start_time: function() {
- var pretty_time = this.start_time.strftime('%A, %B %d, %Y from %I:%M %P');
+ var pretty_time = this.start_time.strftime('%A, %B %d, %Y, %l%P');
return '<abbr style="border:none" class="dtstart" title="' + this.iso8601(this.start_time) + '">' + pretty_time + '</abbr>';
},
print_end_time: function() {
- var pretty_time = this.end_time.strftime('%I:%M %P');
+ var pretty_time = this.end_time.strftime('%l%P');
return '<abbr style="border:none" class="dtend" title="' + this.iso8601(this.end_time) + '">' + pretty_time + '</abbr>';
},
start_and_end: function() {

0 comments on commit fbfcf57

Please sign in to comment.