am e9fbac49
: make expandable lists under each sample sticky so they don\'t collapse when opening other project directories.
* commit 'e9fbac49bba45008d8741f3f93b47e866093e238': make expandable lists under each sample sticky so they don't collapse when opening other project directories.
This commit is contained in:
@@ -393,6 +393,17 @@ video.with-shadow {
|
|||||||
#nav li ul.tree-list-children ul {
|
#nav li ul.tree-list-children ul {
|
||||||
display:block; }
|
display:block; }
|
||||||
|
|
||||||
|
#nav.samples-nav li li li {
|
||||||
|
font-size:13px;
|
||||||
|
}
|
||||||
|
#nav.samples-nav li li li a {
|
||||||
|
padding-top:3px;
|
||||||
|
padding-bottom:3px;
|
||||||
|
}
|
||||||
|
#nav.samples-nav li li ul > li:last-child {
|
||||||
|
padding-bottom:3px;
|
||||||
|
}
|
||||||
|
|
||||||
.new,
|
.new,
|
||||||
.new-child {
|
.new-child {
|
||||||
font-size: .78em;
|
font-size: .78em;
|
||||||
@@ -2138,16 +2149,15 @@ pre {
|
|||||||
border: solid 1px #ddd;
|
border: solid 1px #ddd;
|
||||||
background: #f7f7f7;
|
background: #f7f7f7;
|
||||||
}
|
}
|
||||||
.str { color: #080; }
|
.str { color: #800; } /* Code string */
|
||||||
.kwd { color: #008; }
|
.kwd { color: #008; }
|
||||||
.com { color: #800; }
|
|
||||||
.typ { color: #606; }
|
.typ { color: #606; }
|
||||||
.lit { color: #066; }
|
.lit { color: #066; }
|
||||||
.pun { color: #660; }
|
.pun { color: #660; }
|
||||||
.pln { color: #000; }
|
.pln { color: #000; }
|
||||||
.tag { color: #008; }
|
.tag { color: #008; }
|
||||||
.atn { color: #828; }
|
.atn { color: #828; }
|
||||||
.atv { color: #080; }
|
.atv { color: #800; } /* XML string */
|
||||||
.dec { color: #606; }
|
.dec { color: #606; }
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------
|
||||||
@@ -2483,13 +2493,12 @@ Lightbox
|
|||||||
background-position: -10px 0;
|
background-position: -10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------
|
/* --------------------------------------------------------------------------
|
||||||
Styles for samples project trees and code browsing in resources tab
|
Styles for samples project trees and code browsing in resources tab
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#codesample-wrapper {
|
#codesample-wrapper {
|
||||||
width:1000px;
|
width:100000px; /* super wide to contain floats, but doesn't cause scroll */
|
||||||
overflow:visible;
|
overflow:visible;
|
||||||
}
|
}
|
||||||
pre#codesample-block {
|
pre#codesample-block {
|
||||||
|
@@ -573,7 +573,7 @@ function initExpandableNavItems(rootTag) {
|
|||||||
} else {
|
} else {
|
||||||
/* show me */
|
/* show me */
|
||||||
// first hide all other siblings
|
// first hide all other siblings
|
||||||
var $others = $('li.nav-section.expanded', $(this).closest('ul'));
|
var $others = $('li.nav-section.expanded', $(this).closest('ul')).not('.sticky');
|
||||||
$others.removeClass('expanded').children('ul').slideUp(250);
|
$others.removeClass('expanded').children('ul').slideUp(250);
|
||||||
|
|
||||||
// now expand me
|
// now expand me
|
||||||
@@ -2716,6 +2716,9 @@ function init_google_navtree2(navtree_id, data)
|
|||||||
$containerUl.append(new_google_node2(node_data));
|
$containerUl.append(new_google_node2(node_data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make all third-generation list items 'sticky' to prevent them from collapsing
|
||||||
|
$containerUl.find('li li li.nav-section').addClass('sticky');
|
||||||
|
|
||||||
initExpandableNavItems("#"+navtree_id);
|
initExpandableNavItems("#"+navtree_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2728,9 +2731,11 @@ function new_google_node2(node_data)
|
|||||||
var $li = $('<li>');
|
var $li = $('<li>');
|
||||||
var $a;
|
var $a;
|
||||||
if (node_data[NODE_HREF] != null) {
|
if (node_data[NODE_HREF] != null) {
|
||||||
$a = $('<a href="' + toRoot + node_data[NODE_HREF] + '">' + linkText + '</a>');
|
$a = $('<a href="' + toRoot + node_data[NODE_HREF] + '" title="' + linkText + '" >'
|
||||||
|
+ linkText + '</a>');
|
||||||
} else {
|
} else {
|
||||||
$a = $('<a href="#" onclick="return false;">' + linkText + '/</a>');
|
$a = $('<a href="#" onclick="return false;" title="' + linkText + '" >'
|
||||||
|
+ linkText + '/</a>');
|
||||||
}
|
}
|
||||||
var $childUl = $('<ul>');
|
var $childUl = $('<ul>');
|
||||||
if (node_data[NODE_CHILDREN] != null) {
|
if (node_data[NODE_CHILDREN] != null) {
|
||||||
@@ -2949,7 +2954,7 @@ function selectText(element) {
|
|||||||
range.moveToElementText(element);
|
range.moveToElementText(element);
|
||||||
range.select();
|
range.select();
|
||||||
} else if (window.getSelection) { //all others
|
} else if (window.getSelection) { //all others
|
||||||
selection = window.getSelection();
|
selection = window.getSelection();
|
||||||
range = doc.createRange();
|
range = doc.createRange();
|
||||||
range.selectNodeContents(element);
|
range.selectNodeContents(element);
|
||||||
selection.removeAllRanges();
|
selection.removeAllRanges();
|
||||||
|
Reference in New Issue
Block a user