add script and style for toggling which IDE instructions to show.

Change-Id: Ief094a4f58c7ebb4625948d6639fed713adcc0c7
This commit is contained in:
smain@google.com 2014-06-16 19:24:25 -07:00
parent 908a05a1ee
commit 95948b88ec
3 changed files with 105 additions and 69 deletions

View file

@ -2989,6 +2989,34 @@ a.header-toggle {
}
/* for IDE instruction toggle (Studio/Eclipse/Other) */
select.ide {
background: transparent;
border: 1px solid #bbb;
border-left: 0;
border-right: 0;
margin: 10px 0;
padding: 10px 0;
color:#666;
}
select.ide,
select.ide option {
font-family: inherit;
font-size:16px;
font-weight:500;
}
/* hide all except eclipse by default */
.select-ide.studio,
.select-ide.other {
display:none;
}
/* ... unless eclipse also includes one of the others */
.select-ide.eclipse.studio,
.select-ide.eclipse.other {
display:block;
}
/* -----------------------------------------------
good/bad example containers
*/

View file

@ -1088,8 +1088,16 @@ function hideNestedItems(list, toggle) {
}
/* Call this to add listeners to a <select> element for Studio/Eclipse/Other docs */
function setupIdeDocToggle() {
$( "select.ide" ).change(function() {
var selected = $(this).find("option:selected").attr("value");
$(".select-ide").hide();
$(".select-ide."+selected).show();
$("select.ide").val(selected);
});
}

View file

@ -501,7 +501,7 @@ var:sdk.linux_download
function onDownloadForRealz(link) {
if ($("input#agree").is(':checked') && $("#bitpicker input:checked").length) {
$("div.sdk-terms").slideUp();
$("h1#tos-header").text('Now downloading ' + $(link).text() + '...');
$("h1#tos-header").text('Now redirecting to the install instructions...');
$("#sdk-terms-form,.sdk-terms-intro").fadeOut('slow', function() {
setTimeout(function() {
if ($("#downloadForRealz").attr('bundle') == 'true') {