1 page.title=Watch a Webinar 2 @jd:body 3 4 <script type="text/javascript"> 5 6 /** 7 * Draw all webinars from feed into a 'live_webinar' div 8 * @param data The feed data returned from the live webinars request 9 */ 10 function renderLiveWebinar(data) { 11 12 var entries = data.webinars || []; 13 14 var resultsDiv = $('#live_webinar'); 15 var code = []; 16 17 // Loop through each entry (each webinar) and add it to the 'webinars' list 18 for (var i = 0; i < entries.length; i++) { 19 var entry = entries[i]; 20 21 var title = entry.title; 22 var description = entry.description; 23 var url = entry.url; 24 var start = entry.start; 25 var end = entry.end; 26 code.push('<div >'); 27 code.push('<h3><b>Live!</b> <a href="' + url + '" target="_blank" onClick=_gaq.push(["_trackEvent", "Live Webinar", "' + title + '"]);>' + title + '</a></h3>'); 28 code.push('<p ><i>' + formatDate(start, end) + '</i>'); 29 code.push('<p>' + description); 30 code.push('</div>'); 31 } 32 if (entries.length == 0) { 33 code.push('<div >'); 34 code.push('<p class="note">There is currently no live webinar. Check the schedule for <a href="/resources/webinars/webinar-upcoming.html">Upcoming Webinars</a>.'); 35 code.push('</div>'); 36 } 37 var html = code.join('\n'); 38 resultsDiv.html(html); 39 } 40 41 /* Request the webinar feeds from webinarhosting server */ 42 function showLiveWebinars() { 43 var script = "<script type='text/javascript' src='/resources/webinars/date.js'><\/script>"; 44 $("body").append(script); 45 $.getJSON( 46 'http://android-webinars.appspot.com/feeds/api/livewebinar?callback=?', 47 function(json){renderLiveWebinar(json);}); 48 } 49 // Initialization actions 50 showLiveWebinars(); // load webinars 51 52 /** 53 * Draw all past webinars from feed into a 'webinars' div 54 * @param data The feed data returned from the webinars request 55 */ 56 function renderPastWebinar(data) { 57 58 var entries = data.webinars || []; 59 60 var resultsDiv = $('#past_webinars'); 61 var code = []; 62 code.push('<h2> Past Webinars </h2>'); 63 64 // Loop through each entry (each webinar) and add it to the 'webinars' list 65 for (var i = 0; i < entries.length; i++) { 66 var entry = entries[i]; 67 68 var title = entry.title; 69 var description = entry.description; 70 var url = entry.url; 71 var start = entry.start; 72 var end = entry.end; 73 code.push('<div >'); 74 code.push('<h3><a href="' + url + '" target="_blank" onClick=_gaq.push(["_trackEvent", "Past Webinars", "' + title + '"]);>' + title + '</a></h3>'); 75 code.push('<p><i>' + formatDate(start, end) + '</i>'); 76 code.push('<p>' + description); 77 code.push('</div>'); 78 } 79 if (entries.length == 0) { 80 code.push('<div >'); 81 code.push('<p>There are no past webinars.'); 82 code.push('</div>'); 83 } 84 var html = code.join('\n'); 85 resultsDiv.html(html); 86 } 87 88 /* Request the past webinar feeds from webinarhosting server */ 89 function showPastWebinars() { 90 var script = "<script type='text/javascript' src='/resources/webinars/date.js'><\/script>"; 91 $("body").append(script); 92 $.getJSON( 93 'http://android-webinars.appspot.com/feeds/api/pastwebinars?callback=?', 94 function(json){renderPastWebinar(json);}); 95 } 96 // Initialization actions 97 showPastWebinars(); // load webinars 98 99 </script> 100 101 <p>Webinars are web-based seminars that provide online training for a wide range of Android 102 developer topics. When a new webinar takes place, you can watch live and chat with the presenter 103 and other participants in an IRC session that's coupled with the presentation. The IRC session 104 is held on the <em>#android-dev</em> channel at <em>irc.freenode.net</em>.</p> 105 <p style="margin-bottom:2em">When available, live webinars appear at the top of this page. If there's no live webinar, you 106 can watch one of the previous webinars from the list below.</p> 107 108 <div id="live_webinar"> 109 </div> 110 <div id="past_webinars"> 111 </div> 112