-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds basic JS to allow the menu structure to be opened and closed.
- Loading branch information
Steve "uru" West
committed
Sep 11, 2015
1 parent
d1bc653
commit aed8e43
Showing
6 changed files
with
47 additions
and
1 deletion.
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
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,16 @@ | ||
$(document).ready(function(){ | ||
|
||
// Hide any children as long as the branch is not active | ||
$('.setui-leaf') | ||
.not('.setui-active') | ||
.find('ul') | ||
.hide(); | ||
|
||
// Make sure the content can be shown and hidden | ||
$('.setui-link').on('click', function(element){ | ||
element.preventDefault(); | ||
$('#' + $(this).data('parent')) | ||
.find('ul') | ||
.slideToggle(200); | ||
}); | ||
}); |
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
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 |
---|---|---|
@@ -1,4 +1,17 @@ | ||
<li class="<?php echo ($active) ? 'active' : ''; ?>"> | ||
<li class="setui-leaf <?php echo ($active) ? 'setui-active setui-open' : ''; ?>" | ||
id="setui_<?php echo $node->tree_id.'_'.$node->id; ?>" | ||
> | ||
|
||
<a href="<?php echo $url; ?>"><?php echo $name; ?></a> | ||
|
||
<?php if (!empty($branches)) | ||
{ | ||
echo Asset::img('triangle.png', [ | ||
'class' => 'setui-link', | ||
'data-parent' => 'setui_' . $node->tree_id . '_' . $node->id | ||
]); | ||
} | ||
?> | ||
|
||
<?php echo $branches; ?> | ||
</li> |