2011-01-09 17:58:52 +00:00
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
|
|
/* When a toggle is clicked, show or hide the subtree. */
|
|
|
|
$(".logTreeToggle").click(function() {
|
|
|
|
if ($(this).siblings("ul:hidden").length != 0) {
|
|
|
|
$(this).siblings("ul").show();
|
|
|
|
$(this).text("-");
|
|
|
|
} else {
|
|
|
|
$(this).siblings("ul").hide();
|
|
|
|
$(this).text("+");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
/* Implementation of the expand all link. */
|
|
|
|
$(".logTreeExpandAll").click(function() {
|
2011-01-10 15:17:38 +00:00
|
|
|
$(".logTreeToggle", $(this).parent().siblings(".toplevel")).map(function() {
|
2011-01-09 17:58:52 +00:00
|
|
|
$(this).siblings("ul").show();
|
|
|
|
$(this).text("-");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
/* Implementation of the collapse all link. */
|
|
|
|
$(".logTreeCollapseAll").click(function() {
|
2011-01-10 15:17:38 +00:00
|
|
|
$(".logTreeToggle", $(this).parent().siblings(".toplevel")).map(function() {
|
2011-01-09 17:58:52 +00:00
|
|
|
$(this).siblings("ul").hide();
|
|
|
|
$(this).text("+");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|