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 2015/05/30 17:10:32 UTC
svn commit: r953223 - in /websites/staging/community/trunk/content: ./
calendars/index.html
Author: buildbot
Date: Sat May 30 15:10:32 2015
New Revision: 953223
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 Sat May 30 15:10:32 2015
@@ -1 +1 @@
-1679252
+1682614
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 Sat May 30 15:10:32 2015
@@ -167,71 +167,11 @@ Note that to be listed in this calendar
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]));
- }
-}
+<script src="/js/jquery-1.9.1.min.js"></script>
-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);
+<script src="https://events.apache.org/js/events-calendar.js"></script>
- 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>
+<script src="https://apis.google.com/js/client.js"></script>
</div>
<footer class="footer" align="center">