forked from openkylin/platform_build
add new script to toggle visibility of nested list items.
call hideNestedItems(), giving it the parent list to toggle and the <a> element that performs the toggle Change-Id: I6f1ee74b957f88c23550145c6ed057d8e7797c99
This commit is contained in:
parent
0eacd936b7
commit
d7026f7a5f
tools/droiddoc/templates-sdk/assets
|
@ -2648,6 +2648,22 @@ a.notice-developers.left {
|
|||
}
|
||||
|
||||
|
||||
/* hide nested list items; companion to hideNestedLists() */
|
||||
.hide-nested li ol,
|
||||
.hide-nested li ul {
|
||||
display:none;
|
||||
}
|
||||
|
||||
a.header-toggle {
|
||||
display:block;
|
||||
float:right;
|
||||
text-transform:uppercase;
|
||||
font-size:.8em !important;
|
||||
font-weight:normal;
|
||||
margin-top:2px;
|
||||
}
|
||||
|
||||
|
||||
/* -----------------------------------------------
|
||||
good/bad example containers
|
||||
*/
|
||||
|
|
|
@ -898,52 +898,7 @@ function writeCookie(cookie, val, section, expiration) {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
REMEMBER THE PREVIOUS PAGE FOR EACH TAB
|
||||
|
||||
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) || (path.indexOf("/training/") != -1)) {
|
||||
writeCookie("lastpage", path, "resources", null);
|
||||
}
|
||||
});
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* MISC LIBRARY FUNCTIONS */
|
||||
|
||||
|
||||
|
||||
|
@ -970,9 +925,6 @@ function toggle(obj, slide) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function buildToggleLists() {
|
||||
$(".toggle-list").each(
|
||||
function(i) {
|
||||
|
@ -983,7 +935,19 @@ function buildToggleLists() {
|
|||
|
||||
|
||||
|
||||
|
||||
function hideNestedItems(list, toggle) {
|
||||
$list = $(list);
|
||||
// hide nested lists
|
||||
if($list.hasClass('showing')) {
|
||||
$("li ol", $list).hide('fast');
|
||||
$list.removeClass('showing');
|
||||
// show nested lists
|
||||
} else {
|
||||
$("li ol", $list).show('fast');
|
||||
$list.addClass('showing');
|
||||
}
|
||||
$(".more,.less",$(toggle)).toggle();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue