This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated jQuery page height detection. Updated styling: added rollover…
… functionality. #29
- Loading branch information
1 parent
3a48716
commit e48b264
Showing
14 changed files
with
128 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
function set_columns(is_server_reference) { | ||
is_server_reference = typeof is_server_reference !== 'undefined' ? is_server_reference : false; | ||
var margin = 0; | ||
var maxHeight = 0; | ||
|
||
//find the tallest column | ||
$('.column_calc').each(function() { | ||
if (maxHeight < $(this).height()) { | ||
maxHeight = $(this).height(); | ||
console.log("M: " + maxHeight + " T: " + $(this).height()); | ||
} | ||
}); | ||
|
||
//511: height of the navigation. 96: height of the footer | ||
if (maxHeight > 923) {margin = maxHeight - 511 - 96;} | ||
if (is_server_reference == true){margin = margin + 80;} | ||
console.log("Max Height: " + maxHeight + " Margin: " + margin); | ||
|
||
//Set the margin above the footer | ||
$('.social-menu').css({'margin-top': (margin)}); | ||
} | ||
|
||
//Close all accordions | ||
$('.toctree-l1 > ul').hide(); | ||
|
||
//This variable checks if all accordions are closed. Used to ensure styling for Releases & FAQ page. | ||
var allClosed; | ||
|
||
//If a sub-item is currently being viewed, keep it's parent menu open | ||
$('.toctree-l1 > a').each(function(){ | ||
if($(this).attr('state') == 'open') { | ||
$(this).next().show(); | ||
set_columns(); | ||
allClosed = false; | ||
return false; | ||
} else { | ||
allClosed = true; | ||
} | ||
}); | ||
|
||
if (allClosed == true) {set_columns();} | ||
|
||
|
||
//If menu is closed when clicked, expand it | ||
$('.toctree-l1 > a').click(function() { | ||
|
||
//Make the titles of open accordions dead links | ||
if ($(this).attr('state') == 'open') {return false;} | ||
|
||
//Clicking on a title of a closed accordion | ||
if($(this).attr('state') != 'open' && $(this).siblings().size() > 0) { | ||
$('.toctree-l1 > ul').hide(); | ||
$('.toctree-l1 > a').attr('state', ''); | ||
$(this).attr('state', 'open'); | ||
$(this).next().slideDown(); | ||
if($(this).html() == "Server Reference") {set_columns(true);} else {set_columns();} | ||
return false; | ||
} | ||
}); |
Oops, something went wrong.