Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Fix: #777 - Re: Scroll in the drop down menus #773 - Custom menu sub-…
Browse files Browse the repository at this point in the history
…menus no longer accessible.
  • Loading branch information
gjb2048 committed Oct 15, 2016
1 parent 0d32633 commit 0208d17
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 42 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
New in 3.1.1.2
==============
- FIX: Issue #777: Re: Scroll in the drop down menus #773 - Custom menu sub-menus no longer accessible.
- FIX: Bootstrap override LESS not working.

New in 3.1.1.1
Expand Down
12 changes: 9 additions & 3 deletions classes/output/core_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -551,13 +551,19 @@ protected function render_custom_menu_item(custom_menu_item $menunode, $level =
$content .= $this->getfontawesomemarkup('caret-right');
}
$content .= '</a>';
$content .= '<div class="dropdown-menu">';
$content .= '<ul>';
if ($level == 1) {
$content .= '<div class="dropdown-menu">';
$content .= '<ul>';
} else {
$content .= '<ul class="dropdown-menu">';
}
foreach ($menunode->get_children() as $menunode) {
$content .= $this->render_custom_menu_item($menunode, 0);
}
$content .= '</ul>';
$content .= '</div>';
if ($level == 1) {
$content .= '</div>';
}
} else {
// Also, if the node's text matches '####', add a class so we can treat it as a divider.
$content = '';
Expand Down
12 changes: 8 additions & 4 deletions less/essential-alternative.less
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,10 @@
.dropdown-toggle:after {
border-left-color: inherit;
}
&:focus, &:hover .dropdown-toggle:after {
border-left-color: ~"[[setting:alternativethemenavcolor@{index}]]";
&:focus, &:hover {
.dropdown-toggle:after {
border-left-color: ~"[[setting:alternativethemenavcolor@{index}]]";
}
}
}
}
Expand Down Expand Up @@ -1243,8 +1245,10 @@
border-left-color: transparent;
border-top-color: ~"[[setting:alternativethemeiconcolor@{index}]]";
}
&:hover .dropdown-toggle:after {
border-top-color: ~"[[setting:alternativethemenavcolor@{index}]]";
&:focus, &:hover {
.dropdown-toggle:after {
border-top-color: ~"[[setting:alternativethemenavcolor@{index}]]";
}
}
}
.dropdown-submenu, .dropdown-submenu:hover {
Expand Down
8 changes: 6 additions & 2 deletions less/essential/navigation.less
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ div.dropdown-menu > ul {
li a {
display: block;
}
#custom_menu & {
max-height: none;
overflow-y: visible;
}
}

.navbar {
Expand Down Expand Up @@ -115,7 +119,7 @@ div.dropdown-menu > ul {
}
}

.dropdown-menu {
.dropdown > .dropdown-menu {
margin: 0;
}

Expand Down Expand Up @@ -381,7 +385,7 @@ div.dropdown-menu > ul {
margin-left: 5px;
}

.dropdown-menu > li > a,
.dropdown-menu li > a,
.dropdown-submenu > a {
padding: 3px 15px 3px 25px;
}
Expand Down
33 changes: 10 additions & 23 deletions less/essential/settings/navigation.less
Original file line number Diff line number Diff line change
Expand Up @@ -143,29 +143,14 @@
}
}

.dir-ltr .navbar {
.navbar-inner {
.nav .dropdown-menu {
.dropdown-submenu {
.dropdown-toggle:after {
border-left-color: ~"[[setting:themeiconcolor]]";
}
&:hover .dropdown-toggle:after {
border-left-color: ~"[[setting:themenavcolor]]";
}
.navbar-inner {
.nav .dropdown-menu {
.dropdown-submenu {
.dropdown-toggle:after {
border-left-color: ~"[[setting:themeiconcolor]]";
}
}
}
}

.dir-rtl .navbar {
.navbar-inner {
.nav .dropdown-menu {
.dropdown-submenu {
&:focus, &:hover {
.dropdown-toggle:after {
border-left-color: ~"[[setting:themeiconcolor]]";
}
&:hover .dropdown-toggle:after {
border-left-color: ~"[[setting:themenavcolor]]";
}
}
Expand All @@ -181,8 +166,10 @@
.dropdown-toggle:after {
border-top-color: ~"[[setting:themeiconcolor]]";
}
&:hover .dropdown-toggle:after {
border-top-color: ~"[[setting:themenavcolor]]";
&:focus, &:hover {
.dropdown-toggle:after {
border-top-color: ~"[[setting:themenavcolor]]";
}
}
}
.dropdown-submenu, .dropdown-submenu:hover {
Expand Down
2 changes: 1 addition & 1 deletion style/essential-alternative.css

Large diffs are not rendered by default.

13 changes: 5 additions & 8 deletions style/essential-settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -949,23 +949,20 @@ button.website:focus {
.navbar .navbar-inner .messagemenu ul.nav .dropdown-menu li > a:hover .notification img.profilepicture {
box-shadow: 0 0 3px [[setting:themenavcolor]];
}
.dir-ltr .navbar .navbar-inner .nav .dropdown-menu .dropdown-submenu .dropdown-toggle:after {
.navbar-inner .nav .dropdown-menu .dropdown-submenu .dropdown-toggle:after {
border-left-color: [[setting:themeiconcolor]];
}
.dir-ltr .navbar .navbar-inner .nav .dropdown-menu .dropdown-submenu:hover .dropdown-toggle:after {
border-left-color: [[setting:themenavcolor]];
}
.dir-rtl .navbar .navbar-inner .nav .dropdown-menu .dropdown-submenu .dropdown-toggle:after {
border-left-color: [[setting:themeiconcolor]];
}
.dir-rtl .navbar .navbar-inner .nav .dropdown-menu .dropdown-submenu:hover .dropdown-toggle:after {
.navbar-inner .nav .dropdown-menu .dropdown-submenu:focus .dropdown-toggle:after,
.navbar-inner .nav .dropdown-menu .dropdown-submenu:hover .dropdown-toggle:after {
border-left-color: [[setting:themenavcolor]];
}
@media (max-width: 979px) {
.navbar .nav-collapse.in .nav .dropdown-submenu .dropdown-toggle:after,
.navbar .nav-collapse.in .nav .dropdown-menu .dropdown-submenu .dropdown-toggle:after {
border-top-color: [[setting:themeiconcolor]];
}
.navbar .nav-collapse.in .nav .dropdown-submenu:focus .dropdown-toggle:after,
.navbar .nav-collapse.in .nav .dropdown-menu .dropdown-submenu:focus .dropdown-toggle:after,
.navbar .nav-collapse.in .nav .dropdown-submenu:hover .dropdown-toggle:after,
.navbar .nav-collapse.in .nav .dropdown-menu .dropdown-submenu:hover .dropdown-toggle:after {
border-top-color: [[setting:themenavcolor]];
Expand Down
2 changes: 1 addition & 1 deletion style/essential.css

Large diffs are not rendered by default.

0 comments on commit 0208d17

Please sign in to comment.