diff options
Diffstat (limited to 'tools/droiddoc')
51 files changed, 517 insertions, 288 deletions
diff --git a/tools/droiddoc/src/DroidDoc.java b/tools/droiddoc/src/DroidDoc.java index 23ff654..f664c41 100644 --- a/tools/droiddoc/src/DroidDoc.java +++ b/tools/droiddoc/src/DroidDoc.java @@ -461,10 +461,13 @@ public class DroidDoc continue; } Boolean allHidden = true; - int pass = 1; - ClassInfo[] classesToCheck = pkg.ordinaryClasses(); + int pass = 0; + ClassInfo[] classesToCheck = null; while (pass < 5 ) { switch(pass) { + case 0: + classesToCheck = pkg.ordinaryClasses(); + break; case 1: classesToCheck = pkg.enums(); break; diff --git a/tools/droiddoc/src/Errors.java b/tools/droiddoc/src/Errors.java index 1431314..dfeac88 100644 --- a/tools/droiddoc/src/Errors.java +++ b/tools/droiddoc/src/Errors.java @@ -25,10 +25,12 @@ public class Errors private static class Message implements Comparable { SourcePositionInfo pos; + int level; String msg; - Message(SourcePositionInfo p, String m) { + Message(SourcePositionInfo p, int l, String m) { pos = p; + level = l; msg = m; } @@ -50,14 +52,15 @@ public class Errors return; } - String which = (!warningsAreErrors && error.level == WARNING) ? " warning " : " error "; + int level = (!warningsAreErrors && error.level == WARNING) ? WARNING : ERROR; + String which = level == WARNING ? " warning " : " error "; String message = which + error.code + ": " + text; if (where == null) { where = new SourcePositionInfo("unknown", 0, 0); } - allErrors.add(new Message(where, message)); + allErrors.add(new Message(where, level, message)); if (error.level == ERROR || (warningsAreErrors && error.level == WARNING)) { hadError = true; @@ -66,7 +69,14 @@ public class Errors public static void printErrors() { for (Message m: allErrors) { - System.err.println(m.toString()); + if (m.level == WARNING) { + System.err.println(m.toString()); + } + } + for (Message m: allErrors) { + if (m.level == ERROR) { + System.err.println(m.toString()); + } } } diff --git a/tools/droiddoc/src/PackageInfo.java b/tools/droiddoc/src/PackageInfo.java index 09b73d4..aac0def 100644 --- a/tools/droiddoc/src/PackageInfo.java +++ b/tools/droiddoc/src/PackageInfo.java @@ -117,36 +117,55 @@ public class PackageInfo extends DocInfo implements ContainerInfo public void makeClassLinkListHDF(HDF data, String base) { makeLink(data, base); - ClassInfo.makeLinkListHDF(data, base + ".interfaces", ClassInfo.sortByName(interfaces())); - ClassInfo.makeLinkListHDF(data, base + ".classes", ClassInfo.sortByName(ordinaryClasses())); - ClassInfo.makeLinkListHDF(data, base + ".enums", ClassInfo.sortByName(enums())); - ClassInfo.makeLinkListHDF(data, base + ".exceptions", ClassInfo.sortByName(exceptions())); - ClassInfo.makeLinkListHDF(data, base + ".errors", ClassInfo.sortByName(errors())); + ClassInfo.makeLinkListHDF(data, base + ".interfaces", interfaces()); + ClassInfo.makeLinkListHDF(data, base + ".classes", ordinaryClasses()); + ClassInfo.makeLinkListHDF(data, base + ".enums", enums()); + ClassInfo.makeLinkListHDF(data, base + ".exceptions", exceptions()); + ClassInfo.makeLinkListHDF(data, base + ".errors", errors()); } public ClassInfo[] interfaces() { - return filterHidden(Converter.convertClasses(mPackage.interfaces())); + if (mInterfaces == null) { + mInterfaces = ClassInfo.sortByName(filterHidden(Converter.convertClasses( + mPackage.interfaces()))); + } + return mInterfaces; } public ClassInfo[] ordinaryClasses() { - return filterHidden(Converter.convertClasses(mPackage.ordinaryClasses())); + if (mOrdinaryClasses == null) { + mOrdinaryClasses = ClassInfo.sortByName(filterHidden(Converter.convertClasses( + mPackage.ordinaryClasses()))); + } + return mOrdinaryClasses; } public ClassInfo[] enums() { - return filterHidden(Converter.convertClasses(mPackage.enums())); + if (mEnums == null) { + mEnums = ClassInfo.sortByName(filterHidden(Converter.convertClasses(mPackage.enums()))); + } + return mEnums; } public ClassInfo[] exceptions() { - return filterHidden(Converter.convertClasses(mPackage.exceptions())); + if (mExceptions == null) { + mExceptions = ClassInfo.sortByName(filterHidden(Converter.convertClasses( + mPackage.exceptions()))); + } + return mExceptions; } public ClassInfo[] errors() { - return filterHidden(Converter.convertClasses(mPackage.errors())); + if (mErrors == null) { + mErrors = ClassInfo.sortByName(filterHidden(Converter.convertClasses( + mPackage.errors()))); + } + return mErrors; } // in hashed containers, treat the name as the key @@ -157,5 +176,10 @@ public class PackageInfo extends DocInfo implements ContainerInfo private String mName; private PackageDoc mPackage; + private ClassInfo[] mInterfaces; + private ClassInfo[] mOrdinaryClasses; + private ClassInfo[] mEnums; + private ClassInfo[] mExceptions; + private ClassInfo[] mErrors; } diff --git a/tools/droiddoc/templates-sdk/customization.cs b/tools/droiddoc/templates-sdk/customization.cs index 6a0f64c..a116c67 100644 --- a/tools/droiddoc/templates-sdk/customization.cs +++ b/tools/droiddoc/templates-sdk/customization.cs @@ -5,14 +5,8 @@ <div id="header"> <div id="headerLeft"> <a href="<?cs var:toroot ?>index.html" tabindex="-1"><img - src="<?cs var:toroot ?>assets/images/bg_logo.jpg" /></a> - </div> - <div id="headerRight"> - <div id="headerLinks" align="right"> - <img src="<?cs var:toroot ?>assets/images/icon_world.jpg"><span class="text"> <a href="#">English</a> | <a href="http://www.android.com">Android.com</a></span> - </div> + src="<?cs var:toroot ?>assets/images/bg_logo.png" alt="Android Developers" /></a> - <?cs call:default_search_box() ?> <ul class="<?cs if:reference ?>reference<?cs elif:guide ?>guide<?cs @@ -20,11 +14,13 @@ elif:home ?>home<?cs elif:community ?>community<?cs elif:publish ?>publish<?cs - elif:about ?>about<?cs /if ?>"> - <?cs if:android.whichdoc == "online" ?> - <li id="home-link"><a href="<?cs var:toroot ?>index.html"><span>Home</span></a></li> - <?cs /if ?> - <li id="sdk-link"><a href="<?cs var:toroot ?>sdk/index.html"><span>SDK</span></a></li> + elif:about ?>about<?cs /if ?>"> + <li id="home-link"><a href="<?cs var:toroot ?><?cs + if:android.whichdoc != "online" ?>offline.html<?cs + else ?>index.html<?cs /if ?>"> + <span>Home</span></a></li> + + <li id="sdk-link"><a href="<?cs var:toroot ?>sdk/1.1_r1/index.html"><span>SDK</span></a></li> <li id="guide-link"><a href="<?cs var:toroot ?>guide/index.html" onClick="return loadLast('guide')"><span>Dev Guide</span></a></li> <li id="reference-link"><a href="<?cs var:toroot ?>reference/packages.html" @@ -33,14 +29,26 @@ <li id="community-link"><a href="<?cs var:toroot ?>community/index.html"><span>Community</span></a></li> </ul> + </div> + <div id="headerRight"> + <div id="headerLinks"> + <!-- <img src="<?cs var:toroot ?>assets/images/icon_world.jpg" alt="" /> --> + <span class="text"> + <!-- <a href="#">English</a> | --> + <a href="http://www.android.com">Android.com</a> + </span> + </div> + + <?cs call:default_search_box() ?> + </div><!-- headerRight --> </div><!-- header --> <?cs /def ?><?cs # custom_masthead ?> <?cs def:sdk_nav() ?> -<div class="g-section g-tpl-180" id="body-content"> - <div class="g-unit g-first" id="side-nav"> +<div class="g-section g-tpl-240" id="body-content"> + <div class="g-unit g-first not-resizable" id="side-nav"> <div id="devdoc-nav"> <?cs include:"../../../java/android/html/sdk/sdk_toc.cs" ?> </div> @@ -82,9 +90,26 @@ <?cs /if ?> <?cs /def ?> - <?cs # appears on the left side of the blue bar at the bottom of every page ?> -<?cs def:custom_copyright() ?>Copyright 2008 <a href="http://source.android.com/">The Android Open Source Project</a><?cs /def ?> +<?cs def:custom_cc_copyright() ?>Except as noted, this content is +licensed under <a href="http://creativecommons.org/licenses/by/2.5/"> +Creative Commons Attribution 2.5</a>. For details and +restrictions, see the <a href="<?cs var:toroot ?>license.html">Content +License</a>.<?cs /def ?> + +<?cs def:custom_copyright() ?>Except as noted, this content is +licensed under <a +href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. +For details and restrictions, see the <a href="<?cs var:toroot ?>license.html"> +Content License</a>.<?cs /def ?> + +<?cs def:custom_footerlinks() ?> +<p> + <a href="http://www.android.com/terms.html">Site Terms of Service</a> - + <a href="http://www.android.com/privacy.html">Privacy Policy</a> - + <a href="http://www.android.com/branding.html">Brand Guidelines</a> +</p> +<?cs /def ?> <?cs # appears on the right side of the blue bar at the bottom of every page ?> -<?cs def:custom_buildinfo() ?>Build <?cs var:page.build ?> - <?cs var:page.now ?><?cs /def ?> +<?cs def:custom_buildinfo() ?>Android 1.1 r1 - <?cs var:page.now ?><?cs /def ?> diff --git a/tools/droiddoc/templates-sdk/sdkpage.cs b/tools/droiddoc/templates-sdk/sdkpage.cs index e274237..97fab66 100644 --- a/tools/droiddoc/templates-sdk/sdkpage.cs +++ b/tools/droiddoc/templates-sdk/sdkpage.cs @@ -1,88 +1,94 @@ +<?cs include:"doctype.cs" ?> <?cs include:"macros.cs" ?> <html> -<?cs include:"head_tag.cs" ?> +<?cs if:sdk.redirect ?> + <head> + <title>Redirecting...</title> + <meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs var:sdk.redirect ?>/index.html"> + <link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" /> + </head> +<?cs else ?> + <?cs include:"head_tag.cs" ?> +<?cs /if ?> <body class="gc-documentation"> <a name="top"></a> <?cs call:custom_masthead() ?> <?cs call:sdk_nav() ?> - + <div class="g-unit" id="doc-content" > -<div id="jd-content" style="min-width:870px"> - -<h1><?cs var:sdk.version ?></h1> -<p><em> -<?cs var:sdk.date ?> - -<a href="RELEASENOTES.html">Release Notes</a> -</em></p> - -<div id="qv-wrapper"> -<div id="qv"> -<h2>Get Started</h2> -<p><a href="requirements.html">System and Sofware Requirements</a></p> -<p><a href="installing.html">Guide to Installing the SDK</a></p> - -<h2>Upgrade</h2> -<p><a href="upgrading.html">Upgrading the SDK</a></p> -<p><a href="migrating/changes-overview.html">API changes overview</a></p> -<p><a href="migrating/changes.html">API differences report</a></p> - -<h2>Using Eclipse?</h2> -<p>Android provides an Eclipse plugin to help make programming and debugging easier.</p> -<p><a href="<?cs var:toroot ?>guide/developing/tools/adt.html">Install Eclipse plugin</a></p> -</div> -</div> - - -<p>Before downloading, please read the <a href="terms.html">Terms</a> - that govorn the use of the Android SDK.</p> - -<p class="special-note"><strong>Please note:</strong> The Android SDK is under active development. - Please keep this in mind as you explore its capabilities. If you discover any issues, we - welcome you to notify us of them via our Issue Tracker.</p> - -<table class="download"> +<div id="jd-content"> + +<?cs if:sdk.redirect ?> + Redirecting to + <a href="<?cs var:toroot ?>sdk/<?cs var:sdk.redirect ?>/index.html"> + <?cs var:toroot ?>sdk/<?cs var:sdk.redirect ?>/index.html + </a>... +<?cs else ?> + + <h1><?cs var:page.title ?></h1> + <p><em> + <?cs var:sdk.date ?> + </em></p> + +<?cs if:sdk.not_latest_version ?> + <div class="special"> + <p><strong>This is NOT the latest version of the Android SDK</strong>.</p> + <p>Go to the <a href="<?cs var:toroot ?>sdk/index.html">SDK home page</a> to be directed to the latest version.</p> + </div> +<?cs /if ?> + + +<p>Before downloading, please read the <a href="<?cs var:toroot ?>sdk/<?cs var:sdk.version ?>/requirements.html"> +System Requirements</a> document. As you start the download, you will also need to review and agree to +the Terms and Conditions that govern the use of the Android SDK. </p> + + <table class="download"> + <tr> + <th>Platform</th> + <th>Package</th> + <th>Size</th> + <th>MD5 Checksum</th> + </tr> <tr> - <th>Platform</th> - <th>Package</th> - <th>Size</th> - <th>MD5 Checksum</th> -</tr> -<tr> - <td>Windows</td> - <td> -<a href="http://dl.google.com/android/<?cs var:sdk.win_download ?>"><?cs var:sdk.win_download ?></a> - </td> - <td><?cs var:sdk.win_bytes ?></td> - <td><?cs var:sdk.win_checksum ?></td> -</tr> -<tr class="alt-color"> - <td>Mac OS X (intel)</td> - <td> -<a href="http://dl.google.com/android/<?cs var:sdk.mac_download ?>"><?cs var:sdk.mac_download ?></a> - </td> - <td><?cs var:sdk.mac_bytes ?></td> - <td><?cs var:sdk.mac_checksum ?></td> -</tr> -<tr> - <td>Linux (i386)</td> - <td> -<a href="http://dl.google.com/android/<?cs var:sdk.linux_download ?>"><?cs var:sdk.linux_download ?></a> - </td> - <td><?cs var:sdk.linux_bytes ?></td> - <td><?cs var:sdk.linux_checksum ?></td> -</tr> -</table> - + <td>Windows</td> + <td> + <a href="<?cs var:toroot ?>sdk/download.html?v=<?cs var:sdk.win_download ?>"><?cs var:sdk.win_download ?></a> + </td> + <td><?cs var:sdk.win_bytes ?> bytes</td> + <td><?cs var:sdk.win_checksum ?></td> + </tr> + <tr class="alt-color"> + <td>Mac OS X (intel)</td> + <td> + <a href="<?cs var:toroot ?>sdk/download.html?v=<?cs var:sdk.mac_download ?>"><?cs var:sdk.mac_download ?></a> + </td> + <td><?cs var:sdk.mac_bytes ?> bytes</td> + <td><?cs var:sdk.mac_checksum ?></td> + </tr> + <tr> + <td>Linux (i386)</td> + <td> + <a href="<?cs var:toroot ?>sdk/download.html?v=<?cs var:sdk.linux_download ?>"><?cs var:sdk.linux_download ?></a> + </td> + <td><?cs var:sdk.linux_bytes ?> bytes</td> + <td><?cs var:sdk.linux_checksum ?></td> + </tr> + </table> + + <?cs call:tag_list(root.descr) ?> + +<?cs /if ?> </div><!-- end jd-content --> <?cs include:"footer.cs" ?> </div><!-- end doc-content --> -</div><!-- end body-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html> diff --git a/tools/droiddoc/templates/assets/android-developer-core.css b/tools/droiddoc/templates/assets/android-developer-core.css index 73c08db..b32f129 100644 --- a/tools/droiddoc/templates/assets/android-developer-core.css +++ b/tools/droiddoc/templates/assets/android-developer-core.css @@ -18,22 +18,25 @@ embed,object,applet { /* BASICS */ +html, body { + overflow:hidden; /* keeps scrollbar off IE */ + background-color:#fff; +} + body { font-family:arial,sans-serif; color:#000; font-size:13px; color:#333; - overflow:hidden; - padding:0; - margin:0; background-image:url(images/bg_fade.jpg); background-repeat:repeat-x; } a, a code { - color:#00c; + color:#006699; } + a:active, a:active code { color:#f00; @@ -41,7 +44,7 @@ a:active code { a:visited, a:visited code { - color:#551a8b; + color:#006699; } input, select, @@ -164,75 +167,68 @@ hr.blue { /* LAYOUT */ #body-content { margin:0; - position:fixed; - top:103px; + position:relative; width:100%; } #header { - border-bottom: #74AC23 solid 3px; - height: 100px; + height: 114px; position:relative; z-index:100; - min-width:620px; + min-width:576px; + padding:0 10px; + border-bottom:3px solid #94b922; } #headerLeft{ - position:absolute; - border:none; - margin:20px 0 0 10px; - overflow:visible; - font-size: 36px; + padding: 25px 0 0; } #headerRight { - float:right; - border:none; - width:615px; - height:100px; + position:absolute; + right:0; + top:0; + text-align:right; } /* Tabs in the header */ #header ul { list-style: none; - float: right; - margin: 0px 3px 0px 0px; - padding: 0px 0px 0px 0px; - height: 32px; - position:absolute; - bottom:0; - right:0; + margin: 7px 0 0; + padding: 0; + height: 29px; } #header li { float: left; - margin: 0px 5px 0px 0px; + margin: 0px 2px 0px 0px; padding:0; } #header li a { text-decoration: none; display: block; - background-image: url(images/tab_default.png); + background-image: url(images/bg_images_sprite.png); + background-position: 0 -58px; background-repeat: no-repeat; color: #666; font-size: 13px; - font-weight: normal; - width: 96px; - height: 32px; + font-weight: bold; + width: 94px; + height: 29px; text-align: center; margin: 0px; } #header li a:hover { - background-image: url(images/tab_hover.png); + background-image: url(images/bg_images_sprite.png); + background-position: 0 -29px; background-repeat: no-repeat; - color: #fff; } #header li a span { position:relative; - top:9px; + top:7px; } /* TAB HIGHLIGHTING */ @@ -243,7 +239,8 @@ hr.blue { .sdk #sdk-link a, .community #community-link a, .about #about-link a { - background-image: url(images/tab_selected.png); + background-image: url(images/bg_images_sprite.png); + background-position: 0 0; background-repeat: no-repeat; color: #fff; font-weight: bold; @@ -257,14 +254,13 @@ hr.blue { .sdk #sdk-link a:hover, .community #community-link a:hover, .about #about-link a:hover { - background-image: url(images/tab_selected.png); + background-image: url(images/bg_images_sprite.png); + background-position: 0 0; } #headerLinks { margin:10px 10px 0 0; height:13px; - /* nudge IE because green border is inside header */ - _margin-top:7px; } #headerLinks .text { @@ -283,7 +279,7 @@ hr.blue { #search { height:45px; - margin:0 10px 0 0; + margin:15px 10px 0 0; } /* main */ @@ -296,7 +292,7 @@ hr.blue { #mainBodyFixed { margin: 20px 10px; color: #333; - width:920px; + width:930px; } #mainBodyFixed h3, @@ -329,13 +325,6 @@ hr.blue { background-color:none; } -#mainBodyFixed a, -#mainBodyFluid a { - color: #006699; - font-size: 13px; - text-decoration: underline; -} - #mainBodyLeft { float: left; width: 600px; @@ -383,17 +372,17 @@ div.indent { #mainBodyRight td { border:0px solid #666; - padding:0px 5px; - text-align:left; + padding:0px 5px; + text-align:left; } #mainBodyRight .blueBorderBox { border:5px solid #ddf0f2; - padding:18px 18px 18px 18px; - text-align:left; + padding:18px 18px 18px 18px; + text-align:left; } -#mainBodyRight .seperator { +#mainBodyFixed .seperator { background-image:url(images/hr_gray_side.jpg); background-repeat:no-repeat; width: 100%; @@ -421,17 +410,27 @@ div.indent { float: left; width:90%; margin: 20px; - color: #666; + color: #aaa; font-size: 11px; } #footer a { - color: #666; + color: #aaa; font-size: 11px; } #footer a:hover { text-decoration: underline; + color:#aaa; +} + +#footerlinks { + margin-top:2px; +} + +#footerlinks a, +#footerlinks a:visited { + color:#006699; } #homeBottom td { @@ -537,16 +536,13 @@ vertical-align: bottom; #search_filtered_div { position:absolute; + margin-top:-1px; z-index:101; - width:280px; + border:1px solid #BCCDF0; + background-color:#fff; } #search_filtered { - border:1px solid #BCCDF0; - background-color:#fff; - position:relative; - top:-1px; - _top:-19px; /*IE*/ min-width:100%; } #search_filtered td{ @@ -554,11 +550,9 @@ vertical-align: bottom; border-bottom: 1px solid #669999; line-height:1.5em; } -#search_filtered a{ - color:#0000cc; -} + #search_filtered .jd-selected { - background-color: #A4C639; + background-color: #94b922; cursor:pointer; } #search_filtered .jd-selected, @@ -692,44 +686,71 @@ td.gsc-search-button { padding: 0px 0px 0px 0px; float: left; width: 584px; - height: 450px; + height: 580px; background:url(images/home/bg_home_middle.png) no-repeat 0 0; } -#homeMiddle #homeTitle { - margin:17px 17px 0; - height:35px; +#homeTitle { + margin:15px 15px 0; + height:30px; + background:url(images/hr_gray_side.jpg) no-repeat 0 29px; +} + +#homeTitle h2 { + padding:0; +} + +#announcement-block { + margin:15px 15px 0; + height:125px; +} + +#announcement-block img { + float:left; + margin:0 30px 0 0; +} + +#announcement { + float:left; + margin:0; } .clearer { clear:both; } #arrow-left, #arrow-right { display:block; - width:25px; - height:116px; + width:42px; + height:42px; + background-image:url(images/home/carousel_buttons_sprite.png); background-repeat:no-repeat; } #arrow-left { float:left; - margin:0 15px 0 10px; + margin:35px 3px 0 10px; } #arrow-right { float:left; - margin-left:15px; + margin:35px 10px 0 0; } .arrow-left-off, -#arrow-left:hover { - background-image:url(images/arrow_left_off.jpg); +#arrow-left.arrow-left-off:hover { + background-position:0 0; } -.arrow-left-on { - background-image:url(images/arrow_left_on.jpg); +.arrow-right-off, +#arrow-right.arrow-right-off:hover { + background-position:-42px 0; +} +#arrow-left:hover { + background-position:0 -42px; } -.arrow-right-off, #arrow-right:hover { - background-image:url(images/arrow_right_off.jpg); + background-position:-42px -42px; +} +.arrow-left-on { + background-position:0 0; } .arrow-right-on { - background-image:url(images/arrow_right_on.jpg); + background-position:-42px 0; } .arrow-right-off, @@ -740,7 +761,7 @@ td.gsc-search-button { .app-list-container { clear:both; text-align: center; - margin:37px 25px 0; + margin:37px 20px 0; _margin-top:33px; border:0px solid #ccc; position:relative; @@ -761,7 +782,7 @@ div#app-list { position:absolute; margin:11px 0 0; _margin-top:13px; - width:100%; + width:1000%; } #app-list a { @@ -794,9 +815,14 @@ div#app-list { cursor:default; text-decoration:none; } + #app-list a:hover, #app-list a:active { background:#ff9900; +} + +#app-list a:hover span, +#app-list a:active span { text-decoration:underline; } diff --git a/tools/droiddoc/templates/assets/android-developer-docs.css b/tools/droiddoc/templates/assets/android-developer-docs.css index 44b5a4d..27ef359 100644 --- a/tools/droiddoc/templates/assets/android-developer-docs.css +++ b/tools/droiddoc/templates/assets/android-developer-docs.css @@ -34,6 +34,10 @@ font-size:12px; } +#side-nav.not-resizable { + background:url('images/sidenav-rule.png') no-repeat 243px 0; +} + #resize-packages-nav { /* keeps the resize handle below the h-scroll handle */ height:270px; @@ -199,6 +203,17 @@ overflow-y: scroll; } +#nav-swap { + font-size:10px; + line-height:10px; + margin-left:1em; + text-decoration:none; + display:block; +} + +#tree-link { + +} /* DOCUMENT BODY */ @@ -208,7 +223,7 @@ #jd-header { background-color: #E2E2E2; - padding: 7px 20px; + padding: 7px 15px; } #jd-header h1 { @@ -268,10 +283,12 @@ font-size:.9em; text-decoration:underline; } -/* a div inside a sumtable th holding "Expand All" */ -.expandall { -float:right; -font-weight:normal; +/* the link inside a sumtable for "Show All/Hide All" */ +.toggle-all { + display:block; + float:right; + font-weight:normal; + font-size:0.9em; } /* adjustments for in/direct subclasses tables */ @@ -354,7 +371,7 @@ links to summary tables) */ } #jd-content { - padding: 18px 20px; + padding: 18px 15px; } hr { @@ -640,22 +657,18 @@ pre.classic { #qv-wrapper { float: right; - position:relative; - width:315px; + width:310px; background-color:#fff; - padding:4px 30px 15px 20px; - top:-55px; - left:20px; + margin:-48px 0 0 0; + padding:0 0 20px 35px; } #qv { background-color:#fff; border:4px solid #dee8f1; - margin:0 0 0 15px; + margin:0; padding:0 6px 6px; - margin-top:0px; - width:295; - float:right; + width:270px; font-size:.9em; } @@ -730,27 +743,50 @@ pre.classic { .sidebox-wrapper { float: right; - width:300px; + width:280px; background-color:#fff; - margin: 0 0 0 15px; - padding: 5px 0 5px 15px; + margin: 0; + padding: 20px 0 20px 20px; } .sidebox-inner { border-left:1px solid #dee8f1; background-color:#ffffee; - padding:0 5px 0 15px; + padding:5px 8px 5px 12px; + font-size:90%; + width:260px; } .sidebox { float: right; - width:285px; + width:260px; background-color:#ffffee; border-left:1px solid #dee8f1; - margin: 0 0 0 15px; + margin: 12px 0 0 15px; padding:5px 8px 0 12px; + font-size:90%; } +.sidebox p, +.sidebox-inner p { + margin-bottom: .25em; +} + +.sidebox ul, +.sidebox-inner ul { + padding: 0 0 0 1.5em; +} + +.sidebox li ul, +.sidebox-inner li ul { + margin-top:0; + margin-bottom:.1em; +} + +.sidebox li, +.sidebox-inner li { +padding:0 0 0 0em; +} #jd-content .sidebox h2, #jd-content .sidebox h3, @@ -857,7 +893,7 @@ tr.alt-color { } /* expando trigger */ -#jd-content .jd-expando-trigger { +#jd-content .jd-expando-trigger-img { margin:0; } @@ -1042,4 +1078,4 @@ body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body display:none; } -}
\ No newline at end of file +} diff --git a/tools/droiddoc/templates/assets/android-developer-docs.js b/tools/droiddoc/templates/assets/android-developer-docs.js index f2276ee..cd9c0b3 100644 --- a/tools/droiddoc/templates/assets/android-developer-docs.js +++ b/tools/droiddoc/templates/assets/android-developer-docs.js @@ -3,7 +3,7 @@ var classesNav; var devdocNav; var sidenav; var content; -var HEADER_HEIGHT = 103; +var HEADER_HEIGHT = 117; var cookie_style = 'android_developer'; var NAV_PREF_TREE = "tree"; var NAV_PREF_PANELS = "panels"; @@ -23,16 +23,17 @@ function addLoadEvent(newfun) { } } -addLoadEvent(prepare); window.onresize = resizeAll; function setToRoot(root) { toRoot = root; + // note: toRoot also used by carousel.js } function restoreWidth(navWidth) { var windowWidth = $(window).width() + "px"; - content.css({marginLeft:navWidth, width:parseInt(windowWidth) - parseInt(navWidth) + "px"}); + content.css({marginLeft:parseInt(navWidth) + 6 + "px", //account for 6px-wide handle-bar + width:parseInt(windowWidth) - parseInt(navWidth) - 6 + "px"}); sidenav.css({width:navWidth}); resizePackagesNav.css({width:navWidth}); classesNav.css({width:navWidth}); @@ -70,17 +71,21 @@ function getCookie(cookie) { } function writeCookie(cookie, val, path, expiration) { - if (!val) return; + if (!val) return; + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = expiration ? expiration : date.toGMTString(); if (location.href.indexOf("/reference/") != -1) { - document.cookie = cookie_style+'_reference_'+cookie+'='+ val+'; path=' + toRoot + path + - ((expiration) ? '; expires=' + expiration : ''); + document.cookie = cookie_style+'_reference_'+cookie+'='+val+'; expires='+expiration+'; path='+'/'+path; } else if (location.href.indexOf("/guide/") != -1) { - document.cookie = cookie_style+'_guide_'+cookie+'='+val+'; path=' + toRoot + path + - ((expiration) ? '; expires=' + expiration : ''); + document.cookie = cookie_style+'_guide_'+cookie+'='+val+'; expires='+expiration+'; path='+'/'+path; } } -function prepare() { +function init() { + $("#resize-packages-nav").resizable({handles: "s", resize: function(e, ui) { resizeHeight(); } }); + $(".side-nav-resizable").resizable({handles: "e", resize: function(e, ui) { resizeWidth(); } }); + $("#side-nav").css({position:"absolute",left:0}); content = $("#doc-content"); resizePackagesNav = $("#resize-packages-nav"); @@ -88,7 +93,6 @@ function prepare() { sidenav = $("#side-nav"); devdocNav = $("#devdoc-nav"); - if (location.href.indexOf("/reference/") != -1) { var cookiePath = "reference_"; } else if (location.href.indexOf("/guide/") != -1) { @@ -107,22 +111,30 @@ function prepare() { resizeHeight(); } - if (devdocNav.length) { + if (devdocNav.length) { // only dev guide and sdk highlightNav(location.href); } } function highlightNav(fullPageName) { var lastSlashPos = fullPageName.lastIndexOf("/"); - var firstSlashPos = fullPageName.indexOf("/",8); // first slash after http:// + var firstSlashPos = (fullPageName.indexOf("/guide/") != -1) ? + fullPageName.indexOf("/guide/") : + fullPageName.indexOf("/sdk/"); // first slash after /guide or /sdk if (lastSlashPos == (fullPageName.length - 1)) { // if the url ends in slash (add 'index.html') fullPageName = fullPageName + "index.html"; } var htmlPos = fullPageName.lastIndexOf(".html", fullPageName.length); var pathPageName = fullPageName.slice(firstSlashPos, htmlPos + 5); var link = $("#devdoc-nav a[href$='"+ pathPageName+"']"); - if (link.length == 0) { // if there's no match, then the nav url must be the parent dir (ie, this doc isn't listed, so highlight the parent - link = $("#devdoc-nav a[href$='"+ pathPageName.slice(0, pathPageName.lastIndexOf("/") + 1)+"']"); + if ((link.length == 0) && (fullPageName.indexOf("/guide/") != -1)) { // if there's no match, then let's backstep through the directory until we find an index.html page that matches our ancestor directories (only for dev guide) + lastBackstep = pathPageName.lastIndexOf("/"); + while (link.length == 0) { + backstepDirectory = pathPageName.lastIndexOf("/", lastBackstep); + link = $("#devdoc-nav a[href$='"+ pathPageName.slice(0, backstepDirectory + 1)+"index.html']"); + lastBackstep = pathPageName.lastIndexOf("/", lastBackstep - 1); + if (lastBackstep == 0) break; + } } link.parent().addClass('selected'); if (link.parent().parent().is(':hidden')) { @@ -143,26 +155,22 @@ function resizeHeight() { $("#packages-nav").css({height:parseInt(resizePackagesNav.css("height")) - 6 + "px"}); //move 6px for handle devdocNav.css({height:sidenav.css("height")}); $("#nav-tree").css({height:swapperHeight + "px"}); - writeCookie("height", resizePackagesNav.css("height"), "reference/", null); + writeCookie("height", resizePackagesNav.css("height"), "", null); } function resizeWidth() { - if (location.href.indexOf("/reference/") != -1) { - var path = "reference/"; - } else if (location.href.indexOf("/guide/") != -1) { - var path = "guide/"; - } var windowWidth = $(window).width() + "px"; if (sidenav.length) { var sidenavWidth = sidenav.css("width"); } else { var sidenavWidth = 0; } - content.css({marginLeft:sidenavWidth, width:parseInt(windowWidth) - parseInt(sidenavWidth) + "px"}); + content.css({marginLeft:parseInt(sidenavWidth) + 6 + "px", //account for 6px-wide handle-bar + width:parseInt(windowWidth) - parseInt(sidenavWidth) - 6 + "px"}); resizePackagesNav.css({width:sidenavWidth}); classesNav.css({width:sidenavWidth}); $("#packages-nav").css({width:sidenavWidth}); - writeCookie("width", sidenavWidth, path, null); + writeCookie("width", sidenavWidth, "", null); } function resizeAll() { @@ -171,6 +179,10 @@ function resizeAll() { } function loadLast(cookiePath) { + var location = window.location.href; + if (location.indexOf("/"+cookiePath+"/") != -1) { + return true; + } var lastPage = getCookie(cookiePath + "_lastpage"); if (lastPage) { window.location = lastPage; @@ -179,11 +191,6 @@ function loadLast(cookiePath) { return true; } -$(document).ready(function(){ - $("#resize-packages-nav").resizable({handles: "s", resize: function(e, ui) { resizeHeight(); } }); - $(".side-nav-resizable").resizable({handles: "e", resize: function(e, ui) { resizeWidth(); } }); -}); - $(window).unload(function(){ var href = location.href; if (href.indexOf("/reference/") != -1) { @@ -195,7 +202,6 @@ $(window).unload(function(){ - function toggle(obj, slide) { var ul = $("ul", obj); var li = ul.parent(); @@ -253,7 +259,7 @@ function swapNav() { } var date = new Date(); date.setTime(date.getTime()+(10*365*24*60*60*1000)); // keep this for 10 years - writeCookie("nav", nav_pref, "reference/", date.toGMTString()); + writeCookie("nav", nav_pref, "", date.toGMTString()); $("#nav-panels").toggle(); $("#panel-link").toggle(); @@ -272,14 +278,50 @@ function scrollIntoView(nav) { if (navObj.is(':visible')) { var selected = $(".selected", navObj); if (selected.length == 0) return; + if (selected.is("div")) selected = selected.parent(); var scrolling = document.getElementById(nav); var navHeight = navObj.height(); - var offset = selected.position(); - if(offset.top > navHeight - 92) { - scrolling.scrollTop = offset.top - navHeight + 92; + var offsetTop = selected.position().top; + if (selected.parent().parent().is(".toggle-list")) offsetTop += selected.parent().parent().position().top; + if(offsetTop > navHeight - 92) { + scrolling.scrollTop = offsetTop - navHeight + 92; } } } +function toggleAllInherited(linkObj, expand) { + var a = $(linkObj); + var table = $(a.parent().parent().parent()); + var expandos = $(".jd-expando-trigger", table); + if ( (expand == null && a.text() == "[Expand]") || expand ) { + expandos.each(function(i) { + toggleInherited(this, true); + }); + a.text("[Collapse]"); + } else if ( (expand == null && a.text() == "[Collapse]") || (expand == false) ) { + expandos.each(function(i) { + toggleInherited(this, false); + }); + a.text("[Expand]"); + } + return false; +} +function toggleAllSummaryInherited(linkObj) { + var a = $(linkObj); + var content = $(a.parent().parent().parent()); + var toggles = $(".toggle-all", content); + if (a.text() == "[Expand All]") { + toggles.each(function(i) { + toggleAllInherited(this, true); + }); + a.text("[Collapse All]"); + } else { + toggles.each(function(i) { + toggleAllInherited(this, false); + }); + a.text("[Expand All]"); + } + return false; +} diff --git a/tools/droiddoc/templates/assets/carousel.js b/tools/droiddoc/templates/assets/carousel.js index dee3130..09c19f9 100644 --- a/tools/droiddoc/templates/assets/carousel.js +++ b/tools/droiddoc/templates/assets/carousel.js @@ -80,6 +80,7 @@ function buildCarousel() { var a = document.createElement("a"); var img = document.createElement("img"); var br = document.createElement("br"); + var span = document.createElement("span"); var text = document.createTextNode(droid.name); a.setAttribute("id", "droidlink-" + x); @@ -89,9 +90,10 @@ function buildCarousel() { img.setAttribute("src", assetsRoot + "images/home/" + droid.icon); img.setAttribute("alt", ""); + span.appendChild(text); a.appendChild(img); a.appendChild(br); - a.appendChild(text); + a.appendChild(span); appList.appendChild(a); } } @@ -111,7 +113,7 @@ var arrowLeft = 'arrow-left'; // the left control arrow function showPreview(slideName) { -// centerSlide(slideName); + centerSlide(slideName); if (slideName.indexOf('selected') != -1) { return false; } diff --git a/tools/droiddoc/templates/assets/images/bg_images_sprite.png b/tools/droiddoc/templates/assets/images/bg_images_sprite.png Binary files differnew file mode 100755 index 0000000..84437e7 --- /dev/null +++ b/tools/droiddoc/templates/assets/images/bg_images_sprite.png diff --git a/tools/droiddoc/templates/assets/images/bg_logo.jpg b/tools/droiddoc/templates/assets/images/bg_logo.jpg Binary files differdeleted file mode 100755 index 3a9bb7a..0000000 --- a/tools/droiddoc/templates/assets/images/bg_logo.jpg +++ /dev/null diff --git a/tools/droiddoc/templates/assets/images/bg_logo.png b/tools/droiddoc/templates/assets/images/bg_logo.png Binary files differnew file mode 100755 index 0000000..8c57fc4 --- /dev/null +++ b/tools/droiddoc/templates/assets/images/bg_logo.png diff --git a/tools/droiddoc/templates/assets/images/body-gradient-tab.png b/tools/droiddoc/templates/assets/images/body-gradient-tab.png Binary files differnew file mode 100644 index 0000000..5223ac3 --- /dev/null +++ b/tools/droiddoc/templates/assets/images/body-gradient-tab.png diff --git a/tools/droiddoc/templates/assets/images/community-pic.psd b/tools/droiddoc/templates/assets/images/community-pic.psd Binary files differdeleted file mode 100755 index 3d8c22f..0000000 --- a/tools/droiddoc/templates/assets/images/community-pic.psd +++ /dev/null diff --git a/tools/droiddoc/templates/assets/images/home/IO-logo.png b/tools/droiddoc/templates/assets/images/home/IO-logo.png Binary files differnew file mode 100644 index 0000000..65334c8 --- /dev/null +++ b/tools/droiddoc/templates/assets/images/home/IO-logo.png diff --git a/tools/droiddoc/templates/assets/images/home/bg_home_middle.png b/tools/droiddoc/templates/assets/images/home/bg_home_middle.png Binary files differindex dca13ba..4221e96 100644 --- a/tools/droiddoc/templates/assets/images/home/bg_home_middle.png +++ b/tools/droiddoc/templates/assets/images/home/bg_home_middle.png diff --git a/tools/droiddoc/templates/assets/images/home/carousel_buttons_sprite.png b/tools/droiddoc/templates/assets/images/home/carousel_buttons_sprite.png Binary files differnew file mode 100755 index 0000000..e98c942 --- /dev/null +++ b/tools/droiddoc/templates/assets/images/home/carousel_buttons_sprite.png diff --git a/tools/droiddoc/templates/assets/images/home/devphone-large.png b/tools/droiddoc/templates/assets/images/home/devphone-large.png Binary files differnew file mode 100755 index 0000000..cbf94c8 --- /dev/null +++ b/tools/droiddoc/templates/assets/images/home/devphone-large.png diff --git a/tools/droiddoc/templates/assets/images/home/devphone-small.png b/tools/droiddoc/templates/assets/images/home/devphone-small.png Binary files differnew file mode 100755 index 0000000..b8487f5 --- /dev/null +++ b/tools/droiddoc/templates/assets/images/home/devphone-small.png diff --git a/tools/droiddoc/templates/assets/images/home/market-large.png b/tools/droiddoc/templates/assets/images/home/market-large.png Binary files differindex 55ab924..069fee7 100644 --- a/tools/droiddoc/templates/assets/images/home/market-large.png +++ b/tools/droiddoc/templates/assets/images/home/market-large.png diff --git a/tools/droiddoc/templates/assets/images/home/sdk-large.png b/tools/droiddoc/templates/assets/images/home/sdk-large.png Binary files differindex ed0b8b2..315a1bf 100644 --- a/tools/droiddoc/templates/assets/images/home/sdk-large.png +++ b/tools/droiddoc/templates/assets/images/home/sdk-large.png diff --git a/tools/droiddoc/templates/assets/images/home/sdk-small.png b/tools/droiddoc/templates/assets/images/home/sdk-small.png Binary files differindex f90fdda..0f1670d 100644 --- a/tools/droiddoc/templates/assets/images/home/sdk-small.png +++ b/tools/droiddoc/templates/assets/images/home/sdk-small.png diff --git a/tools/droiddoc/templates/assets/images/sidenav-rule.png b/tools/droiddoc/templates/assets/images/sidenav-rule.png Binary files differnew file mode 100644 index 0000000..eab9920 --- /dev/null +++ b/tools/droiddoc/templates/assets/images/sidenav-rule.png diff --git a/tools/droiddoc/templates/assets/images/tab_default.jpg b/tools/droiddoc/templates/assets/images/tab_default.jpg Binary files differdeleted file mode 100755 index 0b4ecd4..0000000 --- a/tools/droiddoc/templates/assets/images/tab_default.jpg +++ /dev/null diff --git a/tools/droiddoc/templates/assets/images/tab_default.png b/tools/droiddoc/templates/assets/images/tab_default.png Binary files differdeleted file mode 100755 index de6ce05..0000000 --- a/tools/droiddoc/templates/assets/images/tab_default.png +++ /dev/null diff --git a/tools/droiddoc/templates/assets/images/tab_hover.jpg b/tools/droiddoc/templates/assets/images/tab_hover.jpg Binary files differdeleted file mode 100755 index 5b745e3..0000000 --- a/tools/droiddoc/templates/assets/images/tab_hover.jpg +++ /dev/null diff --git a/tools/droiddoc/templates/assets/images/tab_hover.png b/tools/droiddoc/templates/assets/images/tab_hover.png Binary files differdeleted file mode 100755 index ee1d2bd..0000000 --- a/tools/droiddoc/templates/assets/images/tab_hover.png +++ /dev/null diff --git a/tools/droiddoc/templates/assets/images/tab_selected.jpg b/tools/droiddoc/templates/assets/images/tab_selected.jpg Binary files differdeleted file mode 100755 index 0d7c810..0000000 --- a/tools/droiddoc/templates/assets/images/tab_selected.jpg +++ /dev/null diff --git a/tools/droiddoc/templates/assets/images/tab_selected.png b/tools/droiddoc/templates/assets/images/tab_selected.png Binary files differdeleted file mode 100755 index f259fda..0000000 --- a/tools/droiddoc/templates/assets/images/tab_selected.png +++ /dev/null diff --git a/tools/droiddoc/templates/assets/images/tabs.png b/tools/droiddoc/templates/assets/images/tabs.png Binary files differdeleted file mode 100755 index 437c97c..0000000 --- a/tools/droiddoc/templates/assets/images/tabs.png +++ /dev/null diff --git a/tools/droiddoc/templates/assets/images/triangle-closed-small.png b/tools/droiddoc/templates/assets/images/triangle-closed-small.png Binary files differindex dc75915..002364a 100644 --- a/tools/droiddoc/templates/assets/images/triangle-closed-small.png +++ b/tools/droiddoc/templates/assets/images/triangle-closed-small.png diff --git a/tools/droiddoc/templates/assets/images/triangle-opened-small.png b/tools/droiddoc/templates/assets/images/triangle-opened-small.png Binary files differindex 184031d..e1eb784 100644 --- a/tools/droiddoc/templates/assets/images/triangle-opened-small.png +++ b/tools/droiddoc/templates/assets/images/triangle-opened-small.png diff --git a/tools/droiddoc/templates/assets/images/video-droid.png b/tools/droiddoc/templates/assets/images/video-droid.png Binary files differnew file mode 100644 index 0000000..25163b6 --- /dev/null +++ b/tools/droiddoc/templates/assets/images/video-droid.png diff --git a/tools/droiddoc/templates/assets/search_autocomplete.js b/tools/droiddoc/templates/assets/search_autocomplete.js index 392aa46..c9b6ff6 100644 --- a/tools/droiddoc/templates/assets/search_autocomplete.js +++ b/tools/droiddoc/templates/assets/search_autocomplete.js @@ -70,7 +70,7 @@ function sync_selection_table(toroot) //if we have results, make the table visible and initialize result info if (gMatches.length > 0) { - filtered.className = "showing"; + document.getElementById("search_filtered_div").className = "showing"; var N = gMatches.length < ROW_COUNT ? gMatches.length : ROW_COUNT; for (i=0; i<N; i++) { r = filtered.rows[i]; @@ -97,7 +97,7 @@ function sync_selection_table(toroot) }*/ //if we have no results, hide the table } else { - filtered.className = "no-display"; + document.getElementById("search_filtered_div").className = "no-display"; } } @@ -160,6 +160,12 @@ function search_focus_changed(obj, focused) obj.value = DEFAULT_TEXT; obj.style.color="#aaaaaa"; } - document.getElementById("search_filtered").className = "no-display"; + document.getElementById("search_filtered_div").className = "no-display"; } } + +function submit_search() { + var query = document.getElementById('search_autocomplete').value; + document.location = '/search.html#q=' + query; + return false; +} diff --git a/tools/droiddoc/templates/class.cs b/tools/droiddoc/templates/class.cs index 005ed6a..0fccd37 100644 --- a/tools/droiddoc/templates/class.cs +++ b/tools/droiddoc/templates/class.cs @@ -1,21 +1,29 @@ +<?cs include:"doctype.cs" ?> <?cs include:"macros.cs" ?> <html> <?cs include:"head_tag.cs" ?> <body> <script type="text/javascript"> -function toggle_inherited(base) { +function toggleInherited(linkObj, expand) { + var base = linkObj.getAttribute("id"); var list = document.getElementById(base + "-list"); var summary = document.getElementById(base + "-summary"); var trigger = document.getElementById(base + "-trigger"); - if (list.style.display == "none") { - list.style.display = "block"; - summary.style.display = "none"; - trigger.src = "<?cs var:toroot ?>assets/images/triangle-closed.png"; - } else { + var a = $(linkObj); + if ( (expand == null && a.hasClass("closed")) || expand ) { list.style.display = "none"; summary.style.display = "block"; trigger.src = "<?cs var:toroot ?>assets/images/triangle-opened.png"; + a.removeClass("closed"); + a.addClass("opened"); + } else if ( (expand == null && a.hasClass("opened")) || (expand == false) ) { + list.style.display = "block"; + summary.style.display = "none"; + trigger.src = "<?cs var:toroot ?>assets/images/triangle-closed.png"; + a.removeClass("opened"); + a.addClass("closed"); } + return false; } </script> @@ -96,7 +104,7 @@ Summary: <?cs /if ?> </nobr> <?cs if:inhattrs || inhconstants || inhfields || inhmethods || subcount(class.subclasses.direct) || subcount(class.subclasses.indirect) ?> -| [<a href="">Expand All</a>] +| <a href="#" onclick="return toggleAllSummaryInherited(this)">[Expand All]</a> <?cs /if ?> </div> </div> @@ -288,7 +296,7 @@ Summary: <?cs # if there are inherited attrs, write the table ?> <?cs if:inhattrs ?> <table id="inhattrs" class="jd-sumtable"><tr><th> - <div class="expandall">[<a href="">Expand All</a>]</div> + <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> <div style="clear:left;">Inherited XML Attributes</div></th></tr> <?cs each:cl=class.inherited ?> <?cs if:subcount(cl.attrs) ?> @@ -336,7 +344,7 @@ Summary: <?cs # if there are inherited constants, write the table ?> <?cs if:inhconstants ?> <table id="inhconstants" class="jd-sumtable"><tr><th> - <div class="expandall">[<a href="">Expand All</a>]</div> + <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> <div style="clear:left;">Inherited Constants</div></th></tr> <?cs each:cl=class.inherited ?> <?cs if:subcount(cl.constants) ?> @@ -369,7 +377,7 @@ Summary: <?cs # if there are inherited fields, write the table ?> <?cs if:inhfields ?> <table id="inhfields" class="jd-sumtable"><tr><th> - <div class="expandall">[<a href="">Expand All</a>]</div> + <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> <div style="clear:left;">Inherited Fields</div></th></tr> <?cs each:cl=class.inherited ?> <?cs if:subcount(cl.fields) ?> @@ -426,7 +434,7 @@ Summary: <?cs # if there are inherited methods, write the table ?> <?cs if:inhmethods ?> <table id="inhmethods" class="jd-sumtable"><tr><th> - <div class="expandall">[<a href="">Expand All</a>]</div> + <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> <div style="clear:left;">Inherited Methods</div></th></tr> <?cs each:cl=class.inherited ?> <?cs if:subcount(cl.methods) ?> @@ -586,6 +594,8 @@ From <?cs var:cl.kind ?> <a href="<?cs var:toroot ?><?cs var:cl.link ?>"><?cs va </div> <!-- jd-content --> </div><!-- end doc-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html> diff --git a/tools/droiddoc/templates/classes.cs b/tools/droiddoc/templates/classes.cs index f8494e5..abe8e4e 100644 --- a/tools/droiddoc/templates/classes.cs +++ b/tools/droiddoc/templates/classes.cs @@ -1,3 +1,4 @@ +<?cs include:"doctype.cs" ?> <?cs include:"macros.cs" ?> <html> <?cs include:"head_tag.cs" ?> @@ -33,6 +34,8 @@ <?cs include:"footer.cs" ?> </div><!-- end jd-content --> </div><!-- end doc-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html>
\ No newline at end of file diff --git a/tools/droiddoc/templates/customization.cs b/tools/droiddoc/templates/customization.cs index c5420bb..800c9c1 100644 --- a/tools/droiddoc/templates/customization.cs +++ b/tools/droiddoc/templates/customization.cs @@ -17,6 +17,8 @@ <?cs # appears on the left side of the blue bar at the bottom of every page ?> <?cs def:custom_copyright() ?><?cs /def ?> +<?cs def:custom_cc_copyright() ?><?cs /def ?> +<?cs def:custom_footerlinks() ?><?cs /def ?> <?cs # appears on the right side of the blue bar at the bottom of every page ?> <?cs def:custom_buildinfo() ?>Build <?cs var:page.build ?> - <?cs var:page.now ?><?cs /def ?> diff --git a/tools/droiddoc/templates/docpage.cs b/tools/droiddoc/templates/docpage.cs index bd4d551..06b3f35 100644 --- a/tools/droiddoc/templates/docpage.cs +++ b/tools/droiddoc/templates/docpage.cs @@ -1,3 +1,4 @@ +<?cs include:"doctype.cs" ?> <?cs include:"macros.cs" ?> <html> <?cs include:"head_tag.cs" ?> @@ -31,8 +32,9 @@ <?cs include:"footer.cs" ?> </div><!-- end doc-content --> -</div><!-- end body-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html> diff --git a/tools/droiddoc/templates/doctype.cs b/tools/droiddoc/templates/doctype.cs new file mode 100644 index 0000000..643f992 --- /dev/null +++ b/tools/droiddoc/templates/doctype.cs @@ -0,0 +1 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
\ No newline at end of file diff --git a/tools/droiddoc/templates/footer.cs b/tools/droiddoc/templates/footer.cs index 9462cd0..86b13ea 100644 --- a/tools/droiddoc/templates/footer.cs +++ b/tools/droiddoc/templates/footer.cs @@ -1,12 +1,19 @@ - <div id="footer"> -<div id="copyright"> -<?cs call:custom_copyright() ?> -</div> -<div id="build-info"> -<?cs call:custom_buildinfo() ?> -</div> - -</div> +<?cs if:reference||guide ?> + <div id="copyright"> + <?cs call:custom_copyright() ?> + </div> + <div id="build_info"> + <?cs call:custom_buildinfo() ?> + </div> +<?cs else ?> + <div id="copyright"> + <?cs call:custom_cc_copyright() ?> + </div> +<?cs /if ?> + <div id="footerlinks"> + <?cs call:custom_footerlinks() ?> + </div> +</div> <!-- end footer -->
\ No newline at end of file diff --git a/tools/droiddoc/templates/head_tag.cs b/tools/droiddoc/templates/head_tag.cs index acca358..bfd0eae5 100644 --- a/tools/droiddoc/templates/head_tag.cs +++ b/tools/droiddoc/templates/head_tag.cs @@ -1,5 +1,6 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link rel="shortcut icon" type="image/x-icon" href="<?cs var:toroot ?>favicon.ico" /> <title><?cs var:page.title ?> | <?cs if:guide ?>Guide | <?cs elif:reference ?>Reference | <?cs @@ -7,7 +8,7 @@ elif:sample ?>Samples | <?cs /if ?>Android Developers</title> -<?cs if:guide ?> +<?cs if:guide||sdk ?> <link href="<?cs var:toroot ?>assets/android-developer-docs-devguide.css" rel="stylesheet" type="text/css" /> <?cs else ?> <link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" /> diff --git a/tools/droiddoc/templates/hierarchy.cs b/tools/droiddoc/templates/hierarchy.cs index 3529e02..a607ffd 100644 --- a/tools/droiddoc/templates/hierarchy.cs +++ b/tools/droiddoc/templates/hierarchy.cs @@ -60,7 +60,9 @@ <?cs include:"footer.cs" ?> </div><!-- end jd-content --> </div><!-- end doc-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html> diff --git a/tools/droiddoc/templates/keywords.cs b/tools/droiddoc/templates/keywords.cs index 794da39..0c8d4e3 100644 --- a/tools/droiddoc/templates/keywords.cs +++ b/tools/droiddoc/templates/keywords.cs @@ -30,6 +30,8 @@ <?cs include:"footer.cs" ?> </div><!-- end jd-content --> </div><!-- end doc-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html> diff --git a/tools/droiddoc/templates/macros.cs b/tools/droiddoc/templates/macros.cs index 8f5fa8e..ecbec2f 100644 --- a/tools/droiddoc/templates/macros.cs +++ b/tools/droiddoc/templates/macros.cs @@ -223,10 +223,10 @@ This <?cs var:kind ?> is deprecated. <?cs # An expando trigger ?> <?cs def:expando_trigger(id, default) ?> -<a href="javascript:toggle_inherited('<?cs var:id ?>')" class="jd-expando-trigger" +<a href="#" onclick="return toggleInherited(this, null)" id="<?cs var:id ?>" class="jd-expando-trigger closed" ><img id="<?cs var:id ?>-trigger" src="<?cs var:toroot ?>assets/images/triangle-<?cs var:default ?>.png" - class="jd-expando-trigger" /></a> + class="jd-expando-trigger-img" /></a> <?cs /def ?> <?cs # An expandable list of classes ?> @@ -318,28 +318,27 @@ This <?cs var:kind ?> is deprecated. <?cs /def ?> <?cs def:default_search_box() ?> -<div id="search" align="right"> +<div id="search" > <div id="searchForm"> - <form accept-charset="utf-8" class="gsc-search-box" - onsubmit="document.location='<?cs var:toroot ?>search.html?' + document.getElementById('search_autocomplete').value; return false;"> + <form accept-charset="utf-8" class="gsc-search-box" + onsubmit="return submit_search()"> <table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody> <tr> <td class="gsc-input"> <input id="search_autocomplete" class="gsc-input" type="text" size="33" autocomplete="off" - tabindex="1" title="search developer docs" + title="search developer docs" name="q" value="search developer docs" onFocus="search_focus_changed(this, true)" onBlur="search_focus_changed(this, false)" onkeydown="return search_changed(event, true, '<?cs var:toroot?>')" - onkeyup="search_changed(event, false, '<?cs var:toroot?>')" /> - <br/> - <div id="search_filtered_div"> - <table id="search_filtered" class="no-display" cellspacing=0> + onkeyup="return search_changed(event, false, '<?cs var:toroot?>')" /> + <div id="search_filtered_div" class="no-display"> + <table id="search_filtered" cellspacing=0> </table> </div> </td> <td class="gsc-search-button"> - <input type="button" value="Search" title="search" id="search-button" class="gsc-search-button" onclick="document.location='<?cs var:toroot ?>search.html?' + document.getElementById('search_autocomplete').value;" tabindex="2"/> + <input type="submit" value="Search" title="search" id="search-button" class="gsc-search-button" /> </td> <td class="gsc-clear-button"> <div title="clear results" class="gsc-clear-button"> </div> diff --git a/tools/droiddoc/templates/nosidenavpage.cs b/tools/droiddoc/templates/nosidenavpage.cs index 1b99d54..41c30e9 100644 --- a/tools/droiddoc/templates/nosidenavpage.cs +++ b/tools/droiddoc/templates/nosidenavpage.cs @@ -1,3 +1,4 @@ +<?cs include:"doctype.cs" ?> <?cs include:"macros.cs" ?> <html> <?cs include:"head_tag.cs" ?> @@ -12,8 +13,9 @@ <?cs include:"footer.cs" ?> </div><!-- end doc-content --> -</div><!-- end body-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html> diff --git a/tools/droiddoc/templates/package-descr.cs b/tools/droiddoc/templates/package-descr.cs index c1d3748..385ce23 100644 --- a/tools/droiddoc/templates/package-descr.cs +++ b/tools/droiddoc/templates/package-descr.cs @@ -1,3 +1,4 @@ +<?cs include:"doctype.cs" ?> <?cs include:"macros.cs" ?> <html> <?cs include:"head_tag.cs" ?> @@ -24,6 +25,8 @@ <?cs include:"footer.cs" ?> </div><!-- end jd-content --> </div> <!-- end doc-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html> diff --git a/tools/droiddoc/templates/package.cs b/tools/droiddoc/templates/package.cs index becf482..7d1936d 100644 --- a/tools/droiddoc/templates/package.cs +++ b/tools/droiddoc/templates/package.cs @@ -1,3 +1,4 @@ +<?cs include:"doctype.cs" ?> <?cs include:"macros.cs" ?> <html> <?cs include:"head_tag.cs" ?> @@ -44,6 +45,8 @@ <?cs include:"footer.cs" ?> </div><!-- end jd-content --> </div><!-- doc-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html> diff --git a/tools/droiddoc/templates/packages.cs b/tools/droiddoc/templates/packages.cs index 3ef85b8..a358dca 100644 --- a/tools/droiddoc/templates/packages.cs +++ b/tools/droiddoc/templates/packages.cs @@ -1,3 +1,4 @@ +<?cs include:"doctype.cs" ?> <?cs include:"macros.cs" ?> <html> <?cs include:"head_tag.cs" ?> @@ -30,6 +31,8 @@ <?cs include:"footer.cs" ?> </div><!-- end jd-content --> </div> <!-- end doc-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html> diff --git a/tools/droiddoc/templates/sample.cs b/tools/droiddoc/templates/sample.cs index de0a0b0..27b0430 100644 --- a/tools/droiddoc/templates/sample.cs +++ b/tools/droiddoc/templates/sample.cs @@ -1,3 +1,4 @@ +<?cs include:"doctype.cs" ?> <?cs include:"macros.cs" ?> <?cs set:guide="true" ?> <html> @@ -22,6 +23,8 @@ <?cs include:"footer.cs" ?> </div><!-- end jd-content --> </div> <!-- end doc-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html> diff --git a/tools/droiddoc/templates/sampleindex.cs b/tools/droiddoc/templates/sampleindex.cs index 0fdb5d8..173ae70 100644 --- a/tools/droiddoc/templates/sampleindex.cs +++ b/tools/droiddoc/templates/sampleindex.cs @@ -1,3 +1,4 @@ +<?cs include:"doctype.cs" ?> <?cs include:"macros.cs" ?> <?cs set:guide="true" ?> <html> @@ -36,6 +37,8 @@ <?cs include:"footer.cs" ?> </div><!-- end jd-content --> </div><!-- end doc-content --> -<?cs include:"analytics.cs" ?> + +<?cs include:"trailer.cs" ?> + </body> </html> diff --git a/tools/droiddoc/templates/analytics.cs b/tools/droiddoc/templates/trailer.cs index 44df1db..155ba58 100644 --- a/tools/droiddoc/templates/analytics.cs +++ b/tools/droiddoc/templates/trailer.cs @@ -1,4 +1,7 @@ +</div> <!-- end body-content --> <?cs # normally opened by header.cs ?> + <script type="text/javascript"> +init(); /* initialize android-developer-docs.js */ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> |