From cc0c9daa9162786bab44521b3b75c0019cd3626f Mon Sep 17 00:00:00 2001 From: Megha Joshi Date: Wed, 24 Nov 2010 12:57:06 -0800 Subject: [PATCH] Integrating webinar hosting with developer.android.com Change-Id: I320378560bbb09efade14f583dbcf2d66f34a9d8 --- docs/html/resources/index.jd | 4 + docs/html/resources/resources_toc.cs | 14 ++- docs/html/resources/webinars/date.js | 100 +++++++++++++++++ .../resources/webinars/webinar-upcoming.jd | 53 +++++++++ docs/html/resources/webinars/webinar-watch.jd | 106 ++++++++++++++++++ 5 files changed, 275 insertions(+), 2 deletions(-) create mode 100644 docs/html/resources/webinars/date.js create mode 100644 docs/html/resources/webinars/webinar-upcoming.jd create mode 100644 docs/html/resources/webinars/webinar-watch.jd diff --git a/docs/html/resources/index.jd b/docs/html/resources/index.jd index 166872131a970..699952a0b442a 100644 --- a/docs/html/resources/index.jd +++ b/docs/html/resources/index.jd @@ -29,6 +29,10 @@ techniques that you find in the samples!
Links to the Android discussion groups and information about other ways to collaborate with other developers.
+
Webinars
+
Online training videos on wide range of Android topics +coupled with live IRC chat sessions for discussions.
+
More
Quick development tips, troubleshooting information, and frequently asked questions (FAQs).
diff --git a/docs/html/resources/resources_toc.cs b/docs/html/resources/resources_toc.cs index ed23c7c789b85..0e1718895bb7f 100644 --- a/docs/html/resources/resources_toc.cs +++ b/docs/html/resources/resources_toc.cs @@ -270,8 +270,18 @@ - - + +
  • +

    Webinars

    + +
  • More diff --git a/docs/html/resources/webinars/date.js b/docs/html/resources/webinars/date.js new file mode 100644 index 0000000000000..97abf4b350d73 --- /dev/null +++ b/docs/html/resources/webinars/date.js @@ -0,0 +1,100 @@ +// Copyright 2009 Google Inc. All Rights Reserved. + +/** + * @fileoverview Utility functions for formating date. + */ + +/** + * Formats start date and end date in JSON format to string of format: + "09/09/2010 20:00 PM to 22:00 PM PST" + * @param {object} start date in JSON format. + * @param {object} end date in JSON format. + * @param {string} formatted date string. + */ +function formatDate(start,end) { + var s_ampm = null; + var e_ampm = null; + + var toStr = function (num) { + if (num <= 12) { + return "" + num; + } else { + return "" + (num - 12); + } + }; + + var getMonthName = function (num) { + switch(num) { + case 1: + return 'January'; + case 2: + return 'February'; + case 3: + return 'March'; + case 4: + return 'April'; + case 5: + return 'May'; + case 6: + return 'June'; + case 7: + return 'July'; + case 8: + return 'August'; + case 9: + return 'September'; + case 10: + return 'October'; + case 11: + return 'November'; + case 12: + return 'December'; + } + } + + var regex = /(^\d{4})-(\d{2})-(\d{2})\s{1}(\d{2}):(\d{2}):(\d{2}$)/; + var s_match = regex.exec(start.toString()); + + if( s_match == null) { + return ''; + } + var yy = s_match[1]; + + var mm = parseInt(s_match[2], 10 /** base 10 **/); + var dd = s_match[3]; + + var s_hh = parseInt(s_match[4], 10 /** base 10 **/); + + if (s_hh > 12) { + s_ampm = "PM"; + } else { + s_ampm = "AM"; + } + s_hh = toStr(s_hh); + var s_mi = s_match[5]; + + + var str = getMonthName(mm) + " " + dd + ", " + yy ; + str += " " + s_hh + ":" + s_mi; + str += " " + s_ampm; + + regex = /(^\d{4})-(\d{2})-(\d{2})\s{1}(\d{2}):(\d{2}):(\d{2}$)/; + var e_match = regex.exec(end.toString()); + if( e_match == null) { + return str + ' PST'; + } + var e_hh = parseInt(e_match[4], 10 /** base 10 **/); + if (e_hh > 12) { + e_ampm = "PM"; + } else { + e_ampm = "AM"; + } + e_hh = toStr(e_hh); + var e_mi = e_match[5]; + + str += " to " + e_hh + ":" + e_mi; + str += " " + e_ampm; + str += " PST"; + return str; + +} diff --git a/docs/html/resources/webinars/webinar-upcoming.jd b/docs/html/resources/webinars/webinar-upcoming.jd new file mode 100644 index 0000000000000..b9602f4df5f37 --- /dev/null +++ b/docs/html/resources/webinars/webinar-upcoming.jd @@ -0,0 +1,53 @@ +page.title=Upcoming Schedule +@jd:body + + + + +
    +
    diff --git a/docs/html/resources/webinars/webinar-watch.jd b/docs/html/resources/webinars/webinar-watch.jd new file mode 100644 index 0000000000000..5301b3f6fc2a5 --- /dev/null +++ b/docs/html/resources/webinars/webinar-watch.jd @@ -0,0 +1,106 @@ +page.title=Watch A Webinar +@jd:body + + + + + +
    +
    +
    +