changes to sdk template for new install workflow.
add auto-redirect to install page after download starts.
Change-Id: Ic084742376870ab17eefd639d50540f6222cddf6
diff --git a/tools/droiddoc/templates-sdk/assets/js/docs.js b/tools/droiddoc/templates-sdk/assets/js/docs.js
index e626f5a..ffd9eef 100644
--- a/tools/droiddoc/templates-sdk/assets/js/docs.js
+++ b/tools/droiddoc/templates-sdk/assets/js/docs.js
@@ -63,7 +63,12 @@
$('.scroll-pane').jScrollPane( {verticalGutter:0} );
// add HRs below all H2s (except for a few other h2 variants)
- $('h2').not('#qv h2').not('#tb h2').not('.sidebox h2').not('#devdoc-nav h2').not('h2.norule').css({marginBottom:0}).after('<hr/>');
+ $('h2').not('#qv h2')
+ .not('#tb h2')
+ .not('.sidebox h2')
+ .not('#devdoc-nav h2')
+ .not('h2.norule').css({marginBottom:0})
+ .after('<hr/>');
// set up the search close button
$('.search .close').click(function() {
diff --git a/tools/droiddoc/templates-sdk/sdkpage.cs b/tools/droiddoc/templates-sdk/sdkpage.cs
index 95f6596..24a5eef 100644
--- a/tools/droiddoc/templates-sdk/sdkpage.cs
+++ b/tools/droiddoc/templates-sdk/sdkpage.cs
@@ -430,7 +430,7 @@
/* set up primary adt download button */
$('#download-bundle-button').show();
- $('#download-bundle-button').append("Download the SDK <br/><span class='small'>ADT Bundle for " + os + "</span>");
+ $('#download-bundle-button').append("Download the SDK <br/><span class='small'>with the Eclipse ADT Bundle for " + os + "</span>");
$('#download-bundle-button').click(function() {return onDownload(this,true,true);}).attr('href', bundlename);
/* set up sdk tools only button */
@@ -501,9 +501,18 @@
function onDownloadForRealz(link) {
if ($("input#agree").is(':checked') && $("#bitpicker input:checked").length) {
$("div.sdk-terms").slideUp();
- $("#sdk-terms-form,.sdk-terms-intro").fadeOut('slow');
- $("#next-steps").fadeIn('slow');
- $("h1#tos-header").text('Get Ready to Code!');
+ $("h1#tos-header").text('Now downloading ' + $(link).text() + '...');
+ $("#sdk-terms-form,.sdk-terms-intro").fadeOut('slow', function() {
+ setTimeout(function() {
+ if ($("#downloadForRealz").attr('bundle') == 'true') {
+ // User downloaded the ADT Bundle
+ window.location = "/sdk/installing/index.html?pkg=adt";
+ } else {
+ // User downloaded the SDK Tools
+ window.location = "/sdk/installing/index.html?pkg=tools";
+ }
+ }, 500);
+ });
_gaq.push(['_trackEvent', 'SDK', 'ADT and Tools', $("#downloadForRealz").html()]);
return true;
} else {