summaryrefslogtreecommitdiffstats
path: root/tools/droiddoc/templates-sdk
diff options
context:
space:
mode:
authorScott Main <smain@google.com>2012-11-13 11:25:06 -0800
committerScott Main <smain@google.com>2012-11-13 11:40:42 -0800
commit098d8deaefaf6f834db86c15999d2aedd038d272 (patch)
tree9a6e16fc5184890d13ce2b5ac47906323d7245b7 /tools/droiddoc/templates-sdk
parentdf0e161703de693dd6a837c56be810a9e29e7d3c (diff)
downloadbuild-098d8deaefaf6f834db86c15999d2aedd038d272.zip
build-098d8deaefaf6f834db86c15999d2aedd038d272.tar.gz
build-098d8deaefaf6f834db86c15999d2aedd038d272.tar.bz2
docs: add support for ndk tos wall
Change-Id: Ife49429b8241f4e9ce5aaa9f6494d52014a3f238
Diffstat (limited to 'tools/droiddoc/templates-sdk')
-rw-r--r--tools/droiddoc/templates-sdk/sdkpage.cs62
1 files changed, 56 insertions, 6 deletions
diff --git a/tools/droiddoc/templates-sdk/sdkpage.cs b/tools/droiddoc/templates-sdk/sdkpage.cs
index 2cf5c61..41c9446 100644
--- a/tools/droiddoc/templates-sdk/sdkpage.cs
+++ b/tools/droiddoc/templates-sdk/sdkpage.cs
@@ -86,7 +86,7 @@
<tr>
<td>Windows</td>
<td>
- <a onClick="_gaq.push(['_trackEvent', 'Tools', 'Download NDK', 'Link <' + <?cs var:ndk.win_download ?> + '>']);"
+ <a onClick="return onDownload(this)"
href="http://dl.google.com/android/ndk/<?cs var:ndk.win_download ?>"><?cs var:ndk.win_download ?></a>
</td>
<td><?cs var:ndk.win_bytes ?> bytes</td>
@@ -95,7 +95,7 @@
<tr class="alt-color">
<td>Mac OS X (intel)</td>
<td>
- <a onClick="_gaq.push(['_trackEvent', 'Tools', 'Download NDK', 'Link <' + <?cs var:ndk.mac_download ?> + '>']);"
+ <a onClick="return onDownload(this)"
href="http://dl.google.com/android/ndk/<?cs var:ndk.mac_download ?>"><?cs var:ndk.mac_download ?></a>
</td>
<td><?cs var:ndk.mac_bytes ?> bytes</td>
@@ -104,7 +104,7 @@
<tr>
<td>Linux 32/64-bit (x86)</td>
<td>
- <a onClick="_gaq.push(['_trackEvent', 'Tools', 'Download NDK', 'Link <' + <?cs var:ndk.linux_download ?> + '>']);"
+ <a onClick="return onDownload(this)"
href="http://dl.google.com/android/ndk/<?cs var:ndk.linux_download ?>"><?cs var:ndk.linux_download ?></a>
</td>
<td><?cs var:ndk.linux_bytes ?> bytes</td>
@@ -115,6 +115,56 @@
<?cs ######## HERE IS THE JD DOC CONTENT ######### ?>
<?cs call:tag_list(root.descr) ?>
+
+
+<script>
+ function onDownload(link) {
+
+ $("#downloadForRealz").html("Download " + $(link).text());
+ $("#downloadForRealz").attr('href',$(link).attr('href'));
+
+ $("#tos").fadeIn('slow');
+
+ location.hash = "download";
+ return false;
+ }
+
+
+ function onAgreeChecked() {
+ if ($("input#agree").is(":checked")) {
+ $("a#downloadForRealz").removeClass('disabled');
+ } else {
+ $("a#downloadForRealz").addClass('disabled');
+ }
+ }
+
+ function onDownloadNdkForRealz(link) {
+ if ($("input#agree").is(':checked')) {
+ $("#tos").fadeOut('slow');
+
+ $('html, body').animate({
+ scrollTop: $("#Installing").offset().top
+ }, 800, function() {
+ $("#Installing").click();
+ });
+
+ return true;
+ } else {
+ $("label#agreeLabel").parent().stop().animate({color: "#258AAF"}, 200,
+ function() {$("label#agreeLabel").parent().stop().animate({color: "#222"}, 200)}
+ );
+ return false;
+ }
+ }
+
+ $(window).hashchange( function(){
+ if (location.hash == "") {
+ location.reload();
+ }
+ });
+
+</script>
+
<?cs else ?>
<?cs # end if NDK ...
#
@@ -160,7 +210,7 @@
<td>Windows</td>
<td>
<a onClick="return onDownload(this)" id="win-bundle"
- href="http://dl.google.com/android/sdk/<?cs var:sdk.win_bundle_download ?>"><?cs var:sdk.win_bundle_download ?></a>
+ href="http://dl.google.com/android/<?cs var:sdk.win_bundle_download ?>"><?cs var:sdk.win_bundle_download ?></a>
</td>
<td><?cs var:sdk.win_bundle_bytes ?> bytes</td>
<td><?cs var:sdk.win_bundle_checksum ?></td>
@@ -169,7 +219,7 @@
<td>Mac OS X (intel)</td>
<td>
<a onClick="return onDownload(this)" id="mac-bundle"
- href="http://dl.google.com/android/sdk/<?cs var:ndk.mac_bundle_download ?>"><?cs var:sdk.mac_bundle_download ?></a>
+ href="http://dl.google.com/android/<?cs var:sdk.mac_bundle_download ?>"><?cs var:sdk.mac_bundle_download ?></a>
</td>
<td><?cs var:sdk.mac_bundle_bytes ?> bytes</td>
<td><?cs var:sdk.mac_bundle_checksum ?></td>
@@ -178,7 +228,7 @@
<td>Linux 32/64-bit (x86)</td>
<td>
<a onClick="return onDownload(this)" id="linux-bundle"
- href="http://dl.google.com/android/sdk/<?cs var:sdk.linux_bundle_download ?>"><?cs var:sdk.linux_bundle_download ?></a>
+ href="http://dl.google.com/android/<?cs var:sdk.linux_bundle_download ?>"><?cs var:sdk.linux_bundle_download ?></a>
</td>
<td><?cs var:sdk.linux_bundle_bytes ?> bytes</td>
<td><?cs var:sdk.linux_bundle_checksum ?></td>