Merge "Revert "docs: gms javadocs"" into jb-mr1-dev
@@ -1,278 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
@@ -1,20 +0,0 @@
|
||||
Copyright (c) 2011 John Resig, http://jquery.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,200 +0,0 @@
|
||||
|
||||
/* =============================================================================
|
||||
Columns
|
||||
========================================================================== */
|
||||
/* Applied to body to debug layout alignments
|
||||
.grid {
|
||||
width:100%;
|
||||
height:100%;
|
||||
background:url(../images/grid.png) center repeat-y;
|
||||
top:0px;
|
||||
margin:auto;
|
||||
position:absolute;
|
||||
}
|
||||
*/
|
||||
|
||||
@media screen, projection, print {
|
||||
.full {
|
||||
padding: 2.5em 0;
|
||||
border-top: solid 1px #ddd;
|
||||
border-bottom: solid 1px #ddd;
|
||||
background: #f7f7f7;
|
||||
}
|
||||
.wrap {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
min-width:600px;
|
||||
clear: both;
|
||||
}
|
||||
.cols {
|
||||
height: 1%;
|
||||
margin: 0 -1.533742331288343558282%;
|
||||
width: 103.06748466257669%}
|
||||
*+html .cols {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.cols:after {
|
||||
clear: both;
|
||||
content: ' ';
|
||||
display: block;
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
|
||||
.col-13, .col-14, .col-15, .col-16 {
|
||||
float: left;
|
||||
margin: 0 1.063829787234% 20px 1.063829787234%;
|
||||
}
|
||||
* html .col-1, * html .col-2, * html .col-3, * html .col-4, * html .col-5, * html .col-6, * html
|
||||
.col-7, * html .col-8, * html .col-9, * html .col-10, * html .col-11, * html .col-12, * html
|
||||
.col-13, * html .col-14, * html .col-15, * html .col-16 {
|
||||
margin: 0;
|
||||
margin: 0 1.063829787234% 20px 1.063829787234%;
|
||||
}
|
||||
[dir='rtl'] .col-1, [dir='rtl'] .col-2, [dir='rtl'] .col-3, [dir='rtl'] .col-4, [dir='rtl'] .col-5,
|
||||
[dir='rtl'] .col-6, [dir='rtl'] .col-7, [dir='rtl'] .col-8, [dir='rtl'] .col-9, [dir='rtl'] .col-10,
|
||||
[dir='rtl'] .col-11, [dir='rtl'] .col-12 {
|
||||
float: right;
|
||||
}
|
||||
.col-1 {
|
||||
width: 4.16666666666667%;
|
||||
}
|
||||
.col-2 {
|
||||
width: 10.4166666666667%;
|
||||
}
|
||||
.col-3 {
|
||||
width: 16.6666666666667%;
|
||||
}
|
||||
.col-4 {
|
||||
width: 22.9166666666667%;
|
||||
}
|
||||
.col-5 {
|
||||
width: 29.1666666666667%;
|
||||
}
|
||||
.col-6 {
|
||||
width: 35.4166666666667%;
|
||||
}
|
||||
.col-7 {
|
||||
width: 41.6666666666667%;
|
||||
}
|
||||
.col-8 {
|
||||
width: 47.9166666666667%;
|
||||
}
|
||||
.col-9 {
|
||||
width: 55.3333333333333%;
|
||||
}
|
||||
.col-10 {
|
||||
width: 60.4166666666667%;
|
||||
}
|
||||
.col-11 {
|
||||
width: 66.6666666666667%;
|
||||
}
|
||||
.col-12 {
|
||||
width: 72.9166666666667%;
|
||||
}
|
||||
.col-13 {
|
||||
width: 79.1666666666667%;
|
||||
}
|
||||
.col-14 {
|
||||
width: 85.4166666666667%;
|
||||
}
|
||||
.col-15 {
|
||||
width: 91.6666666666667%;
|
||||
}
|
||||
.col-16 {
|
||||
width: 97.9166666666667%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#header .col-1,
|
||||
#nav-x .col-1 { width: 40px }
|
||||
#header .col-2,
|
||||
#nav-x .col-2 { width: 100px }
|
||||
#header .col-3,
|
||||
#nav-x .col-3 { width: 160px }
|
||||
#header .col-4,
|
||||
#nav-x .col-4 { width: 220px }
|
||||
#header .col-5,
|
||||
#nav-x .col-5 { width: 280px }
|
||||
#header .col-6,
|
||||
#nav-x .col-6 { width: 340px }
|
||||
#header .col-7,
|
||||
#nav-x .col-7 { width: 400px }
|
||||
#header .col-8,
|
||||
#nav-x .col-8 { width: 460px }
|
||||
#header .col-9,
|
||||
#nav-x .col-9 { width: 520px }
|
||||
#header .col-10,
|
||||
#nav-x .col-10 { width: 580px }
|
||||
#header .col-11,
|
||||
#nav-x .col-11 { width: 640px }
|
||||
#header .col-12,
|
||||
#nav-x .col-12 { width: 700px }
|
||||
#header .col-13,
|
||||
#nav-x .col-13 { width: 760px }
|
||||
#header .col-14,
|
||||
#nav-x .col-14 { width: 820px }
|
||||
#header .col-15,
|
||||
#nav-x .col-15 { width: 880px }
|
||||
#header .col-16,
|
||||
#nav-x .col-16 { width: 940px }
|
||||
|
||||
|
||||
|
||||
body {
|
||||
padding:0 20px;
|
||||
}
|
||||
#header,
|
||||
#searchResults,
|
||||
#nav-x {
|
||||
margin:0;
|
||||
}
|
||||
#body-content {
|
||||
margin:0;
|
||||
}
|
||||
#body-content > .col-12 {
|
||||
width:77.9804965%;
|
||||
margin:0 0 0 0.97%; /* this percentage chosen to make IE9 happy */
|
||||
}
|
||||
#side-nav {
|
||||
width: 19.9804965%;
|
||||
margin:0 1.063829787234% 0 0;
|
||||
}
|
||||
|
||||
#header .wrap {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#nav-x .wrap,
|
||||
#searchResults.wrap {
|
||||
max-width:100%;
|
||||
}
|
||||
|
||||
.nav-x {
|
||||
margin:-2px 0 0 0;
|
||||
}
|
||||
|
||||
#devdoc-nav.fixed,
|
||||
#devdoc-nav.fixed a.totop {
|
||||
left:20px; /* !important ... for IE i think */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.col-right {
|
||||
margin-right:0px;
|
||||
}
|
||||
|
||||
@media screen and (max-width:772px) {
|
||||
.col-5, .col-6, .col-7 {
|
||||
clear: both;
|
||||
width: 97.0238096%}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#header {
|
||||
border-bottom: 3px solid #b6223c;
|
||||
}
|
||||
|
||||
#search_filtered .jd-selected {
|
||||
background-color:#b6223c;
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
$(document).ready(function() {
|
||||
// prep nav expandos
|
||||
var pagePath = document.location.pathname;
|
||||
if (pagePath.indexOf(SITE_ROOT) == 0) {
|
||||
pagePath = pagePath.substr(SITE_ROOT.length);
|
||||
if (pagePath == '' || pagePath.charAt(pagePath.length - 1) == '/') {
|
||||
pagePath += 'index.html';
|
||||
}
|
||||
}
|
||||
|
||||
if (SITE_ROOT.match(/\.\.\//) || SITE_ROOT == '') {
|
||||
// If running locally, SITE_ROOT will be a relative path, so account for that by
|
||||
// finding the relative URL to this page. This will allow us to find links on the page
|
||||
// leading back to this page.
|
||||
var pathParts = pagePath.split('/');
|
||||
var relativePagePathParts = [];
|
||||
var upDirs = (SITE_ROOT.match(/(\.\.\/)+/) || [''])[0].length / 3;
|
||||
for (var i = 0; i < upDirs; i++) {
|
||||
relativePagePathParts.push('..');
|
||||
}
|
||||
for (var i = 0; i < upDirs; i++) {
|
||||
relativePagePathParts.push(pathParts[pathParts.length - (upDirs - i) - 1]);
|
||||
}
|
||||
relativePagePathParts.push(pathParts[pathParts.length - 1]);
|
||||
pagePath = relativePagePathParts.join('/');
|
||||
} else {
|
||||
// Otherwise the page path should be an absolute URL.
|
||||
pagePath = SITE_ROOT + pagePath;
|
||||
}
|
||||
|
||||
// select current page in sidenav and set up prev/next links if they exist
|
||||
var $selNavLink = $('.nav-y').find('a[href="' + pagePath + '"]');
|
||||
if ($selNavLink.length) {
|
||||
$selListItem = $selNavLink.closest('li');
|
||||
|
||||
$selListItem.addClass('selected');
|
||||
$selListItem.closest('li>ul').addClass('expanded');
|
||||
|
||||
// set up prev links
|
||||
var $prevLink = [];
|
||||
var $prevListItem = $selListItem.prev('li');
|
||||
if ($prevListItem.length) {
|
||||
if ($prevListItem.hasClass('nav-section')) {
|
||||
// jump to last topic of previous section
|
||||
$prevLink = $prevListItem.find('a:last');
|
||||
} else {
|
||||
// jump to previous topic in this section
|
||||
$prevLink = $prevListItem.find('a:eq(0)');
|
||||
}
|
||||
} else {
|
||||
// jump to this section's index page (if it exists)
|
||||
$prevLink = $selListItem.parents('li').find('a');
|
||||
}
|
||||
|
||||
if ($prevLink.length) {
|
||||
var prevHref = $prevLink.attr('href');
|
||||
if (prevHref == SITE_ROOT + 'index.html') {
|
||||
// Don't show Previous when it leads to the homepage
|
||||
$('.prev-page-link').hide();
|
||||
} else {
|
||||
$('.prev-page-link').attr('href', prevHref).show();
|
||||
}
|
||||
} else {
|
||||
$('.prev-page-link').hide();
|
||||
}
|
||||
|
||||
// set up next links
|
||||
var $nextLink = [];
|
||||
if ($selListItem.hasClass('nav-section')) {
|
||||
// we're on an index page, jump to the first topic
|
||||
$nextLink = $selListItem.find('ul').find('a:eq(0)')
|
||||
} else {
|
||||
// jump to the next topic in this section (if it exists)
|
||||
$nextLink = $selListItem.next('li').find('a:eq(0)');
|
||||
if (!$nextLink.length) {
|
||||
// no more topics in this section, jump to the first topic in the next section
|
||||
$nextLink = $selListItem.parents('li').next('li.nav-section').find('a:eq(0)');
|
||||
}
|
||||
}
|
||||
if ($nextLink.length) {
|
||||
$('.next-page-link').attr('href', $nextLink.attr('href')).show();
|
||||
} else {
|
||||
$('.next-page-link').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// Set up expand/collapse behavior
|
||||
$('.nav-y li').has('ul').click(function() {
|
||||
if ($(this).hasClass('expanded')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// hide other
|
||||
var $old = $('.nav-y li.expanded');
|
||||
if ($old.length) {
|
||||
var $oldUl = $old.children('ul');
|
||||
$oldUl.css('height', $oldUl.height() + 'px');
|
||||
window.setTimeout(function() {
|
||||
$oldUl
|
||||
.addClass('animate-height')
|
||||
.css('height', '');
|
||||
}, 0);
|
||||
$old.removeClass('expanded');
|
||||
}
|
||||
|
||||
// show me
|
||||
$(this).addClass('expanded');
|
||||
var $ul = $(this).children('ul');
|
||||
var expandedHeight = $ul.height();
|
||||
$ul
|
||||
.removeClass('animate-height')
|
||||
.css('height', 0);
|
||||
window.setTimeout(function() {
|
||||
$ul
|
||||
.addClass('animate-height')
|
||||
.css('height', expandedHeight + 'px');
|
||||
}, 0);
|
||||
});
|
||||
|
||||
// Stop expand/collapse behavior when clicking on nav section links (since we're navigating away
|
||||
// from the page)
|
||||
$('.nav-y li').has('ul').find('a:eq(0)').click(function(evt) {
|
||||
window.location.href = $(this).attr('href');
|
||||
return false;
|
||||
});
|
||||
|
||||
// Set up play-on-hover <video> tags.
|
||||
$('video.play-on-hover').bind('click', function(){
|
||||
$(this).get(0).load(); // in case the video isn't seekable
|
||||
$(this).get(0).play();
|
||||
});
|
||||
|
||||
// Set up tooltips
|
||||
var TOOLTIP_MARGIN = 10;
|
||||
$('acronym').each(function() {
|
||||
var $target = $(this);
|
||||
var $tooltip = $('<div>')
|
||||
.addClass('tooltip-box')
|
||||
.text($target.attr('title'))
|
||||
.hide()
|
||||
.appendTo('body');
|
||||
$target.removeAttr('title');
|
||||
|
||||
$target.hover(function() {
|
||||
// in
|
||||
var targetRect = $target.offset();
|
||||
targetRect.width = $target.width();
|
||||
targetRect.height = $target.height();
|
||||
|
||||
$tooltip.css({
|
||||
left: targetRect.left,
|
||||
top: targetRect.top + targetRect.height + TOOLTIP_MARGIN
|
||||
});
|
||||
$tooltip.addClass('below');
|
||||
$tooltip.show();
|
||||
}, function() {
|
||||
// out
|
||||
$tooltip.hide();
|
||||
});
|
||||
});
|
||||
|
||||
// Set up <h2> deeplinks
|
||||
$('h2').click(function() {
|
||||
var id = $(this).attr('id');
|
||||
if (id) {
|
||||
document.location.hash = id;
|
||||
}
|
||||
});
|
||||
|
||||
// Set up fixed navbar
|
||||
var navBarIsFixed = false;
|
||||
$(window).scroll(function() {
|
||||
var scrollTop = $(window).scrollTop();
|
||||
var navBarShouldBeFixed = (scrollTop > (100 - 40));
|
||||
if (navBarIsFixed != navBarShouldBeFixed) {
|
||||
if (navBarShouldBeFixed) {
|
||||
$('#nav')
|
||||
.addClass('fixed')
|
||||
.prependTo('#page-container');
|
||||
} else {
|
||||
$('#nav')
|
||||
.removeClass('fixed')
|
||||
.prependTo('#nav-container');
|
||||
}
|
||||
navBarIsFixed = navBarShouldBeFixed;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -1,690 +0,0 @@
|
||||
/* file: doclava-developer-core.css
|
||||
info: core developer styles
|
||||
*/
|
||||
|
||||
/* RESET STYLES */
|
||||
|
||||
html,body,div,h1,h2,h3,h4,h5,h6,p,img,
|
||||
dl,dt,dd,ol,ul,li,table,caption,tbody,
|
||||
tfoot,thead,tr,th,td,form,fieldset,
|
||||
embed,object,applet {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* 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;
|
||||
background-image:url(images/bg_fade.jpg);
|
||||
background-repeat:repeat-x;
|
||||
}
|
||||
|
||||
a, a code {
|
||||
color:#006699;
|
||||
}
|
||||
|
||||
a:active,
|
||||
a:active code {
|
||||
color:#f00;
|
||||
}
|
||||
|
||||
a:visited,
|
||||
a:visited code {
|
||||
color:#006699;
|
||||
}
|
||||
|
||||
input, select,
|
||||
textarea, option, label {
|
||||
font-family:inherit;
|
||||
font-size:inherit;
|
||||
padding:0;
|
||||
margin:0;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
option {
|
||||
padding:0 4px;
|
||||
}
|
||||
|
||||
p {
|
||||
padding:0;
|
||||
margin:0 0 1em;
|
||||
}
|
||||
|
||||
code, pre {
|
||||
color:#007000;
|
||||
font-family:monospace;
|
||||
line-height:1em;
|
||||
}
|
||||
|
||||
var {
|
||||
color:#007000;
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
pre {
|
||||
border:1px solid #ccc;
|
||||
background-color:#fafafa;
|
||||
padding:10px;
|
||||
margin:0 0 1em 1em;
|
||||
overflow:auto;
|
||||
line-height:inherit; /* fixes vertical scrolling in webkit */
|
||||
}
|
||||
|
||||
h1,h2,h3,h4,h5 {
|
||||
margin:1em 0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
p,ul,ol,dl,dd,dt,li {
|
||||
line-height:1.3em;
|
||||
}
|
||||
|
||||
ul,ol {
|
||||
margin:0 0 .8em;
|
||||
padding:0 0 0 2em;
|
||||
}
|
||||
|
||||
li {
|
||||
padding:0 0 .5em;
|
||||
}
|
||||
|
||||
dl {
|
||||
margin:0 0 1em 0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
dt {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin:0 0 1em;
|
||||
padding:0 0 0 2em;
|
||||
}
|
||||
|
||||
li p {
|
||||
margin:.5em 0 0;
|
||||
}
|
||||
|
||||
dd p {
|
||||
margin:1em 0 0;
|
||||
}
|
||||
|
||||
li pre, li table, li img {
|
||||
margin:.5em 0 0 1em;
|
||||
}
|
||||
|
||||
dd pre,
|
||||
#jd-content dd table,
|
||||
#jd-content dd img {
|
||||
margin:1em 0 0 1em;
|
||||
}
|
||||
|
||||
li ul,
|
||||
li ol,
|
||||
dd ul,
|
||||
dd ol {
|
||||
margin:0;
|
||||
padding: 0 0 0 2em;
|
||||
}
|
||||
|
||||
li li,
|
||||
dd li {
|
||||
margin:0;
|
||||
padding:.5em 0 0;
|
||||
}
|
||||
|
||||
dl dl,
|
||||
ol dl,
|
||||
ul dl {
|
||||
margin:0 0 1em;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size:1em;
|
||||
margin:0 0 1em;
|
||||
padding:0;
|
||||
border-collapse:collapse;
|
||||
border-width:0;
|
||||
empty-cells:show;
|
||||
}
|
||||
|
||||
td,th {
|
||||
border:1px solid #ccc;
|
||||
padding:6px 12px;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
background-color:inherit;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color:#dee8f1;
|
||||
}
|
||||
|
||||
td > p:last-child {
|
||||
margin:0;
|
||||
}
|
||||
|
||||
hr.blue {
|
||||
background-color:#DDF0F2;
|
||||
border:none;
|
||||
height:5px;
|
||||
margin:20px 0 10px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1em 1em;
|
||||
padding: 0 4em 0 1em;
|
||||
border-left:2px solid #eee;
|
||||
}
|
||||
/* LAYOUT */
|
||||
|
||||
#body-content {
|
||||
/* "Preliminary" watermark for draft documentation.
|
||||
background:transparent url(images/preliminary.png) repeat scroll 0 0; */
|
||||
margin:0;
|
||||
position:relative;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
#header {
|
||||
height: 34px;
|
||||
position:relative;
|
||||
z-index:100;
|
||||
min-width:675px; /* min width for the tabs, before they wrap */
|
||||
padding:0 10px;
|
||||
border-bottom:3px solid #94b922;
|
||||
}
|
||||
|
||||
#headerLeft{
|
||||
padding: 10px 0 0;
|
||||
}
|
||||
/*
|
||||
#headerLeft img{
|
||||
height:50px;
|
||||
width:180px;
|
||||
}
|
||||
*/
|
||||
#headerRight {
|
||||
position:absolute;
|
||||
right:0;
|
||||
top:0;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
/* Tabs in the header */
|
||||
|
||||
#header ul {
|
||||
list-style: none;
|
||||
margin: 7px 0 0;
|
||||
padding: 0;
|
||||
height: 29px;
|
||||
}
|
||||
|
||||
#header li {
|
||||
float: left;
|
||||
margin: 0px 2px 0px 0px;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#header li a {
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
background-image: url(images/bg_images_sprite.png);
|
||||
background-position: 0 -58px;
|
||||
background-repeat: no-repeat;
|
||||
color: #666;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
width: 94px;
|
||||
height: 29px;
|
||||
text-align: center;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#header li a:hover {
|
||||
background-image: url(images/bg_images_sprite.png);
|
||||
background-position: 0 -29px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
#header li a span {
|
||||
position:relative;
|
||||
top:7px;
|
||||
}
|
||||
|
||||
#header li a span+span {
|
||||
display:none;
|
||||
}
|
||||
|
||||
/* tab highlighting */
|
||||
|
||||
.home #home-link a,
|
||||
.guide #guide-link a,
|
||||
.reference #reference-link a,
|
||||
.sdk #sdk-link a,
|
||||
.resources #resources-link a,
|
||||
.videos #videos-link a {
|
||||
background-image: url(images/bg_images_sprite.png);
|
||||
background-position: 0 0;
|
||||
background-repeat: no-repeat;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
cursor:default;
|
||||
}
|
||||
|
||||
.home #home-link a:hover,
|
||||
.guide #guide-link a:hover,
|
||||
.reference #reference-link a:hover,
|
||||
.sdk #sdk-link a:hover,
|
||||
.resources #resources-link a:hover,
|
||||
.videos #videos-link a:hover {
|
||||
background-image: url(images/bg_images_sprite.png);
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
#headerLinks {
|
||||
margin:10px 10px 0 0;
|
||||
height:13px;
|
||||
font-size: 11px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#headerLinks a {
|
||||
color: #7FA9B5;
|
||||
}
|
||||
|
||||
#headerLinks img {
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
#language {
|
||||
margin:0 10px 0 4px;
|
||||
}
|
||||
|
||||
#search {
|
||||
height:45px;
|
||||
margin:8px 10px 0 0;
|
||||
}
|
||||
|
||||
/* MAIN BODY */
|
||||
|
||||
#mainBodyFluid {
|
||||
margin: 20px 10px;
|
||||
color:#333;
|
||||
}
|
||||
|
||||
#mainBodyFixed {
|
||||
margin: 20px 10px;
|
||||
color: #333;
|
||||
width:930px;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
#mainBodyFixed h3,
|
||||
#mainBodyFluid h3 {
|
||||
color:#336666;
|
||||
font-size:1.25em;
|
||||
margin: 0em 0em 0em 0em;
|
||||
padding-bottom:.5em;
|
||||
}
|
||||
|
||||
#mainBodyFixed h2,
|
||||
#mainBodyFluid h2 {
|
||||
color:#336666;
|
||||
font-size:1.25em;
|
||||
margin: 0;
|
||||
padding-bottom:.5em;
|
||||
}
|
||||
|
||||
#mainBodyFixed h1,
|
||||
#mainBodyFluid h1 {
|
||||
color:#435A6E;
|
||||
font-size:1.7em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
#mainBodyFixed .green,
|
||||
#mainBodyFluid .green,
|
||||
#jd-content .green {
|
||||
color:#7BB026;
|
||||
background-color:none;
|
||||
}
|
||||
|
||||
#mainBodyLeft {
|
||||
float: left;
|
||||
width: 600px;
|
||||
margin-right: 20px;
|
||||
color: #333;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
div.indent {
|
||||
margin-left: 40px;
|
||||
margin-right: 70px;
|
||||
}
|
||||
|
||||
#mainBodyLeft p {
|
||||
color: #333;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
#mainBodyLeft p.blue {
|
||||
color: #669999;
|
||||
}
|
||||
|
||||
#mainBodyLeft #communityDiv {
|
||||
float: left;
|
||||
background-image:url(images/bg_community_leftDiv.jpg);
|
||||
background-repeat: no-repeat;
|
||||
width: 581px;
|
||||
height: 347px;
|
||||
padding: 20px 0px 0px 20px;
|
||||
}
|
||||
|
||||
#mainBodyRight {
|
||||
float: left;
|
||||
width: 300px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#mainBodyRight p {
|
||||
padding-right: 50px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#mainBodyRight table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#mainBodyRight td {
|
||||
border:0px solid #666;
|
||||
padding:0px 5px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
#mainBodyRight td p {
|
||||
margin:0 0 1em 0;
|
||||
}
|
||||
|
||||
#mainBodyRight .blueBorderBox {
|
||||
border:5px solid #ddf0f2;
|
||||
padding:18px 18px 18px 18px;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
#mainBodyFixed .seperator {
|
||||
background-image:url(images/hr_gray_side.jpg);
|
||||
background-repeat:no-repeat;
|
||||
width: 100%;
|
||||
float: left;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#mainBodyBottom {
|
||||
float: left;
|
||||
width: 100%;
|
||||
clear:both;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#mainBodyBottom .seperator {
|
||||
background-image:url(images/hr_gray_main.jpg);
|
||||
background-repeat:no-repeat;
|
||||
width: 100%;
|
||||
float: left;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* FOOTER */
|
||||
|
||||
#footer {
|
||||
float: left;
|
||||
width:90%;
|
||||
margin: 20px;
|
||||
color: #aaa;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#footer a {
|
||||
color: #aaa;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#footer a:hover {
|
||||
text-decoration: underline;
|
||||
color:#aaa;
|
||||
}
|
||||
|
||||
#footerlinks {
|
||||
margin-top:2px;
|
||||
}
|
||||
|
||||
#footerlinks a,
|
||||
#footerlinks a:visited {
|
||||
color:#006699;
|
||||
}
|
||||
|
||||
/* SEARCH FILTER */
|
||||
|
||||
#search_autocomplete {
|
||||
color:#aaa;
|
||||
}
|
||||
|
||||
#search-button {
|
||||
display:inline;
|
||||
}
|
||||
|
||||
#search_filtered_div {
|
||||
position:absolute;
|
||||
margin-top:-1px;
|
||||
z-index:101;
|
||||
border:1px solid #BCCDF0;
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
#search_filtered {
|
||||
min-width:100%;
|
||||
}
|
||||
#search_filtered td{
|
||||
background-color:#fff;
|
||||
border-bottom: 1px solid #669999;
|
||||
line-height:1.5em;
|
||||
}
|
||||
|
||||
#search_filtered .jd-selected {
|
||||
background-color: #94b922;
|
||||
cursor:pointer;
|
||||
}
|
||||
#search_filtered .jd-selected,
|
||||
#search_filtered .jd-selected a {
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.no-display {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.jd-autocomplete {
|
||||
font-family: Arial, sans-serif;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
font-size: 0.81em;
|
||||
border: none;
|
||||
margin: 0;
|
||||
line-height: 1.05em;
|
||||
}
|
||||
|
||||
.show-row {
|
||||
display: table-row;
|
||||
}
|
||||
.hide-row {
|
||||
display: hidden;
|
||||
}
|
||||
|
||||
/* SEARCH */
|
||||
|
||||
/* restrict global search form width */
|
||||
#searchForm {
|
||||
width:350px;
|
||||
}
|
||||
|
||||
#searchTxt {
|
||||
width:200px;
|
||||
}
|
||||
|
||||
/* disable twiddle and size selectors for left column */
|
||||
#leftSearchControl div {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#leftSearchControl .gsc-twiddle {
|
||||
background-image : none;
|
||||
}
|
||||
|
||||
#leftSearchControl td, #searchForm td {
|
||||
border: 0px solid #000;
|
||||
}
|
||||
|
||||
#leftSearchControl .gsc-resultsHeader .gsc-title {
|
||||
padding-left : 0px;
|
||||
font-weight : bold;
|
||||
font-size : 13px;
|
||||
color:#006699;
|
||||
display : none;
|
||||
}
|
||||
|
||||
#leftSearchControl .gsc-resultsHeader div.gsc-results-selector {
|
||||
display : none;
|
||||
}
|
||||
|
||||
#leftSearchControl .gsc-resultsRoot {
|
||||
padding-top : 6px;
|
||||
}
|
||||
|
||||
#leftSearchControl div.gs-visibleUrl-long {
|
||||
display : block;
|
||||
color:#006699;
|
||||
}
|
||||
|
||||
.gsc-webResult div.gs-visibleUrl-short,
|
||||
table.gsc-branding,
|
||||
.gsc-clear-button {
|
||||
display : none;
|
||||
}
|
||||
|
||||
.gsc-cursor-box .gsc-cursor div.gsc-cursor-page,
|
||||
.gsc-cursor-box .gsc-trailing-more-results a.gsc-trailing-more-results,
|
||||
#leftSearchControl a,
|
||||
#leftSearchControl a b {
|
||||
color:#006699;
|
||||
}
|
||||
|
||||
.gsc-resultsHeader {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Disable built in search forms */
|
||||
.gsc-control form.gsc-search-box {
|
||||
display : none;
|
||||
}
|
||||
table.gsc-search-box {
|
||||
margin:6px 0 0 0;
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
td.gsc-input {
|
||||
padding:0 2px;
|
||||
width:100%;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
input.gsc-input {
|
||||
border:1px solid #BCCDF0;
|
||||
width:99%;
|
||||
padding-left:2px;
|
||||
font-size:.95em;
|
||||
}
|
||||
|
||||
td.gsc-search-button {
|
||||
text-align: right;
|
||||
padding:0;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
#search-button {
|
||||
margin:0 0 0 2px;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
/* search result tabs */
|
||||
|
||||
#doc-content .gsc-control {
|
||||
position:relative;
|
||||
}
|
||||
|
||||
#doc-content .gsc-tabsArea {
|
||||
position:relative;
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
#doc-content .gsc-tabHeader {
|
||||
padding: 3px 6px;
|
||||
position:relative;
|
||||
}
|
||||
|
||||
#doc-content .gsc-tabHeader.gsc-tabhActive {
|
||||
border-top: 2px solid #94B922;
|
||||
}
|
||||
|
||||
#doc-content h2#searchTitle {
|
||||
padding:0;
|
||||
}
|
||||
|
||||
#doc-content .gsc-resultsbox-visible {
|
||||
padding:1em 0 0 6px;
|
||||
}
|
||||
|
||||
/* Pretty printing styles. Used with prettify.js. */
|
||||
|
||||
.str { color: #080; }
|
||||
.kwd { color: #008; }
|
||||
.com { color: #800; }
|
||||
.typ { color: #606; }
|
||||
.lit { color: #066; }
|
||||
.pun { color: #660; }
|
||||
.pln { color: #000; }
|
||||
dl.tag-list dt code,
|
||||
.tag { color: #008; }
|
||||
dl.atn-list dt code,
|
||||
.atn { color: #828; }
|
||||
.atv { color: #080; }
|
||||
.dec { color: #606; }
|
||||
|
||||
@media print {
|
||||
.str { color: #060; }
|
||||
.kwd { color: #006; font-weight: bold; }
|
||||
.com { color: #600; font-style: italic; }
|
||||
.typ { color: #404; font-weight: bold; }
|
||||
.lit { color: #044; }
|
||||
.pun { color: #440; }
|
||||
.pln { color: #000; }
|
||||
.tag { color: #006; font-weight: bold; }
|
||||
.atn { color: #404; }
|
||||
.atv { color: #060; }
|
||||
}
|
||||
@@ -1,521 +0,0 @@
|
||||
var resizePackagesNav;
|
||||
var classesNav;
|
||||
var devdocNav;
|
||||
var sidenav;
|
||||
var content;
|
||||
var HEADER_HEIGHT = -1;
|
||||
var cookie_namespace = 'doclava_developer';
|
||||
var NAV_PREF_TREE = "tree";
|
||||
var NAV_PREF_PANELS = "panels";
|
||||
var nav_pref;
|
||||
var toRoot;
|
||||
var isMobile = false; // true if mobile, so we can adjust some layout
|
||||
var isIE6 = false; // true if IE6
|
||||
|
||||
// TODO: use $(document).ready instead
|
||||
function addLoadEvent(newfun) {
|
||||
var current = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = newfun;
|
||||
} else {
|
||||
window.onload = function() {
|
||||
current();
|
||||
newfun();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var agent = navigator['userAgent'].toLowerCase();
|
||||
// If a mobile phone, set flag and do mobile setup
|
||||
if ((agent.indexOf("mobile") != -1) || // android, iphone, ipod
|
||||
(agent.indexOf("blackberry") != -1) ||
|
||||
(agent.indexOf("webos") != -1) ||
|
||||
(agent.indexOf("mini") != -1)) { // opera mini browsers
|
||||
isMobile = true;
|
||||
addLoadEvent(mobileSetup);
|
||||
// If not a mobile browser, set the onresize event for IE6, and others
|
||||
} else if (agent.indexOf("msie 6") != -1) {
|
||||
isIE6 = true;
|
||||
addLoadEvent(function() {
|
||||
window.onresize = resizeAll;
|
||||
});
|
||||
} else {
|
||||
addLoadEvent(function() {
|
||||
window.onresize = resizeHeight;
|
||||
});
|
||||
}
|
||||
|
||||
function mobileSetup() {
|
||||
$("body").css({'overflow':'auto'});
|
||||
$("html").css({'overflow':'auto'});
|
||||
$("#body-content").css({'position':'relative', 'top':'0'});
|
||||
$("#doc-content").css({'overflow':'visible', 'border-left':'3px solid #DDD'});
|
||||
$("#side-nav").css({'padding':'0'});
|
||||
$("#nav-tree").css({'overflow-y': 'auto'});
|
||||
}
|
||||
|
||||
/* loads the lists.js file to the page.
|
||||
Loading this in the head was slowing page load time */
|
||||
addLoadEvent( function() {
|
||||
var lists = document.createElement("script");
|
||||
lists.setAttribute("type","text/javascript");
|
||||
lists.setAttribute("src", toRoot+"reference/lists.js");
|
||||
document.getElementsByTagName("head")[0].appendChild(lists);
|
||||
} );
|
||||
|
||||
addLoadEvent( function() {
|
||||
$("pre:not(.no-pretty-print)").addClass("prettyprint");
|
||||
prettyPrint();
|
||||
} );
|
||||
|
||||
function setToRoot(root) {
|
||||
toRoot = root;
|
||||
// note: toRoot also used by carousel.js
|
||||
}
|
||||
|
||||
function restoreWidth(navWidth) {
|
||||
var windowWidth = $(window).width() + "px";
|
||||
content.css({marginLeft:parseInt(navWidth) + 6 + "px"}); //account for 6px-wide handle-bar
|
||||
|
||||
if (isIE6) {
|
||||
content.css({width:parseInt(windowWidth) - parseInt(navWidth) - 6 + "px"}); // necessary in order for scrollbars to be visible
|
||||
}
|
||||
|
||||
sidenav.css({width:navWidth});
|
||||
resizePackagesNav.css({width:navWidth});
|
||||
classesNav.css({width:navWidth});
|
||||
$("#packages-nav").css({width:navWidth});
|
||||
}
|
||||
|
||||
function restoreHeight(packageHeight) {
|
||||
var windowHeight = ($(window).height() - HEADER_HEIGHT);
|
||||
var swapperHeight = windowHeight - 13;
|
||||
$("#swapper").css({height:swapperHeight + "px"});
|
||||
sidenav.css({height:windowHeight + "px"});
|
||||
content.css({height:windowHeight + "px"});
|
||||
resizePackagesNav.css({maxHeight:swapperHeight + "px", height:packageHeight});
|
||||
classesNav.css({height:swapperHeight - parseInt(packageHeight) + "px"});
|
||||
$("#packages-nav").css({height:parseInt(packageHeight) - 6 + "px"}); //move 6px to give space for the resize handle
|
||||
devdocNav.css({height:sidenav.css("height")});
|
||||
$("#nav-tree").css({height:swapperHeight + "px"});
|
||||
}
|
||||
|
||||
function readCookie(cookie) {
|
||||
var myCookie = cookie_namespace+"_"+cookie+"=";
|
||||
if (document.cookie) {
|
||||
var index = document.cookie.indexOf(myCookie);
|
||||
if (index != -1) {
|
||||
var valStart = index + myCookie.length;
|
||||
var valEnd = document.cookie.indexOf(";", valStart);
|
||||
if (valEnd == -1) {
|
||||
valEnd = document.cookie.length;
|
||||
}
|
||||
var val = document.cookie.substring(valStart, valEnd);
|
||||
return val;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function writeCookie(cookie, val, section, expiration) {
|
||||
if (val==undefined) return;
|
||||
section = section == null ? "_" : "_"+section+"_";
|
||||
if (expiration == null) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week
|
||||
expiration = date.toGMTString();
|
||||
}
|
||||
document.cookie = cookie_namespace + section + cookie + "=" + val + "; expires=" + expiration+"; path=/";
|
||||
}
|
||||
|
||||
function getSection() {
|
||||
if (location.href.indexOf("/reference/") != -1) {
|
||||
return "reference";
|
||||
} else if (location.href.indexOf("/guide/") != -1) {
|
||||
return "guide";
|
||||
} else if (location.href.indexOf("/resources/") != -1) {
|
||||
return "resources";
|
||||
}
|
||||
var basePath = getBaseUri(location.pathname);
|
||||
return basePath.substring(1,basePath.indexOf("/",1));
|
||||
}
|
||||
|
||||
function init() {
|
||||
HEADER_HEIGHT = $("#header").height()+3;
|
||||
$("#side-nav").css({position:"absolute",left:0});
|
||||
content = $("#doc-content");
|
||||
resizePackagesNav = $("#resize-packages-nav");
|
||||
classesNav = $("#classes-nav");
|
||||
sidenav = $("#side-nav");
|
||||
devdocNav = $("#devdoc-nav");
|
||||
|
||||
var cookiePath = getSection() + "_";
|
||||
|
||||
if (!isMobile) {
|
||||
$("#resize-packages-nav").resizable({handles: "s", resize: function(e, ui) { resizePackagesHeight(); } });
|
||||
$(".side-nav-resizable").resizable({handles: "e", resize: function(e, ui) { resizeWidth(); } });
|
||||
var cookieWidth = readCookie(cookiePath+'width');
|
||||
var cookieHeight = readCookie(cookiePath+'height');
|
||||
if (cookieWidth) {
|
||||
restoreWidth(cookieWidth);
|
||||
} else if ($(".side-nav-resizable").length) {
|
||||
resizeWidth();
|
||||
}
|
||||
if (cookieHeight) {
|
||||
restoreHeight(cookieHeight);
|
||||
} else {
|
||||
resizeHeight();
|
||||
}
|
||||
}
|
||||
|
||||
if (devdocNav.length) { // only dev guide, resources, and sdk
|
||||
tryPopulateResourcesNav();
|
||||
highlightNav(location.href);
|
||||
}
|
||||
}
|
||||
|
||||
function highlightNav(fullPageName) {
|
||||
var lastSlashPos = fullPageName.lastIndexOf("/");
|
||||
var firstSlashPos;
|
||||
if (fullPageName.indexOf("/guide/") != -1) {
|
||||
firstSlashPos = fullPageName.indexOf("/guide/");
|
||||
} else if (fullPageName.indexOf("/sdk/") != -1) {
|
||||
firstSlashPos = fullPageName.indexOf("/sdk/");
|
||||
} else {
|
||||
firstSlashPos = fullPageName.indexOf("/resources/");
|
||||
}
|
||||
if (lastSlashPos == (fullPageName.length - 1)) { // if the url ends in slash (add 'index.html')
|
||||
fullPageName = fullPageName + "index.html";
|
||||
}
|
||||
// First check if the exact URL, with query string and all, is in the navigation menu
|
||||
var pathPageName = fullPageName.substr(firstSlashPos);
|
||||
var link = $("#devdoc-nav a[href$='"+ pathPageName+"']");
|
||||
if (link.length == 0) {
|
||||
var htmlPos = fullPageName.lastIndexOf(".html", fullPageName.length);
|
||||
pathPageName = fullPageName.slice(firstSlashPos, htmlPos + 5); // +5 advances past ".html"
|
||||
link = $("#devdoc-nav a[href$='"+ pathPageName+"']");
|
||||
if ((link.length == 0) && ((fullPageName.indexOf("/guide/") != -1) || (fullPageName.indexOf("/resources/") != -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 and resources)
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add 'selected' to the <li> or <div> that wraps this <a>
|
||||
link.parent().addClass('selected');
|
||||
|
||||
// if we're in a toggleable root link (<li class=toggle-list><div><a>)
|
||||
if (link.parent().parent().hasClass('toggle-list')) {
|
||||
toggle(link.parent().parent(), false); // open our own list
|
||||
// then also check if we're in a third-level nested list that's toggleable
|
||||
if (link.parent().parent().parent().is(':hidden')) {
|
||||
toggle(link.parent().parent().parent().parent(), false); // open the super parent list
|
||||
}
|
||||
}
|
||||
// if we're in a normal nav link (<li><a>) and the parent <ul> is hidden
|
||||
else if (link.parent().parent().is(':hidden')) {
|
||||
toggle(link.parent().parent().parent(), false); // open the parent list
|
||||
// then also check if the parent list is also nested in a hidden list
|
||||
if (link.parent().parent().parent().parent().is(':hidden')) {
|
||||
toggle(link.parent().parent().parent().parent().parent(), false); // open the super parent list
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Resize the height of the nav panels in the reference,
|
||||
* and save the new size to a cookie */
|
||||
function resizePackagesHeight() {
|
||||
var windowHeight = ($(window).height() - HEADER_HEIGHT);
|
||||
var swapperHeight = windowHeight - 13; // move 13px for swapper link at the bottom
|
||||
resizePackagesNav.css({maxHeight:swapperHeight + "px"});
|
||||
classesNav.css({height:swapperHeight - parseInt(resizePackagesNav.css("height")) + "px"});
|
||||
|
||||
$("#swapper").css({height:swapperHeight + "px"});
|
||||
$("#packages-nav").css({height:parseInt(resizePackagesNav.css("height")) - 6 + "px"}); //move 6px for handle
|
||||
|
||||
var section = getSection();
|
||||
writeCookie("height", resizePackagesNav.css("height"), section, null);
|
||||
}
|
||||
|
||||
/* Resize the height of the side-nav and doc-content divs,
|
||||
* which creates the frame effect */
|
||||
function resizeHeight() {
|
||||
var docContent = $("#doc-content");
|
||||
|
||||
// Get the window height and always resize the doc-content and side-nav divs
|
||||
var windowHeight = ($(window).height() - HEADER_HEIGHT);
|
||||
docContent.css({height:windowHeight + "px"});
|
||||
$("#side-nav").css({height:windowHeight + "px"});
|
||||
|
||||
var href = location.href;
|
||||
// If in the reference docs, also resize the "swapper", "classes-nav", and "nav-tree" divs
|
||||
if (href.indexOf("/reference/") != -1) {
|
||||
var swapperHeight = windowHeight - 13;
|
||||
$("#swapper").css({height:swapperHeight + "px"});
|
||||
$("#classes-nav").css({height:swapperHeight - parseInt(resizePackagesNav.css("height")) + "px"});
|
||||
$("#nav-tree").css({height:swapperHeight + "px"});
|
||||
|
||||
// If in the dev guide docs, also resize the "devdoc-nav" div
|
||||
} else if (href.indexOf("/guide/") != -1) {
|
||||
$("#devdoc-nav").css({height:sidenav.css("height")});
|
||||
} else if (href.indexOf("/resources/") != -1) {
|
||||
$("#devdoc-nav").css({height:sidenav.css("height")});
|
||||
}
|
||||
|
||||
// Hide the "Go to top" link if there's no vertical scroll
|
||||
if ( parseInt($("#jd-content").css("height")) <= parseInt(docContent.css("height")) ) {
|
||||
$("a[href='#top']").css({'display':'none'});
|
||||
} else {
|
||||
$("a[href='#top']").css({'display':'inline'});
|
||||
}
|
||||
}
|
||||
|
||||
/* Resize the width of the "side-nav" and the left margin of the "doc-content" div,
|
||||
* which creates the resizable side bar */
|
||||
function resizeWidth() {
|
||||
var windowWidth = $(window).width() + "px";
|
||||
if (sidenav.length) {
|
||||
var sidenavWidth = sidenav.css("width");
|
||||
} else {
|
||||
var sidenavWidth = 0;
|
||||
}
|
||||
content.css({marginLeft:parseInt(sidenavWidth) + 6 + "px"}); //account for 6px-wide handle-bar
|
||||
|
||||
if (isIE6) {
|
||||
content.css({width:parseInt(windowWidth) - parseInt(sidenavWidth) - 6 + "px"}); // necessary in order to for scrollbars to be visible
|
||||
}
|
||||
|
||||
resizePackagesNav.css({width:sidenavWidth});
|
||||
classesNav.css({width:sidenavWidth});
|
||||
$("#packages-nav").css({width:sidenavWidth});
|
||||
|
||||
if ($(".side-nav-resizable").length) { // Must check if the nav is resizable because IE6 calls resizeWidth() from resizeAll() for all pages
|
||||
var section = getSection();
|
||||
writeCookie("width", sidenavWidth, section, null);
|
||||
}
|
||||
}
|
||||
|
||||
/* For IE6 only,
|
||||
* because it can't properly perform auto width for "doc-content" div,
|
||||
* avoiding this for all browsers provides better performance */
|
||||
function resizeAll() {
|
||||
resizeHeight();
|
||||
resizeWidth();
|
||||
}
|
||||
|
||||
function getBaseUri(uri) {
|
||||
var intlUrl = (uri.substring(0,6) == "/intl/");
|
||||
if (intlUrl) {
|
||||
base = uri.substring(uri.indexOf('intl/')+5,uri.length);
|
||||
base = base.substring(base.indexOf('/')+1, base.length);
|
||||
//alert("intl, returning base url: /" + base);
|
||||
return ("/" + base);
|
||||
} else {
|
||||
//alert("not intl, returning uri as found.");
|
||||
return uri;
|
||||
}
|
||||
}
|
||||
|
||||
function requestAppendHL(uri) {
|
||||
//append "?hl=<lang> to an outgoing request (such as to blog)
|
||||
var lang = getLangPref();
|
||||
if (lang) {
|
||||
var q = 'hl=' + lang;
|
||||
uri += '?' + q;
|
||||
window.location = uri;
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function loadLast(cookiePath) {
|
||||
var location = window.location.href;
|
||||
if (location.indexOf("/"+cookiePath+"/") != -1) {
|
||||
return true;
|
||||
}
|
||||
var lastPage = readCookie(cookiePath + "_lastpage");
|
||||
if (lastPage) {
|
||||
window.location = lastPage;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
$(window).unload(function(){
|
||||
var path = getBaseUri(location.pathname);
|
||||
if (path.indexOf("/reference/") != -1) {
|
||||
writeCookie("lastpage", path, "reference", null);
|
||||
} else if (path.indexOf("/guide/") != -1) {
|
||||
writeCookie("lastpage", path, "guide", null);
|
||||
} else if (path.indexOf("/resources/") != -1) {
|
||||
writeCookie("lastpage", path, "resources", null);
|
||||
}
|
||||
});
|
||||
|
||||
function toggle(obj, slide) {
|
||||
var ul = $("ul:first", obj);
|
||||
var li = ul.parent();
|
||||
if (li.hasClass("closed")) {
|
||||
if (slide) {
|
||||
ul.slideDown("fast");
|
||||
} else {
|
||||
ul.show();
|
||||
}
|
||||
li.removeClass("closed");
|
||||
li.addClass("open");
|
||||
$(".toggle-img", li).attr("title", "hide pages");
|
||||
} else {
|
||||
ul.slideUp("fast");
|
||||
li.removeClass("open");
|
||||
li.addClass("closed");
|
||||
$(".toggle-img", li).attr("title", "show pages");
|
||||
}
|
||||
}
|
||||
|
||||
function buildToggleLists() {
|
||||
$(".toggle-list").each(
|
||||
function(i) {
|
||||
$("div:first", this).append("<a class='toggle-img' href='#' title='show pages' onClick='toggle(this.parentNode.parentNode, true); return false;'></a>");
|
||||
$(this).addClass("closed");
|
||||
});
|
||||
}
|
||||
|
||||
function getNavPref() {
|
||||
var v = readCookie('reference_nav');
|
||||
if (v != NAV_PREF_TREE) {
|
||||
v = NAV_PREF_PANELS;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
function chooseDefaultNav() {
|
||||
nav_pref = getNavPref();
|
||||
if (nav_pref == NAV_PREF_TREE) {
|
||||
$("#nav-panels").toggle();
|
||||
$("#panel-link").toggle();
|
||||
$("#nav-tree").toggle();
|
||||
$("#tree-link").toggle();
|
||||
}
|
||||
}
|
||||
|
||||
function swapNav() {
|
||||
if (nav_pref == NAV_PREF_TREE) {
|
||||
nav_pref = NAV_PREF_PANELS;
|
||||
} else {
|
||||
nav_pref = NAV_PREF_TREE;
|
||||
init_default_navtree(toRoot);
|
||||
}
|
||||
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());
|
||||
|
||||
$("#nav-panels").toggle();
|
||||
$("#panel-link").toggle();
|
||||
$("#nav-tree").toggle();
|
||||
$("#tree-link").toggle();
|
||||
|
||||
if ($("#nav-tree").is(':visible')) scrollIntoView("nav-tree");
|
||||
else {
|
||||
scrollIntoView("packages-nav");
|
||||
scrollIntoView("classes-nav");
|
||||
}
|
||||
}
|
||||
|
||||
function scrollIntoView(nav) {
|
||||
var navObj = $("#"+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 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 changeTabLang(lang) {
|
||||
var nodes = $("#header-tabs").find("."+lang);
|
||||
for (i=0; i < nodes.length; i++) { // for each node in this language
|
||||
var node = $(nodes[i]);
|
||||
node.siblings().css("display","none"); // hide all siblings
|
||||
if (node.not(":empty").length != 0) { //if this languages node has a translation, show it
|
||||
node.css("display","inline");
|
||||
} else { //otherwise, show English instead
|
||||
node.css("display","none");
|
||||
node.siblings().filter(".en").css("display","inline");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function changeNavLang(lang) {
|
||||
var nodes = $("#side-nav").find("."+lang);
|
||||
for (i=0; i < nodes.length; i++) { // for each node in this language
|
||||
var node = $(nodes[i]);
|
||||
node.siblings().css("display","none"); // hide all siblings
|
||||
if (node.not(":empty").length != 0) { // if this languages node has a translation, show it
|
||||
node.css("display","inline");
|
||||
} else { // otherwise, show English instead
|
||||
node.css("display","none");
|
||||
node.siblings().filter(".en").css("display","inline");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function changeDocLang(lang) {
|
||||
changeTabLang(lang);
|
||||
changeNavLang(lang);
|
||||
}
|
||||
|
||||
function changeLangPref(lang, refresh) {
|
||||
var date = new Date();
|
||||
expires = date.toGMTString(date.setTime(date.getTime()+(10*365*24*60*60*1000))); // keep this for 50 years
|
||||
//alert("expires: " + expires)
|
||||
writeCookie("pref_lang", lang, null, expires);
|
||||
//changeDocLang(lang);
|
||||
if (refresh) {
|
||||
l = getBaseUri(location.pathname);
|
||||
window.location = l;
|
||||
}
|
||||
}
|
||||
|
||||
function loadLangPref() {
|
||||
var lang = readCookie("pref_lang");
|
||||
if (lang != 0) {
|
||||
$("#language").find("option[value='"+lang+"']").attr("selected",true);
|
||||
}
|
||||
}
|
||||
|
||||
function getLangPref() {
|
||||
var lang = $("#language").find(":selected").attr("value");
|
||||
if (!lang) {
|
||||
lang = readCookie("pref_lang");
|
||||
}
|
||||
return (lang != 0) ? lang : 'en';
|
||||
}
|
||||
|
||||
|
||||
function toggleContent(obj) {
|
||||
var button = $(obj);
|
||||
var div = $(obj.parentNode);
|
||||
var toggleMe = $(".toggle-content-toggleme",div);
|
||||
if (button.hasClass("show")) {
|
||||
toggleMe.slideDown();
|
||||
button.removeClass("show").addClass("hide");
|
||||
} else {
|
||||
toggleMe.slideUp();
|
||||
button.removeClass("hide").addClass("show");
|
||||
}
|
||||
$("span", button).toggle();
|
||||
}
|
||||
@@ -1,392 +0,0 @@
|
||||
|
||||
/* API LEVEL TOGGLE */
|
||||
<?cs if:reference.apilevels ?>
|
||||
addLoadEvent(changeApiLevel);
|
||||
<?cs /if ?>
|
||||
|
||||
var API_LEVEL_ENABLED_COOKIE = "api_level_enabled";
|
||||
var API_LEVEL_COOKIE = "api_level";
|
||||
var minLevel = 1;
|
||||
|
||||
function toggleApiLevelSelector(checkbox) {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // keep this for 10 years
|
||||
var expiration = date.toGMTString();
|
||||
if (checkbox.checked) {
|
||||
$("#apiLevelSelector").removeAttr("disabled");
|
||||
$("#api-level-toggle label").removeClass("disabled");
|
||||
writeCookie(API_LEVEL_ENABLED_COOKIE, 1, null, expiration);
|
||||
} else {
|
||||
$("#apiLevelSelector").attr("disabled","disabled");
|
||||
$("#api-level-toggle label").addClass("disabled");
|
||||
writeCookie(API_LEVEL_ENABLED_COOKIE, 0, null, expiration);
|
||||
}
|
||||
changeApiLevel();
|
||||
}
|
||||
|
||||
function buildApiLevelSelector() {
|
||||
var maxLevel = SINCE_DATA.length;
|
||||
var userApiLevelEnabled = readCookie(API_LEVEL_ENABLED_COOKIE);
|
||||
var userApiLevel = readCookie(API_LEVEL_COOKIE);
|
||||
userApiLevel = userApiLevel == 0 ? maxLevel : userApiLevel; // If there's no cookie (zero), use the max by default
|
||||
|
||||
if (userApiLevelEnabled == 0) {
|
||||
$("#apiLevelSelector").attr("disabled","disabled");
|
||||
} else {
|
||||
$("#apiLevelCheckbox").attr("checked","checked");
|
||||
$("#api-level-toggle label").removeClass("disabled");
|
||||
}
|
||||
|
||||
minLevel = $("body").attr("class");
|
||||
var select = $("#apiLevelSelector").html("").change(changeApiLevel);
|
||||
for (var i = maxLevel-1; i >= 0; i--) {
|
||||
var option = $("<option />").attr("value",""+SINCE_DATA[i]).append(""+SINCE_DATA[i]);
|
||||
// if (SINCE_DATA[i] < minLevel) option.addClass("absent"); // always false for strings (codenames)
|
||||
select.append(option);
|
||||
}
|
||||
|
||||
// get the DOM element and use setAttribute cuz IE6 fails when using jquery .attr('selected',true)
|
||||
var selectedLevelItem = $("#apiLevelSelector option[value='"+userApiLevel+"']").get(0);
|
||||
selectedLevelItem.setAttribute('selected',true);
|
||||
}
|
||||
|
||||
function changeApiLevel() {
|
||||
var maxLevel = SINCE_DATA.length;
|
||||
var userApiLevelEnabled = readCookie(API_LEVEL_ENABLED_COOKIE);
|
||||
var selectedLevel = maxLevel;
|
||||
|
||||
if (userApiLevelEnabled == 0) {
|
||||
toggleVisisbleApis(selectedLevel, "body");
|
||||
} else {
|
||||
selectedLevel = $("#apiLevelSelector option:selected").val();
|
||||
toggleVisisbleApis(selectedLevel, "body");
|
||||
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // keep this for 10 years
|
||||
var expiration = date.toGMTString();
|
||||
writeCookie(API_LEVEL_COOKIE, selectedLevel, null, expiration);
|
||||
}
|
||||
|
||||
if (selectedLevel < minLevel) {
|
||||
var thing = ($("#jd-header").html().indexOf("package") != -1) ? "package" : "class";
|
||||
$("#naMessage").show().html("<div><p><strong>This " + thing + " is not available with API Level " + selectedLevel + ".</strong></p>"
|
||||
+ "<p>To use this " + thing + ", your application must specify API Level " + minLevel + " or higher in its manifest "
|
||||
+ "and be compiled against a version of the library that supports an equal or higher API Level. To reveal this "
|
||||
+ "document, change the value of the API Level filter above.</p>"
|
||||
+ "<p><a href='" +toRoot+ "guide/appendix/api-levels.html'>What is the API Level?</a></p></div>");
|
||||
} else {
|
||||
$("#naMessage").hide();
|
||||
}
|
||||
}
|
||||
|
||||
function toggleVisisbleApis(selectedLevel, context) {
|
||||
var apis = $(".api",context);
|
||||
apis.each(function(i) {
|
||||
var obj = $(this);
|
||||
var className = obj.attr("class");
|
||||
var apiLevelIndex = className.lastIndexOf("-")+1;
|
||||
var apiLevelEndIndex = className.indexOf(" ", apiLevelIndex);
|
||||
apiLevelEndIndex = apiLevelEndIndex != -1 ? apiLevelEndIndex : className.length;
|
||||
var apiLevel = className.substring(apiLevelIndex, apiLevelEndIndex);
|
||||
if (apiLevel > selectedLevel) obj.addClass("absent").attr("title","Requires API Level "+apiLevel+" or higher");
|
||||
else obj.removeClass("absent").removeAttr("title");
|
||||
});
|
||||
}
|
||||
|
||||
/* NAVTREE */
|
||||
|
||||
function new_node(me, mom, text, link, children_data, api_level)
|
||||
{
|
||||
var node = new Object();
|
||||
node.children = Array();
|
||||
node.children_data = children_data;
|
||||
node.depth = mom.depth + 1;
|
||||
|
||||
node.li = document.createElement("li");
|
||||
mom.get_children_ul().appendChild(node.li);
|
||||
|
||||
node.label_div = document.createElement("div");
|
||||
node.label_div.className = "label";
|
||||
if (api_level != null) {
|
||||
$(node.label_div).addClass("api");
|
||||
$(node.label_div).addClass("api-level-"+api_level);
|
||||
}
|
||||
node.li.appendChild(node.label_div);
|
||||
node.label_div.style.paddingLeft = 10*node.depth + "px";
|
||||
|
||||
if (children_data == null) {
|
||||
// 12 is the width of the triangle and padding extra space
|
||||
node.label_div.style.paddingLeft = ((10*node.depth)+12) + "px";
|
||||
} else {
|
||||
node.label_div.style.paddingLeft = 10*node.depth + "px";
|
||||
node.expand_toggle = document.createElement("a");
|
||||
node.expand_toggle.href = "javascript:void(0)";
|
||||
node.expand_toggle.onclick = function() {
|
||||
if (node.expanded) {
|
||||
$(node.get_children_ul()).slideUp("fast");
|
||||
node.plus_img.src = me.toroot + "assets/images/triangle-closed-small.png";
|
||||
node.expanded = false;
|
||||
} else {
|
||||
expand_node(me, node);
|
||||
}
|
||||
};
|
||||
node.label_div.appendChild(node.expand_toggle);
|
||||
|
||||
node.plus_img = document.createElement("img");
|
||||
node.plus_img.src = me.toroot + "assets/images/triangle-closed-small.png";
|
||||
node.plus_img.className = "plus";
|
||||
node.plus_img.border = "0";
|
||||
node.expand_toggle.appendChild(node.plus_img);
|
||||
|
||||
node.expanded = false;
|
||||
}
|
||||
|
||||
var a = document.createElement("a");
|
||||
node.label_div.appendChild(a);
|
||||
node.label = document.createTextNode(text);
|
||||
a.appendChild(node.label);
|
||||
if (link) {
|
||||
a.href = me.toroot + link;
|
||||
} else {
|
||||
if (children_data != null) {
|
||||
a.className = "nolink";
|
||||
a.href = "javascript:void(0)";
|
||||
a.onclick = node.expand_toggle.onclick;
|
||||
// This next line shouldn't be necessary. I'll buy a beer for the first
|
||||
// person who figures out how to remove this line and have the link
|
||||
// toggle shut on the first try. --joeo@android.com
|
||||
node.expanded = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
node.children_ul = null;
|
||||
node.get_children_ul = function() {
|
||||
if (!node.children_ul) {
|
||||
node.children_ul = document.createElement("ul");
|
||||
node.children_ul.className = "children_ul";
|
||||
node.children_ul.style.display = "none";
|
||||
node.li.appendChild(node.children_ul);
|
||||
}
|
||||
return node.children_ul;
|
||||
};
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
function expand_node(me, node)
|
||||
{
|
||||
if (node.children_data && !node.expanded) {
|
||||
if (node.children_visited) {
|
||||
$(node.get_children_ul()).slideDown("fast");
|
||||
} else {
|
||||
get_node(me, node);
|
||||
if ($(node.label_div).hasClass("absent")) $(node.get_children_ul()).addClass("absent");
|
||||
$(node.get_children_ul()).slideDown("fast");
|
||||
}
|
||||
node.plus_img.src = me.toroot + "assets/images/triangle-opened-small.png";
|
||||
node.expanded = true;
|
||||
|
||||
// perform api level toggling because new nodes are new to the DOM
|
||||
var selectedLevel = $("#apiLevelSelector option:selected").val();
|
||||
toggleVisisbleApis(selectedLevel, "#side-nav");
|
||||
}
|
||||
}
|
||||
|
||||
function get_node(me, mom)
|
||||
{
|
||||
mom.children_visited = true;
|
||||
for (var i in mom.children_data) {
|
||||
var node_data = mom.children_data[i];
|
||||
mom.children[i] = new_node(me, mom, node_data[0], node_data[1],
|
||||
node_data[2], node_data[3]);
|
||||
}
|
||||
}
|
||||
|
||||
function this_page_relative(toroot)
|
||||
{
|
||||
var full = document.location.pathname;
|
||||
var file = "";
|
||||
if (toroot.substr(0, 1) == "/") {
|
||||
if (full.substr(0, toroot.length) == toroot) {
|
||||
return full.substr(toroot.length);
|
||||
} else {
|
||||
// the file isn't under toroot. Fail.
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
if (toroot != "./") {
|
||||
toroot = "./" + toroot;
|
||||
}
|
||||
do {
|
||||
if (toroot.substr(toroot.length-3, 3) == "../" || toroot == "./") {
|
||||
var pos = full.lastIndexOf("/");
|
||||
file = full.substr(pos) + file;
|
||||
full = full.substr(0, pos);
|
||||
toroot = toroot.substr(0, toroot.length-3);
|
||||
}
|
||||
} while (toroot != "" && toroot != "/");
|
||||
return file.substr(1);
|
||||
}
|
||||
}
|
||||
|
||||
function find_page(url, data)
|
||||
{
|
||||
var nodes = data;
|
||||
var result = null;
|
||||
for (var i in nodes) {
|
||||
var d = nodes[i];
|
||||
if (d[1] == url) {
|
||||
return new Array(i);
|
||||
}
|
||||
else if (d[2] != null) {
|
||||
result = find_page(url, d[2]);
|
||||
if (result != null) {
|
||||
return (new Array(i).concat(result));
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function load_navtree_data(toroot) {
|
||||
var navtreeData = document.createElement("script");
|
||||
navtreeData.setAttribute("type","text/javascript");
|
||||
navtreeData.setAttribute("src", toroot+"navtree_data.js");
|
||||
$("head").append($(navtreeData));
|
||||
}
|
||||
|
||||
function init_default_navtree(toroot) {
|
||||
init_navtree("nav-tree", toroot, NAVTREE_DATA);
|
||||
|
||||
// perform api level toggling because because the whole tree is new to the DOM
|
||||
var selectedLevel = $("#apiLevelSelector option:selected").val();
|
||||
toggleVisisbleApis(selectedLevel, "#side-nav");
|
||||
}
|
||||
|
||||
function init_navtree(navtree_id, toroot, root_nodes)
|
||||
{
|
||||
var me = new Object();
|
||||
me.toroot = toroot;
|
||||
me.node = new Object();
|
||||
|
||||
me.node.li = document.getElementById(navtree_id);
|
||||
me.node.children_data = root_nodes;
|
||||
me.node.children = new Array();
|
||||
me.node.children_ul = document.createElement("ul");
|
||||
me.node.get_children_ul = function() { return me.node.children_ul; };
|
||||
//me.node.children_ul.className = "children_ul";
|
||||
me.node.li.appendChild(me.node.children_ul);
|
||||
me.node.depth = 0;
|
||||
|
||||
get_node(me, me.node);
|
||||
|
||||
me.this_page = this_page_relative(toroot);
|
||||
me.breadcrumbs = find_page(me.this_page, root_nodes);
|
||||
if (me.breadcrumbs != null && me.breadcrumbs.length != 0) {
|
||||
var mom = me.node;
|
||||
for (var i in me.breadcrumbs) {
|
||||
var j = me.breadcrumbs[i];
|
||||
mom = mom.children[j];
|
||||
expand_node(me, mom);
|
||||
}
|
||||
mom.label_div.className = mom.label_div.className + " selected";
|
||||
addLoadEvent(function() {
|
||||
scrollIntoView("nav-tree");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* TOGGLE INHERITED MEMBERS */
|
||||
|
||||
/* Toggle an inherited class (arrow toggle)
|
||||
* @param linkObj The link that was clicked.
|
||||
* @param expand 'true' to ensure it's expanded. 'false' to ensure it's closed.
|
||||
* 'null' to simply toggle.
|
||||
*/
|
||||
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");
|
||||
var a = $(linkObj);
|
||||
if ( (expand == null && a.hasClass("closed")) || expand ) {
|
||||
list.style.display = "none";
|
||||
summary.style.display = "block";
|
||||
trigger.src = 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 = toRoot + "assets/images/triangle-closed.png";
|
||||
a.removeClass("opened");
|
||||
a.addClass("closed");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Toggle all inherited classes in a single table (e.g. all inherited methods)
|
||||
* @param linkObj The link that was clicked.
|
||||
* @param expand 'true' to ensure it's expanded. 'false' to ensure it's closed.
|
||||
* 'null' to simply toggle.
|
||||
*/
|
||||
function toggleAllInherited(linkObj, expand) {
|
||||
var a = $(linkObj);
|
||||
var table = $(a.parent().parent().parent()); // ugly way to get table/tbody
|
||||
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;
|
||||
}
|
||||
|
||||
/* Toggle all inherited members in the class (link in the class title)
|
||||
*/
|
||||
function toggleAllClassInherited() {
|
||||
var a = $("#toggleAllClassInherited"); // get toggle link from class title
|
||||
var toggles = $(".toggle-all", $("#doc-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;
|
||||
}
|
||||
|
||||
/* Expand all inherited members in the class. Used when initiating page search */
|
||||
function ensureAllInheritedExpanded() {
|
||||
var toggles = $(".toggle-all", $("#doc-content"));
|
||||
toggles.each(function(i) {
|
||||
toggleAllInherited(this, true);
|
||||
});
|
||||
$("#toggleAllClassInherited").text("[Collapse All]");
|
||||
}
|
||||
|
||||
|
||||
/* HANDLE KEY EVENTS
|
||||
* - Listen for Ctrl+F (Cmd on Mac) and expand all inherited members (to aid page search)
|
||||
*/
|
||||
var agent = navigator['userAgent'].toLowerCase();
|
||||
var mac = agent.indexOf("macintosh") != -1;
|
||||
|
||||
$(document).keydown( function(e) {
|
||||
var control = mac ? e.metaKey && !e.ctrlKey : e.ctrlKey; // get ctrl key
|
||||
if (control && e.which == 70) { // 70 is "F"
|
||||
ensureAllInheritedExpanded();
|
||||
}
|
||||
});
|
||||
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 180 B |
|
Before Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 592 B |
|
Before Width: | Height: | Size: 692 B |
|
Before Width: | Height: | Size: 592 B |
|
Before Width: | Height: | Size: 692 B |
|
Before Width: | Height: | Size: 162 B |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 300 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 192 B |
|
Before Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 312 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 249 B |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 378 B |
|
Before Width: | Height: | Size: 344 B |
|
Before Width: | Height: | Size: 1021 B |
|
Before Width: | Height: | Size: 697 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 653 B |
|
Before Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1022 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 638 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 511 B |
|
Before Width: | Height: | Size: 592 B |
|
Before Width: | Height: | Size: 692 B |
|
Before Width: | Height: | Size: 393 B |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1014 B |
|
Before Width: | Height: | Size: 958 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |