changes to sdk template for new install workflow.

add auto-redirect to install page after download starts.

Change-Id: Ic084742376870ab17eefd639d50540f6222cddf6
This commit is contained in:
Scott Main 2014-05-30 21:18:30 -07:00 committed by smain@google.com
parent 7976b2be9e
commit c29b3f58b0
2 changed files with 19 additions and 5 deletions

View File

@ -63,7 +63,12 @@ $(document).ready(function() {
$('.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() {

View File

@ -430,7 +430,7 @@ var:sdk.linux_download
/* 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 @@ var:sdk.linux_download
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 {