You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by bu...@apache.org on 2013/06/16 17:10:32 UTC
svn commit: r865835 - in /websites/staging/community/trunk/content: ./
calendars/index.html
Author: buildbot
Date: Sun Jun 16 15:10:32 2013
New Revision: 865835
Log:
Staging update by buildbot for community
Modified:
websites/staging/community/trunk/content/ (props changed)
websites/staging/community/trunk/content/calendars/index.html
Propchange: websites/staging/community/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sun Jun 16 15:10:32 2013
@@ -1 +1 @@
-1493519
+1493520
Modified: websites/staging/community/trunk/content/calendars/index.html
==============================================================================
--- websites/staging/community/trunk/content/calendars/index.html (original)
+++ websites/staging/community/trunk/content/calendars/index.html Sun Jun 16 15:10:32 2013
@@ -152,16 +152,85 @@
<li><a href="/calendars">Calendars</a></li>
</ul>
<hr>
- <p>Within the Apache Software Foundation, a number of projects maintain their own calendars for events, talks and milestones.
-To make it easier to track these things across the whole foundation, the Community Development project will soon provide
-this central to aggregate these into one calendar.</p>
-<p>The Apache Conferences Committee (ConCom) also maintains their list of Apache and Apache related conferences
-<a href="conferences.html">here</a></p>
-<h1 id="calendar">Calendar</h1>
-<p><em>This is coming soon</em></p>
-<h2 id="getting-your-project-events-into-the-calendar">Getting your project events into the Calendar</h2>
-<p>If events from your project are not being listed in the calendar, please get in touch via our <a href="http://mail-archives.apache.org/mod_mbox/community-dev/">mailing list</a>, and let
-us know the details of your event feed (ideally in iCal format). Note that only Apache Projects will be listed here</p>
+ <p>This calendar lists events relating to The Apache Software Foundation and its projects. </p>
+<p>This Calendar is maintained by the Apache Community Development Committee (ComDev),
+to have your event listed considered for addition please mail <a href="mailto:dev@community.apache.org">dev@community.apache.org</a>.
+Note that to be listed in this calendar events must conform to the <a href="http://www.apache.org/foundation/marks/events.html">Third Party Event Branding Policy</a>. </p>
+<h2>Upcoming events</h2>
+
+<ul id="events">
+ <li><i>List loading</i></li>
+</ul>
+
+<iframe src="https://www.google.com/calendar/embed?src=nerseigospses068jd57bk5ar8%40group.calendar.google.com&ctz=America/New_York"
+style="border: 0" width="800" height="600" frameborder="0" scrolling="no"></iframe>
+
+<p>This Calendar is also available as an <a href="https://www.google.com/calendar/ical/nerseigospses068jd57bk5ar8%40group.calendar.google.com/public/basic.ics">iCal feed</a></p>
+<script type="text/javascript">
+function handleContents(li, text) {
+ if(text == undefined || text.length == 0) {
+ return;
+ }
+ parts = text.split("\n");
+ for(var i=0; i<parts.length; i++) {
+ li.appendChild(document.createElement("br"));
+ li.appendChild(document.createTextNode(parts[i]));
+ }
+}
+
+var dateRegExp = new RegExp("^(\\d{4})-(\\d{2})-(\\d{2})$");
+function handleDates(li, when) {
+ var from = when['startTime'];
+ var to = when['endTime'];
+ if(from.match(dateRegExp) && to.match(dateRegExp)) {
+ var fp = from.split(dateRegExp);
+ var tp = to.split(dateRegExp);
+ var fromDate = new Date(fp[1],fp[2]-1,fp[3]);
+ var toDate = new Date(tp[1],tp[2]-1,tp[3]);
+ var realToDate = new Date(toDate.getTime() - 24*60*60*1000);
+
+ var text;
+ if(fromDate.getTime() == realToDate.getTime()) {
+ // Single day
+ text = from;
+ } else {
+ // Really multi day
+ text = from + " to " + realToDate.getFullYear() + "-" +
+ (realToDate.getMonth()+1) + "-" + realToDate.getDate();
+ }
+ li.appendChild(document.createTextNode(" - " + text))
+ } else {
+ li.appendChild(document.createTextNode(" - " + from))
+ }
+}
+
+function render(data) {
+ var ev = document.getElementById("events");
+ if(ev.hasChildNodes()) {
+ while(ev.childNodes.length >= 1) {
+ ev.removeChild(ev.firstChild);
+ }
+ }
+
+ var feed = data.feed;
+ for(var i=0; i<feed.entry.length; i++) {
+ var entry = feed.entry[i];
+ var title = entry.title.$t;
+ var text = entry.content.$t;
+ var when = entry['gd$when'][0];
+
+ var li = document.createElement("li");
+ var li_b = document.createElement("b");
+ li_b.appendChild(document.createTextNode(title));
+ li.appendChild(li_b);
+ handleDates(li, when);
+ handleContents(li, text);
+ ev.appendChild(li);
+ }
+}
+</script>
+
+<script src="http://www.google.com/calendar/feeds/nerseigospses068jd57bk5ar8@group.calendar.google.com/public/full?alt=json-in-script&callback=render&orderby=starttime&max-results=30&singleevents=true&sortorder=ascending&futureevents=true"></script>
</div>
<footer class="footer" align="center">